J
jackle_usmc
My query works fine if I don't use a field from frontpage.
THE CODE BELOW WORKS FINE
_____________________________________________________________________________
select distinct cod4.name, wo_number, reqst_date, wo_problem,
cod2.name, cod1.name, cod3.name
from aims.wko wo
join aims.cod cod1 on (select distinct cod1.code where
cod1.type='e')=wo.trade_emp
join aims.cod cod2 on (select distinct cod2.code where
cod2.type='a')=wo.chg_ctr
join aims.cod cod3 on (select distinct cod3.code where
cod3.type='h')=wo.facility
join aims.cod cod4 on (select cod4.code where
cod4.type='w')=wo.wo_status
where wo.tag_number='IMPAC'
order by cod4.name desc, wo.wo_number
_____________________________________________________________________________
If I use a frontpage paramenter inplace of IMPAC :tag_number:, I
get error below
Server error: Unable to retrieve schema information from the query:
SELECT * from aims.wko wo join aims.cod cod1 on (select distinct
cod1.code
against a database using the connection string
DRIVER={SQL
Server};SERVER=home_b2;DATABASE=aimsdatabase;UID=********;PWD=********
The following error message comes from the database driver software; it
may appear in a different language depending on how the driver is
configured.
-------------------------------------------------------
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 2: Incorrect syntax
near 'code'.
Source: Microsoft OLE DB Provider for ODBC Drivers
Number: -2147467259 (0x80004005)
THE CODE BELOW WORKS FINE
_____________________________________________________________________________
select distinct cod4.name, wo_number, reqst_date, wo_problem,
cod2.name, cod1.name, cod3.name
from aims.wko wo
join aims.cod cod1 on (select distinct cod1.code where
cod1.type='e')=wo.trade_emp
join aims.cod cod2 on (select distinct cod2.code where
cod2.type='a')=wo.chg_ctr
join aims.cod cod3 on (select distinct cod3.code where
cod3.type='h')=wo.facility
join aims.cod cod4 on (select cod4.code where
cod4.type='w')=wo.wo_status
where wo.tag_number='IMPAC'
order by cod4.name desc, wo.wo_number
_____________________________________________________________________________
If I use a frontpage paramenter inplace of IMPAC :tag_number:, I
get error below
Server error: Unable to retrieve schema information from the query:
SELECT * from aims.wko wo join aims.cod cod1 on (select distinct
cod1.code
against a database using the connection string
DRIVER={SQL
Server};SERVER=home_b2;DATABASE=aimsdatabase;UID=********;PWD=********
The following error message comes from the database driver software; it
may appear in a different language depending on how the driver is
configured.
-------------------------------------------------------
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 2: Incorrect syntax
near 'code'.
Source: Microsoft OLE DB Provider for ODBC Drivers
Number: -2147467259 (0x80004005)