|
| [WD21][HFSQL21] Case in HFSQL Query |
| Iniciado por guest, 09,jun. 2017 15:04 - 5 respuestas |
| |
| | | |
|
| |
| Publicado el 09,junio 2017 - 15:04 |
Hello,
I need to write a case when ...... when .... Else End as part of the query. It's working fine in HFSQL Control centre, when I try to create the query in WD21 [through query editor] there seems to be no option to write a case syntax. I tried editing the query, it gives error message when I try to reverse engineer it.
I need to populate a table with 40 fields, creating a query string , executing it , assigning the result set to the table, through programming is a time consuming job. Is there any other easy way to get the work done ?
Happiness Always BKR Sivaprakash |
| |
| |
| | | |
|
| | |
| |
| Publicado el 09,junio 2017 - 15:30 |
Hi,
You can execute a text based SQL query using hExecuteSQLquery, check the Help.
Kind regards, Piet |
| |
| |
| | | |
|
| | |
| |
| Publicado el 09,junio 2017 - 15:42 |
Thanks Piet.
That's what I'm doing. If I could use a query file, it's easier for me, just assign that query in the content tab of description. No more codes.
To use hExecuteSQLquery, I need to set to Programming in the content tab, and manually add all those fields to query. It's a lengthy process, which I need to repeat for more windows. Is there any other better way to assign the resultset to table ?
Happiness Always BKR Sivaprakash |
| |
| |
| | | |
|
| | |
| |
| Publicado el 09,junio 2017 - 15:51 |
Hi,
Yes you can create an array of structures and do filetoarray In the table description choose variable as datasource and choose the array. (must be global array)
Kind regards, Piet |
| |
| |
| | | |
|
| | |
| |
| Publicado el 09,junio 2017 - 17:27 |
Hi You can add a CASE statement in the query editor if you prefer.
Bottom left you will see a button 'Calculated Item'. Click will open another window. You have a choice of using the supported SQL Statements or WLanguage functions. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 10,junio 2017 - 15:18 |
Thanks DerekT,
I could put Case sql statement now.
Happiness Always BKR Sivaprakash |
| |
| |
| | | |
|
| | | | |
| | |
|