Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion NOT IN
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
sybrandb  
View profile  
 More options Jul 4 2007, 9:19 am
Newsgroups: comp.databases.oracle.misc
From: sybrandb <sybra...@gmail.com>
Date: Wed, 04 Jul 2007 06:19:20 -0700
Local: Wed, Jul 4 2007 9:19 am
Subject: Re: NOT IN
On Jul 4, 2:47 pm, colmkav <colmj...@yahoo.co.uk> wrote:

> is it possible to write an SQL Oracle query where you want to check
> whether a combination of fields exist in another query

> eg I tried the following but got an error:

> select count(*) from tmp_risk_sum where book, strategy, exposuretypeid
> not in (select book, strategy, exposuretypeid from tmp_risk_sum_ORACLE)

the correct syntax is
select count(*)
from tmp_risk_sum
where (book, strategy, exposuretypeid)
not in (select book, strategy, exposuretypeid from
tmp_risk_sum_ORACLE)

Note the extra ()

Syntax errors are preferably resolved by using the documentation.

--
Sybrand Bakker
Senior Oracle DBA


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.