[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
[sqr-users] RE: SQL Null date (McCown, Larry)
- Subject: [sqr-users] RE: SQL Null date (McCown, Larry)
- From: "Ed Kelly" <ed_kelly@hotmail.com>
- Date: Fri, 16 Sep 2005 16:19:01 +0000
- Bcc:
- Delivery-date: Fri, 16 Sep 2005 11:21:46 -0500
- In-reply-to: <E1EGE3R-0000qy-00@seldon.sqrug.org>
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
The problem is, as mentioned earlier, that the strings $month and $year, are
being passed to the RDBMS, not their values. The correct syntax for your IF
statement would be as follows:
if isnull(&targstartdate3)
let $where5 = 'and datepart(MM,reportdate) = ''' || $month ||
''' and datepart(YYYY,reportdate) = ''' || $year || ''''
else
let $where5 = 'and datepart(MM,targstartdate) = ''' || $month ||
''' and datepart(YYYY,targstartdate) = ''' || $year || ''''
end-if
...........
And by the way folks, datepart() is a database function, NOT and SQR
function.
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users