Page 1 of 1
SQL Query
Posted: Sun Jan 08, 2023 3:16 pm
by gremlin
Hy, I had a problem with SQL Query.
I open Database, no error.
Then I do a DB Exec SQL, no error
DB Close, no error
Messagebox the Result, empty
When I use the SQL Query at SQl Studio it works with a result.

- screenshot_20230108_151414.png (14.21 KiB) Viewed 5870 times
Anyone can help me , why I get no result ?
Re: SQL Query
Posted: Mon Jan 09, 2023 8:43 am
by Oleg
Do you want to see the SUM?
DB Exec SQL action just execute the SQL statement. It has no any output. You can get
row affected option. But this is depends on database kind.
1. 1-st line in your expression is not necessary. You can write
...[tWarenLger].kWarenLager = 1 in SQL
2. You must use
DB Loop to extract some data from database. You expression returns only one row and one field
Re: SQL Query
Posted: Mon Jan 09, 2023 11:38 am
by gremlin
Hy,
thank you. I had tried, but the result still empty...

- Snipaste_2023-01-09_11-37-38.png (33.66 KiB) Viewed 5848 times
Re: SQL Query
Posted: Wed Jan 11, 2023 1:22 pm
by Oleg
Use LAGER1 instead of {LAGER1} (without braces)
You must specify variable name only
Re: SQL Query
Posted: Wed Jan 11, 2023 2:04 pm
by gremlin
Yes, thank you. Now it works