Or if you want not to select records that have one or more values in a
certain column you can combine the NOT and the IN keywords/operators:

Select * from MYTABLE 
Where not MYCOLUMN In (3,5,7)
Into Selection

If the values in MYCOLUMN are strings do remember the quotes ("") around the
values:

Select * from MYTABLE 
Where not MYCOLUMN In ("3", "5", "7")
Into Selection

HTH,
Peter Horsb�ll M�ller 
GIS Developer 
COWI A/S 
Rug�rdsvej 55 
DK 5000 Odense C 

Tel       +45 6313 5013 
Direct    +45 6313 5008 
Mobil     +45 2270 4308 
Fax       +45 6313 5090    



-----Original Message-----
From: Jakob Lanstorp
To: mapindo-l
Cc: [EMAIL PROTECTED]
Sent: 13-02-03 09:18
Subject: RE: MI-L mini SQL problem!

Michelle  wrote: "I have got a simple SQL problem. I have a column with
7-10 different values (say 1,2,3,4,5,6,7). How can I construct a SQL
query to select records of values no 3, 5 and 7???"

If you want odd numbers use the mod operator:

Select * from MYTABLE 
Where MYCOLUMN Mod 2 <> 0 
Into Selection
Browse * From Selection


HTH
Jakob Lanstorp, M.Sc.
The HydroGeophysics Group
Department of Earth Sciences, University of Aarhus, Denmark
Phone +45 8942 4350 / Fax +45 8610 1003
WWW (Danish) http://www.gfs.au.dk
WWW (English) http://www.hgg.au.dk
E-mail mailto:[EMAIL PROTECTED]


---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 5507

Reply via email to