S shamas21 Registered User. Local time Today, 17:47 Joined May 27, 2008 Messages 162 Jun 2, 2008 #1 Hi All Can some tell me what im doing wrong. Im trying to bring back Any field that begin with A or B using the IN Statement. Thanks SELECT country, name, amount FROM tblcountries WHERE Name IN ('A*','B*'));
Hi All Can some tell me what im doing wrong. Im trying to bring back Any field that begin with A or B using the IN Statement. Thanks SELECT country, name, amount FROM tblcountries WHERE Name IN ('A*','B*'));
W WayneRyan AWF VIP Local time Today, 17:47 Joined Nov 19, 2002 Messages 7,122 Jun 2, 2008 #2 shamas, WHERE Name IN ('A*','B*')); The items in the In clause can't contain wildcards. There is no like operator. Where Name Like 'A*' Or Name Like 'B*' Also, Name is a reserved word. hth, Wayne
shamas, WHERE Name IN ('A*','B*')); The items in the In clause can't contain wildcards. There is no like operator. Where Name Like 'A*' Or Name Like 'B*' Also, Name is a reserved word. hth, Wayne
W WayneRyan AWF VIP Local time Today, 17:47 Joined Nov 19, 2002 Messages 7,122 Jun 2, 2008 #3 shamas, Alternatively: WHERE Left(Name, 1) IN ('A', 'B')); Wayne
S shamas21 Registered User. Local time Today, 17:47 Joined May 27, 2008 Messages 162 Jun 2, 2008 #4 Many thanks Wayne
MSAccessRookie AWF VIP Local time Today, 12:47 Joined May 2, 2008 Messages 3,428 Jun 2, 2008 #5 It looks like you also have an extra ")" (see below) WHERE Left(Name, 1) IN ('A', 'B'))
W WayneRyan AWF VIP Local time Today, 17:47 Joined Nov 19, 2002 Messages 7,122 Jun 3, 2008 #6 Thanks Rookie, It happens ... Should Cut-And-Paste be illegal? Wayne
MSAccessRookie AWF VIP Local time Today, 12:47 Joined May 2, 2008 Messages 3,428 Jun 3, 2008 #7 That would depend on what you are cutting and pasting. WayneRyan said: Thanks Rookie, It happens ... Should Cut-And-Paste be illegal? Wayne Click to expand... That would depend on what you are cutting and pasting.
That would depend on what you are cutting and pasting. WayneRyan said: Thanks Rookie, It happens ... Should Cut-And-Paste be illegal? Wayne Click to expand... That would depend on what you are cutting and pasting.