RE: [Info-ingres] Having problem with simple "NOT IN" query



Hi Manny,
Looks like you are running MySQL.
If you were running ingres you'd have no probs.
Check your paths, check your news group

Paul

* create table tab_a (id int);
* create table tab_b (id int);
* insert into tab_a values (1);
* insert into tab_a values (2);
* insert into tab_a values (3);
* insert into tab_a values (4);
* insert into tab_b values (4);
* insert into tab_b values (5);
* select id from tab_a
* where id not in
* (select id from tab_b); \g
Executing . . .


???????????????
?id ?
???????????????
? 1?
? 2?
? 3?
???????????????
(3 rows)



-----Original Message-----
From: info-ingres-admin@xxxxxxxxxxxxxxx
[mailto:info-ingres-admin@xxxxxxxxxxxxxxx]On Behalf Of
mantas44@xxxxxxxxxxx
Sent: Saturday, 20 August 2005 9:23 PM
To: info-ingres@xxxxxxxxxxxxxxx
Subject: [Info-ingres] Having problem with simple "NOT IN" query


Hello all,

I have two tables

tab_a id(int)
tab_b id(int)

and I try the following select which returns an error:

SELECT id from tab_a
where id NOT IN
(select id from tab_b);

#1064 - You have an error in your SQL syntax. Check the manual that
corresponds to your MySQL server version for the right syntax to use
near 'select id from tab_b) LIMIT 0, 30' at line 3


Please advise.

Cheers,

Manny

_______________________________________________
Info-ingres mailing list
Info-ingres@xxxxxxxxxxxxxxx
http://mailman.cariboulake.com/mailman/listinfo.py/info-ingres

.



Relevant Pages

  • Re: synchronous signal in the blocked signal context
    ... On Tue, 1 Aug 2006, Paul E. McKenney wrote: ... I cannot claim any deep thought on this one, so please do revert it. ... original patch. ... unsigned long int flags; ...
    (Linux-Kernel)
  • Re: problem with query moving data from 1 dbase to another.
    ... Tibor Karaszi, SQL Server MVP ... "Paul" wrote in message ... > Syntax error converting the nvarchar to int. ... > Data_Item_Log_ID is type integer and the source field> (from another dbase on the same server) is type nvarchar 4. ...
    (microsoft.public.sqlserver.server)
  • Re: P/Invoke BYTE *
    ... Paul G. Tobey wrote: ... value to pDataBuffer. ... bytepDataBuffer, int iSize); ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Accessing ActiveX VB function within C++ App
    ... Paul ... > int, int) and it returns ... > HRESULT hresult; ... > CLSID clsid; ...
    (microsoft.public.dotnet.languages.vc)
  • problem with strerror
    ... then recognize that this news group may be more appriopriate for this ... int SendWithLog(int sock, char * data, int length) ... I 've tried to call to strerror before the line sprintf, ...
    (comp.unix.programmer)