Hi all,
For a DTS transformation I would like to use the following query as source:
select
(select top 1 extnrwg_060 FROM werkgever_060 where intnrwg_060 = intnrwg_250) as extwgnr,
factuurnr_250,
factuurperiode_251,
datepart(year,factuurdatum_250) as jaar,
datepart(month,factuurdatum_250) as maand,
datepart(day,factuurdatum_250) as dag,
facturatiecode_251,
bedrag_251
from facturatiehoofd_250
INNER JOIN facturatiedetail_251 ON factuurnr_251 = factuurnr_250
where
(facturatiecode_251 in (91001,91100,91101,92001,92002,92003,92004,92005,92006,92007,92008,92009,92010,92011,92100,93001,94001,95001,96001))
and factuurnr_250 > ?
and factuursoort_250='F'
When I try to add the parameter (or try to parse the query) I get a 'Column Name Invalid' error on the factuurnr_250 column. When I remove the question mark and replace it with a nr, the query parses just fine.
What am I doing wrong?
For a DTS transformation I would like to use the following query as source:
select
(select top 1 extnrwg_060 FROM werkgever_060 where intnrwg_060 = intnrwg_250) as extwgnr,
factuurnr_250,
factuurperiode_251,
datepart(year,factuurdatum_250) as jaar,
datepart(month,factuurdatum_250) as maand,
datepart(day,factuurdatum_250) as dag,
facturatiecode_251,
bedrag_251
from facturatiehoofd_250
INNER JOIN facturatiedetail_251 ON factuurnr_251 = factuurnr_250
where
(facturatiecode_251 in (91001,91100,91101,92001,92002,92003,92004,92005,92006,92007,92008,92009,92010,92011,92100,93001,94001,95001,96001))
and factuurnr_250 > ?
and factuursoort_250='F'
When I try to add the parameter (or try to parse the query) I get a 'Column Name Invalid' error on the factuurnr_250 column. When I remove the question mark and replace it with a nr, the query parses just fine.
What am I doing wrong?