Wednesday, March 21, 2012

Excel (source) and parameters ?

I want to query my excel source sheet with a paramater so i create a sql statement like

select * from xxx where name like 'fred%'

Then I want to parameterise it with

select * from xxx where name like @.Name or select * from xxx where name like ?

both allow me to map the Parameter neither syntax works in the data flow or preview but ? still works in the build query window !

Anyone know the correct Param declaration for the Excel Source (i believe it should be oledb @.Name declaration ?

is this a bug or am i missing something here ...

Cheers

Colin

Colin,

Could you provide more details about the error you are receiving and data type of the column you are mapping the parameter to?

I just did a quick test and was able to run a query with a parameter out of a Excel. The query looks like:

SELECT SurrogateKey, DatabaseSource, Acct
FROM ['YTD AP Trans$']
WHERE (RowNumber >?)

The parameter mapping is: Parameter0 --> User: FilterVariable

FilterVAriable is a package Variable string and its values is '10' (yes the quotes are part of the variable value)

Rafael Salas

|||

my actual param was called @.venue, when i left it as param 0 it worked ok.

I deleted the params from the property browser, recreated the parameter left the name parameter0 and it worked ok

thanks for posting

No comments:

Post a Comment