Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Some Help with Select statement
Message
From
22/09/2003 05:24:44
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00830332
Message ID:
00831000
Views:
18
>>>>>Hi Kevin,
>>>>>
>>>>>>... the Times AND the Sunday Times and NO other papers.
>>>>>
>>>>>
>>>>> WHERE INLIST(ItemId, ID_SUNDAYTIMES, ID_TIMES); && <-- this is OR
>>>>>   ...
>>>>>
>>>>>
>>>>>Fabio
>>>>
>>>>So it is :-)
>>>>
>>>>
WHERE ItemId = ID_SUNDAYTIMES OR ItemId = ID_TIMES
>>>>
>>>>Thanks for the correction.
>>>>
>>>>Kev
>>>Kev,
>>>Unfortunately that still does and OR not and AND across multiple records which is what I need.
>>
>>Oops, I'm not with it today.
>>
>>Do you have to achieve this in 1 select?
>>
>>Kev
>
>Ideally yes.

I don't think it's going to be possible due to the nature of SQL, because you are asking for fields that have other values in different rows in a single statement.

The easy way will probably be to write a function and embed it in a Select statment.

If you do find a solution, let me know, I would be interested.

Kev
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform