December 2, 2008 at 12:24 am
hi i have a Source table in SSIS Package which has a column.
Product
052433779 - MONIACK CASTLE BLK CHERRY WINE 75CL
053568969 - MONIACK MEAD 75CL
059401426 - VIA CAPPELLA PINOT GRIGIO 75CL
now i want to Create two colomn on the basis of this column by usisng Derived Column in SSIS Package.
So that new colomn will have
Product_Code Product_Desc
052433779 MONIACK CASTLE BLK CHERRY WINE 75CL
053568969 MONIACK MEAD 75CL
059401426 VIA CAPPELLA PINOT GRIGIO 75CL
Please Provide the Function(String)/Method which i can use ,, in Dervied Column Wizard.
Pleae help.
December 2, 2008 at 7:35 am
Well, based on the data you have provided, you could do a couple of things:
Product_Code: substring(Product, 1, Findstring(Product, " - ", 1) - 1)
Product_Desc: SUBSTRING(product,FINDSTRING(product," - ",1) + 3,LEN(product))
2. If the length of the Product_Code is constant then you could do this:
Product Code: SUBSTRING(product,1,9)
Product Desc: RIGHT(product,LEN(product) - 12)
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
December 4, 2008 at 4:41 am
thanks a lot buddy...
it worked smoothly
🙂
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply