PostgreSQL: select now()::date error

The forum for ZeosLib 7.2 Report problems. Ask for help, post proposals for the new version and Zeoslib 7.2 features here. This is a forum that will be edited once the 7.2.x version goes into RC/stable!!

My personal intention for 7.2 is to speed up the internals as optimal a possible for all IDE's. Hope you can help?! Have fun with testing 7.2
Post Reply
User avatar
ribut
Fresh Boarder
Fresh Boarder
Posts: 22
Joined: 03.02.2017, 08:30

PostgreSQL: select now()::date error

Post by ribut »

Use Zeos 7.2

select now()::date -->syntax error

but

select now()::::date -->Run
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: PostgreSQL: select now()::date error

Post by marsupilami »

This is as expected. The default param char is the ':'. One possibility is to change the ParamChar property to something different, '#' maye.

Another possibility is to use a standard SQL cast. Cloudflare currently keeps me from posting an Example here...
User avatar
ribut
Fresh Boarder
Fresh Boarder
Posts: 22
Joined: 03.02.2017, 08:30

Re: PostgreSQL: select now()::date error

Post by ribut »

with qrySQL do begin
ParamChar:='#'; //--> Ok
Close;
SQL.Clear;
SQL.Add('select now()::date');
Open;
end;

Ok Jan Thanks
Now error syntax no show
Post Reply