[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
How are dates handled in SQR with SQL Server
- Subject: How are dates handled in SQR with SQL Server
- From: Wes Williams <wwilliams@MAIL.RKD.SNDS.COM>
- Date: Wed, 7 Apr 1999 09:16:12 -0500
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