[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Datediff question.



Try adding this to your code:

  MOVE &dateinit to $dateinit

 DATEDIFF(day, WO.REPORTDATE, $dateinit)
>From WORKORDER WO Where WO.WONUM = '15485'



Anthony B. Moore
Front End Development
BellSouth Cellular Corp.
(770) 351-1382
email: Anthony_B_Moore@bscc.bls.com






-----Original Message-----
From: Romeu Sciotta [mailto:tb09@PETROBRAS.COM.BR]
Sent: Tuesday, November 17, 1998 2:25 PM
To: Multiple recipients of list SQR-USERS
Subject: Datediff question.


From:   NAME: Romeu Finoti Sciotta
        FUNC: DTSE/SUPER/DITEP/SETEC <TB09@A1@C60000>
To:     NAME: SQR UserGroup <SMTP%"SQR-USERS@usa.net"@mrgate>

Hello to all.

When I try to put a variable into datediff command on begin-select
paragraph, I receive the following message:

(SQR 1303) Error in SQL (perhaps missing &name after expression):
select DATEDIFF(day, WO.REPORTDATE, ?)  From WORKORDER WO Where WO.WONUM =
'15485'
(SQR 1304) Check SELECT columns, expressions and 'where' clause for
syntax.

Where is "?" I'm using a variable (ex: &dateinit)
My question is: Doesn't SQR support variables into DATEDIFF command?
Obs.: I've tried to use this command directly on SQL and it worked.

Any help would be appreciate.
Thank's in advance.

Romeu F. Sciotta
MIPS Sistemas (PSDI var in Brazil)

Inf: SQR v3 for ODBC