Alias parameters in SSIS
Asked Answered
B

2

8

I am using an OLE DB command in SSIS for which the SQL command looks like this:

UPDATE DBO.CLIENT
SET
    TimeZoneID = ?,
    DaylightSavingTime = ?,
    ModifiedBy = ?,
    MicrosPropertyID = ?,
    IsOffline = ?,
    GlobalReporting_MaskPatronNumberType = ?,
    GlobalReporting_PatronNumberReadableCharacters = ?,
    GlobalReporting_MaskPrimaryCardType = ?,
    GlobalReporting_PrimaryCardReadableCharacters = ?,
    BICAddedDateTime = ?,
    BICUpdatedDateTime = ?,
    IsDBInDailyBoardRate = ?
WHERE 
    ClientID = ?

When I try to do the column mappings, these parameters show up as PARAM_0, PARAM_1, PARAM_2, PARAM_3, etc. Is there a way to get them to show up as the column name?

Brusquerie answered 16/7, 2009 at 12:50 Comment(0)
B
5

I found that SSIS will read column names from a stored procedure instead of the SQL command for the OLE DB command!

It will however, not ignore the @ for the parameter name and therefore the intelligent matching does not work for CustomerId vs. @CustomerId.

+1 for everybody that uses Stored Procs. :-)

Brusquerie answered 20/7, 2009 at 17:13 Comment(0)
G
3

You can rename them manually in the Input/Output Properties tab (they reside under "External Columns"), but they will always instantiate to PARAM_0, PARAM_1, ...

Grayish answered 16/7, 2009 at 14:40 Comment(4)
@Eric: SSIS 2008 does not allow me to change the name.Brusquerie
@Tapori: You're right, I was thinking the OLEDB Source. Updated to reflect the OLEDB Command task.Grayish
@Eric: If you use a stored procedure instead of a SQL command, SSIS recognizes the parameters and pulls them in by name instead of PARAM_0, 1, etc. I will try what you suggested right away.Brusquerie
@Eric: I found a bug in SSIS. I can rename it, but if I close and reopen SSIS, it comes back to it's original name.Brusquerie

© 2022 - 2024 — McMap. All rights reserved.