Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

Browse by Tags · View All
#SQLServer 46
SQL Server 44
SSRS EXPERT 41
BI 36
#BI 33
brh 28
SSIS BEST PRACTICES 23
TSQL 19
MS BI STACKS 18
SSRS 17

Archive · View All
March 2011 24
July 2011 17
February 2011 15
April 2010 13
June 2011 11
May 2011 11
April 2011 11
July 2010 11
March 2010 8
December 2011 7

DB2 – User defined function to convert list to table ListToTable

Mar 13 2011 2:50AM by Sherry Li   

Continuing from my previous post SSIS – Pass a list of values to a data flow source.

Step 3: create a user defined function on DB2 to convert the list of the Status IDs into rows.

Now I need to have a function on DB2 to convert the list of the Status IDs into rows.

Actually I really need 2 user defined functions.

First, I need one to create a table to tell me where each comma starts and ends.

Run this query.

SELECT * FROM TABLE(mySchema.ListToTable_IDX(’1,101,203′)) AS A

Here is the result telling me where each comma starts and ends.

Second, I need a function to return me back the actual values as rows in a table.

Run this query.

SELECT * FROM TABLE(mySchema.ListToTable(’1,101,203′)) AS A

Here is the result telling me what each value is as rows in a table.

Here is an example how you can call the user defined function in DB2.

Now if I need to use this user defined function in a data source of a data flow step from my SSIS package, taking a parameter, I would write the query link this:

Tags: ListToTable, SSIS BEST PRACTICES, LIST TO TABLE, USER DEFINED FUNCTION, DB2,


Sherry Li
14 · 12% · 3697
0
Liked
 
0
Lifesaver
 
0
Refreshed
 
0
Learned
 
0
Incorrect



Submit

Your Comment


Sign Up or Login to post a comment.

    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]