[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: How are dates handled in SQR with SQL Server
- Subject: Re: How are dates handled in SQR with SQL Server
- From: Wes Williams <wwilliams@MAIL.RKD.SNDS.COM>
- Date: Wed, 7 Apr 1999 12:41:07 -0500
Well I figured out (sqribe mentioned a bug #586)I have to make it a dynamic
variable to get dates to work e.g.
INPUT $FROMDATE type = date
LET $FROMDATE = UPPER($FROMDATE)
let $fromdate = 'reportdate >= '||''''||$fromdate||''''
.
.
.
FROM workorder
WHERE status = 'INPRG' AND ESTLABHRS >= 1 AND LEADCRAFT LIKE '583%' and
[$fromdate]
Wes
>>> Wes Williams <wwilliams@mail.rkd.snds.com> 04/07 9:16 AM >>>
Maximo 3.02
SQL Server 6.5
SQR 3.0.13.3
Reportmate 3.5
I'm having a difficult time converting my SQLBase reports to now run on SQL
Server. My main problem is with dates. Chris Wanko was kind enough to provide
an SQC that he uses on Sybase, but unfortunately it doesn't work here.
It looks as though the SQR checks the syntax prior to running and fails since
there is no value for $fromdate until actual execution (I never get prompted).
example
begin-program
Input $FromDate type = date
Let $FromDate = UPPER($FromDate)
do check-valid-date
.
.
.
Begin-procedure check-valid-date
begin-select
convert(varchar(10),convert(datetime, $FromDate),101) &FromDate
end-select
end-procedure
Here is the error
(SQR 1303) Error in SQL (perhaps missing &name after expression):
select convert(varchar(10),convert(datetime, ?),101)
(SQR 1304) Check SELECT columns, expressions and 'where' clause for syntax.
In addition, I try different combinations for date entry(those that work in
ISql) and they don't want to work in SQR.
TIA
Wes
Wes Williams
Sundstrand Aerospace
Wes Williams
Sundstrand Aerospace