PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WINDEV 2024
→
UNION on HExecuteSQLQuery()
UNION on HExecuteSQLQuery()
Started by Alejandro Santacatalina, Oct., 20 2017 6:01 PM - No answer
Connect yourself…
Alejandro Santacatalina
#1
Posted on October, 20 2017 - 6:01 PM
Hello,
I have 3 tables and I want to show the columns from t1 that have the Column1 value on the t2 or t3. I try an Union sql sentence but it seems like not works with HExecuteSQLQuery().
The query is something like this:
cQry is string = [
SELECT t1.Column1, t1.Column2 FROM t1 JOIN t2 on t1.Column1 = t2.Column1
UNION
SELECT t1.Column1, t1.Column2 FROM t1 JOIN t3 on t1.Column1 = t3.Column1
]
The function:
HExecuteSQLQuery(DataSource, hQueryDefault, cQry)
HReadFirst(DataSource)
Finally I had an Error on HReadFirst(), DataSource is null.
Thank you!
Report
0
0
→ Go back to WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (earlier versions)
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text