LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default SQL query syntax

Your IN statement is very nice. I tried it, but unfortunately it only
works for exact strings.

I would like to have something like:

SELECT ... FROM ... WHERE Name IN ('*An*' ,'John') and Age=26

so not only An but also Ann will be chosen


I tried already this one:

SELECT ... FROM ... WHERE Name Like "An" And Age=26 Or Name Like "John"
and
Age=26

This works, but

SELECT ... FROM ... WHERE (Name Like "An" Or Name Like "John") and
Age=26

doesnt' work

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
MS Query Oracle syntax Jeff[_3_] Excel Discussion (Misc queries) 3 May 12th 07 03:06 AM
MS Query Oracle syntax Jeff[_3_] Excel Discussion (Misc queries) 0 May 11th 07 09:26 PM
Microsoft Query syntax Krish Excel Discussion (Misc queries) 0 October 7th 05 02:33 PM
MS Query - Alias syntax David P Excel Worksheet Functions 3 February 16th 05 09:29 AM
DB query syntax Mike Fogleman Excel Programming 5 December 19th 03 09:42 AM


All times are GMT +1. The time now is 10:38 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"