Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Select question
Message
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00794895
Message ID:
00795306
Views:
15
Hi Dmitry,

After thinking a little bit more on the problem I realized, that it was the correct solution. Thanks.

>>>I am not sure that UNION is the clause I need in this case. Once I "moved" the WHERE clause into JOIN, all works well now.
>>>Thank you for your suggestion.
>>>
>>>>You can use UNION clause in your select, e.g. first part would select your data and second would be a UNION to Parts only (no need to do joins).
>>
>>Interesting. I would not think, moving where clause to JOIN would work...
>
>It was strange to me too that it works. Because I have never before used this syntax. I thought that JOIN can only use something like
>ON TABLE1.FIELD = TABLE2.FIELD.
>
>I hope I am not doing something that I will later regret when using syntax:
>
>
>Select * from MYTABLE1 join MYTABLE2 on MYTABLE1.FLD1 = MYTABLE2.FLD2 and MYTABLE2.SOMEDATE between (BEGINDATE and ENDDATE)
>
>
>I hope someone who knows more about correct SQL Select will warn me of the potential problem.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform