Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 8 Monaten, 2 Wochen
Letzter Beitrag:
vor 8 Monaten, 2 Wochen
Beteiligte Autoren:
steve erts, Peter Holemans

SQL Syntax not supported in WD 22 (solved)

Startbeitrag von steve erts am 04.09.2017 23:01


I use SQL Server for my backend database with windev and it appears that WD 22 no longer allows certain SQL syntax that worked in previous versions.

1. using CONVERT in a SELECT statement now gives a syntax error.

example: CONVERT(int,Booking_passenger.Room_Number) AS Room_Number_Int,

In the above example the IDE gives an "unexepected word" error on the second ")".

2. Using DATEPART no longer works in a WHERE clause.

example: DATEPART(year, Booking_History.Departure_Date) = {pYearNUmber}

in the above example "year" gives the error "year item unknown in file".

I've contacted technical support but I wonder if anyone else has run into this?




Re: SQL Syntax not supported in WD 22

Hi Steve,

As an alternative to 1 you may want to use CAST instead of CONVERT.

CAST(Booking_passenger.Room_Number as int) AS Room_Number_Int

For 2 I don't have a direct alternative at mind.


Peter Holemans

von Peter Holemans - am 05.09.2017 06:22

Re: SQL Syntax not supported in WD 22

It appears that while the queries give warnings they will execute.

However, queries saved as SQL are no longer available to be used as basis for reports in WD 22.
[attachment 2435 queryreportsv22.jpg]

von steve erts - am 05.09.2017 19:08

Re: SQL Syntax not supported in WD 22

Update... you can use these, but must select from within report description.

Additionally, these queries now need to be run using hquerywithoutcorrection which was not required in WD 20 and prior.

I've gotten my code straightened now, but it was a lost day and a half.

von steve erts - am 06.09.2017 16:47
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.