|
| HFSQL SQL String as field |
| Iniciado por Sebastian Arnold, 29,feb. 2016 13:38 - 2 respuestas |
| |
| | | |
|
| |
Miembro registrado 102 mensajes |
|
| Publicado el 29,febrero 2016 - 13:38 |
I have a query like this:
SELECT 'Gesamt VDA' AS bez, SUM(anzahl) menge FROM soko WHERE LEFT(nummer,4) = '1601' AND art = 'V'
My Result shows NULL as a value for bez instead of 'Gesamt VDA'. Why is that? Is there a way to declare a string as a field in HFSQL?
TIA Sebastian
-- http://arnoldconsult.de WinDev 20 with Oracle, WinDevMobile Android Apps and Motorola Windows CE Mobile Barcode Scanners, Python 3 with Oracle and MySQL |
| |
| |
| | | |
|
| | |
| |
Miembro registrado 34 mensajes |
|
| Publicado el 29,febrero 2016 - 14:28 |
Without seeing the code around this statement it is fairly hard to work it out. However SQL in Windev is fairly standard.
So something like SELECT FIELD1, FIELD2 from FROM soko WHERE FIELD3 LIKE '1601%' AND FIELD4 = 'V' is pretty standard stuff.
Not forgetting that it will return a set of data rather than a single value and you will have to parse it.
-- Regards,
Norman |
| |
| |
| | | |
|
| | |
| |
Miembro registrado 102 mensajes |
|
| Publicado el 29,febrero 2016 - 15:00 |
This is without code, all within HFSQL Control Center.
The point is
SELECT 'something' AS column_name ...
is no field at all. It's just an identifier.
Seems like with HFSQL you can't do this.
Thanks anyway
-- http://arnoldconsult.de WinDev 20 with Oracle, WinDevMobile Android Apps and Motorola Windows CE Mobile Barcode Scanners, Python 3 with Oracle and MySQL |
| |
| |
| | | |
|
| | | | |
| | |
|