Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Use of Parameters instead of hardcoded values Expand / Collapse
Author
Message
Posted Friday, May 9, 2014 11:07 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Sunday, June 8, 2014 8:16 PM
Points: 6, Visits: 25
In the derived column i am defining one of the values as

v_type =

((v_provtype == "62" && (FINDSTRING(v_desc_string,"T5",1) > 0 || FINDSTRING(v_desc_string,"T6",1) > 0 || FINDSTRING(v_desc_string,"T7",1) > 0 || FINDSTRING(v_desc_string,"T8",1) > 0 || FINDSTRING(v_desc_string,"T9",1) > 0 || FINDSTRING(v_desc_string,"E8",1) > 0)) ? "60" : TRIM(v_provtype))

But, the requirement is I cannot use the hardcoded values in the above which are (T5,T6,T7,T8,T9,E8). There are stored in a table as

Select ParameterValue form dbo.common_Parameters.


How do i rewrite the above to not use the hardcoded values and instead get the values from the table.

Thanks.
Post #1569393
Posted Friday, May 9, 2014 12:56 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 12:10 AM
Points: 1,234, Visits: 3,585
A suggestion, use a Script Component in the Data Flow instead of the Derived Column.
Post #1569427
Posted Friday, May 9, 2014 5:07 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Sunday, June 8, 2014 8:16 PM
Points: 6, Visits: 25
How.... can u let me know
Post #1569476
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse