Scott Huerta
2009-06-21 17:59:28 UTC
InfoMaker 9.0.2.7509
ASA 8.0.2.4454
I have the following SQL command working correctly in Sybase Central
(ISQL) but when I try to run it in InfoMaker I get an error message
that states "Host variable may not be used in a batch.".
The SQL command is:
if :sLevel='a' then
select count(i.SysId)
from Invoice i
Join Schedules s on s.SysId=i.SysSchedId
Join Account a on a.SysId=i.SysAcctId
where s.PurchDate between MakeDay01(:dMonth) and MakeEOM(:dMonth)
and a.AcctId=:sId
elseif :sLevel='d' then
select count(i.SysId)
from Invoice i
Join Schedules s on s.SysId=i.SysSchedId
Join Account a on a.SysId=i.SysAcctId
Join Debtor d on d.SysId=a.SysDtrId
where s.PurchDate between MakeDay01(:dMonth) and MakeEOM(:dMonth)
and d.DebtorId=:sId
end if
Is this not supported in InfoMaker?
Bottom-line, what I'm trying to do is have one report versus several
reports that executes a different SQL statement based on one of the
retrieval argument's value.
What am I doing wrong or is this not possible?
Thanks in advance,
Scott Huerta
(3i Infotech)
Scott Huerta
3i Infotech (formerly Distinctive Solutions Corp.)
ASA 8.0.2.4454
I have the following SQL command working correctly in Sybase Central
(ISQL) but when I try to run it in InfoMaker I get an error message
that states "Host variable may not be used in a batch.".
The SQL command is:
if :sLevel='a' then
select count(i.SysId)
from Invoice i
Join Schedules s on s.SysId=i.SysSchedId
Join Account a on a.SysId=i.SysAcctId
where s.PurchDate between MakeDay01(:dMonth) and MakeEOM(:dMonth)
and a.AcctId=:sId
elseif :sLevel='d' then
select count(i.SysId)
from Invoice i
Join Schedules s on s.SysId=i.SysSchedId
Join Account a on a.SysId=i.SysAcctId
Join Debtor d on d.SysId=a.SysDtrId
where s.PurchDate between MakeDay01(:dMonth) and MakeEOM(:dMonth)
and d.DebtorId=:sId
end if
Is this not supported in InfoMaker?
Bottom-line, what I'm trying to do is have one report versus several
reports that executes a different SQL statement based on one of the
retrieval argument's value.
What am I doing wrong or is this not possible?
Thanks in advance,
Scott Huerta
(3i Infotech)
Scott Huerta
3i Infotech (formerly Distinctive Solutions Corp.)