Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to combine two flds in one with on SQL Select?
Message
 
 
To
05/09/2005 16:07:10
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01046819
Message ID:
01046827
Views:
17
>>>
>>>
>>>SELECT ROOM1 ROOM,RES_DATE,RES_TIME;
>>> FROM Table;
>>>UNION;
>>>SELECT ROOM2,RES_DATE,RES_TIME;
>>> FROM Table WHERE NOT ROOM2==""
>>>
>>
>>If I may ask you another question. For the above SQL Select, do you know if there is a way to have a separate WHERE clause for top SELECT and bottom SELECT of the UNION?
>
>Yes
>
>
>SELECT ROOM1 ROOM,RES_DATE,RES_TIME;
> FROM Table WHERE condition1;
>UNION; && this is a distinct union ( like a UNION NEWS
>SELECT ROOM2,RES_DATE,RES_TIME;
>FROM Table WHERE condition2;
>
Thank you very much again, Fabio.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform