Subject | Re: Token unknown - SUSPEND/END |
---|---|
Author | Ghanshyam |
Post date | 2003-07-10T11:32:57Z |
Here's the code ---
FOR
SELECT CAST(tblcountry.country || '/' || tblstate.state || '/'
|| tblcounty.county AS VARCHAR(250) ) AS
location ,tblcounty.countyid AS locid ,'1' AS name
FROM tblcounty,tblstate,tblcountry WHERE tblcountry.countryid =
tblstate.countryid AND
tblcounty.stateid = tblstate.stateid AND countyid IN
(SELECT tblcounty.countyid FROM tblcounty,tbltaxcounty WHERE
tblcounty.countyid = tbltaxcounty.countyid AND
tbltaxcounty.taxid=:taxno )
UNION SELECT CAST(tblcountry.country || '/' || tblstate.state AS
VARCHAR(250)) AS location ,tblstate.stateid AS locid ,'2' AS state
FROM tblstate,tblcountry WHERE tblcountry.countryid =
tblstate.countryid AND
tblstate.stateid IN ( SELECT tblstate.stateid FROM
tblstate,tbltaxstate WHERE tblstate.stateid = tbltaxstate.stateid AND
tbltaxstate.taxid=:taxno)
UNION
SELECT CAST(tblcountry.country AS VARCHAR(250)) ,countryid AS
locid ,'3' AS country FROM tblcountry WHERE countryid IN ( SELECT
tblcountry.countryid FROM tblcountry,tbltaxcountry WHERE
tblcountry.countryid = tbltaxcountry.countryid AND
tbltaxcountry.taxid=5)
INTO :location, :locid, :name
DO
FOR
SELECT CAST(tblcountry.country || '/' || tblstate.state || '/'
|| tblcounty.county AS VARCHAR(250) ) AS
location ,tblcounty.countyid AS locid ,'1' AS name
FROM tblcounty,tblstate,tblcountry WHERE tblcountry.countryid =
tblstate.countryid AND
tblcounty.stateid = tblstate.stateid AND countyid IN
(SELECT tblcounty.countyid FROM tblcounty,tbltaxcounty WHERE
tblcounty.countyid = tbltaxcounty.countyid AND
tbltaxcounty.taxid=:taxno )
UNION SELECT CAST(tblcountry.country || '/' || tblstate.state AS
VARCHAR(250)) AS location ,tblstate.stateid AS locid ,'2' AS state
FROM tblstate,tblcountry WHERE tblcountry.countryid =
tblstate.countryid AND
tblstate.stateid IN ( SELECT tblstate.stateid FROM
tblstate,tbltaxstate WHERE tblstate.stateid = tbltaxstate.stateid AND
tbltaxstate.taxid=:taxno)
UNION
SELECT CAST(tblcountry.country AS VARCHAR(250)) ,countryid AS
locid ,'3' AS country FROM tblcountry WHERE countryid IN ( SELECT
tblcountry.countryid FROM tblcountry,tbltaxcountry WHERE
tblcountry.countryid = tbltaxcountry.countryid AND
tbltaxcountry.taxid=5)
INTO :location, :locid, :name
DO