[prev in list] [next in list] [prev in thread] [next in thread] 

List:       msql
Subject:    Re: [mSQL] grouping of ands and ors
From:       Thomas Drillich <drillich () uniserve ! de>
Date:       1997-06-24 22:39:11
[Download RAW message or body]

Hi Craig,

Stephen Craig Totty sagt >>
>> 
>> Is there anyway to group ands and ors in select clauses?
>> I tried (), [], and {}.  Here is an example:
() seems to run on mSQL >= 2.0
>> 
>> select * from my_table where (lastname like '%Smith%') and
>> (age = 20 or place like "%Virginia%' or time like '%4:00%')
>> 
>> As it is now:
>> 
>> select * from my_table where lastname like '%Smith%' and
>> age = 20 or place like '%Virginia%' or time like '%4:00%'

But do you use msql < 2.0, msql >= 2.0 don't allow colums-names like 'time'.
A time query should like: timecol < '%H:%M:%S'
not like a string match.
--
mit freundlichem Gru"s -- regards

	Thomas Drillich <drillich@uniserve.de>
		uniserveŽ Internet & Multimedia GmbH; 
		Sophienweg 3; Technologiezentum (MIT); D-59872 Meschede
		fon +49 291 59100; fax +49 291 59102; handy +49 171 8947561




--------------------------------------------------------------------------
To remove yourself from the Mini SQL mailing list send a message containing
"unsubscribe" to msql-list-request@bunyip.com.  Send a message containing
"info msql-list" to majordomo@bunyip.com for info on monthly archives of
the list. For more help, mail owner-msql-list@bunyip.com NOT the msql-list!

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic