Hello Soren,

You've fallen into a common trap when learning SQL! Sometimes AND's and OR's
are the opposite to what one would express in spoken language. In this case,
I assume you want to select records from any of the three cities. In this
case you need to use OR instead of AND. What's happening in this case will
always return no results as the contents of the City field cannot be all
city names at the same time. Another syntax is:

select * from StreetTable where City in ("Stockholm", "Gothenburg", "Malmo")

Hope that helps.

Regards,
Warren Vick
Europa Technologies Ltd.
http://www.europa-tech.com

-----Original Message-----
From: Sören Lindqvist [mailto:[EMAIL PROTECTED] 
Sent: 20 February 2004 11:50
To: [EMAIL PROTECTED]
Subject: MI-L SQL selection


Dear list,

 

I trying to select in following example.

 

Select * from Streettable where City = “Stockholm” And City = “Gothenburg”
And City = “Malmo” into Selection

 

I can’t get any result from this, it says the syntax is right but I can’t
get all into a selection

How should it be done properly?

 

Regards

Soren




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

Reply via email to