Re: SQL SELECT and exact values by Cindy
Cindy
Fri Jan 27 12:29:09 CST 2006
Hi David,
Read about Set Ansi in Help.
Create Cursor Test (Field1 C(10))
Insert Into Test Values ("Item1")
Insert Into Test Values ("Item11")
Set Ansi Off
Select * From Test Where Not InList(Field1, "Item1")
Set Ansi On
Select * From Test Where Not InList(Field1, "Item1")
--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy_winegarden@msn.com www.cindywinegarden.com
"David" <David.Aman@dpsnc.net> wrote in message
news:1138381156.792654.277820@o13g2000cwo.googlegroups.com...
>I have a table with a field (ITEM) that contains the values "ITEM1"
> through "ITEM72."
> -
> The SQL SELECT statement below does NOT include the values "ITEM10",
> "ITEM11", etc., because these values begin with "ITEM1..."
> -
> SELECT * ;
> FROM mytable;
> WHERE .NOT. INLIST(item,'ITEM1')
> -
> How could I alter the SELECT statement to eliminate "ITEM1," but keep
> "ITEM10," "ITEM11," etc., in the results?
> -
> Many thanks,
> David
>