chulett wrote:Build the pieces with separate expressions concatenated together:
Code: Select all
Isnull(Lnk_Cpy_Ds.Ph1) OR (Lnk_Cpy_Ds.Ph1) = '000' Then '' Else '(' : Trim(Lnk_Cpy_Ds.Ph1) ...[/quote] Thank you. I will try it.
Search found 154 matches
- Fri Jun 07, 2013 4:54 pm
- Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
- Topic: Phone Number Format
- Replies: 2
- Views: 2397
- Fri Jun 07, 2013 11:14 am
- Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
- Topic: Phone Number Format
- Replies: 2
- Views: 2397
Phone Number Format
Hello: Can somebody help with the below query. It works fine. BUT shows ( ) - EXT if Null I need it to NOT SHOW ( ) - EXT if these fields are blank or null IF Isnull(Lnk_Cpy_Ds.Ph1) OR (Lnk_Cpy_Ds.Ph1) = '000' AND Isnull(Lnk_Cpy_Ds.Ph2) OR (Lnk_Cpy_Ds.Ph2) = '000' AND Isnull(Lnk_Cpy_Ds.Ph3) OR (Lnk_...
- Thu May 30, 2013 3:41 pm
- Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
- Topic: Need to Perform Logic in Transformer
- Replies: 22
- Views: 9536
- Thu May 30, 2013 1:06 pm
- Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
- Topic: Need to Perform Logic in Transformer
- Replies: 22
- Views: 9536
- Thu May 30, 2013 1:00 pm
- Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
- Topic: Conversion Logic in Transformer
- Replies: 1
- Views: 1375
Conversion Logic in Transformer
Hello: Need help with what functions to use in Datastage to replace DB2 functions in the below query. DB2 query: SUBSTR ( TRANSLATE (COL, SUBSTR (COL, 5, 1), ' '), 5, 1) || SUBSTR (RIGHT ('0' || RTRIM ( CHAR ( LENGTH (RTRIM (COL)))), 2), 2, 1) || Ex: SUBSTR using LEFT TRANSLATE should I use CONVERT?...
- Thu May 30, 2013 12:02 pm
- Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
- Topic: Need to Perform Logic in Transformer
- Replies: 22
- Views: 9536
- Thu May 30, 2013 10:59 am
- Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
- Topic: Need to Perform Logic in Transformer
- Replies: 22
- Views: 9536
I tried to do the following in the stage variable: If NOT AlNum(LEFT(Lnk_Extract_Xrfm.MEMBNO,3)) then LEFT(Lnk_Extract_Xrfm.MEMBNO,3) Else If NOT AlNum(LEFT(Lnk_Extract_Xrfm.MEMBNO,2)) Then LEFT(Lnk_Extract_Xrfm.MEMBNO,2) ELSE IF NOT AlNum(LEFT(Lnk_Extract_Xrfm.MEMBNO,1)) Then LEFT(Lnk_Extract_Xrfm....
- Wed May 29, 2013 6:38 pm
- Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
- Topic: Need to Perform Logic in Transformer
- Replies: 22
- Views: 9536
- Wed May 29, 2013 2:44 pm
- Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
- Topic: Need to Perform Logic in Transformer
- Replies: 22
- Views: 9536
- Wed May 29, 2013 2:34 pm
- Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
- Topic: Need to Perform Logic in Transformer
- Replies: 22
- Views: 9536
Oh Sorry. This field MNO is a VARCHAR of length 15 and has no delimiters in it. It is a combination of Characters and Numbers. So if the first 3 fields are Character then we need to extract it to create a Prefix. Need to select Positions that are not Numeric. If all positions are numeric the Prefix ...
- Wed May 29, 2013 1:37 pm
- Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
- Topic: Need to Perform Logic in Transformer
- Replies: 22
- Views: 9536
- Wed May 29, 2013 12:24 pm
- Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
- Topic: Need to Perform Logic in Transformer
- Replies: 22
- Views: 9536
Need to Perform Logic in Transformer
Hello: Need to Perform the following logic in Transformer: If NOT SUBSTR(MNO,1,1) BETWEEN ''0'' AND ''9'' AND NOT SUBSTR(MNO,2,1) BETWEEN ''0'' AND ''9'' AND NOT SUBSTR(MNO,3,1) BETWEEN ''0'' AND ''9'' THEN SUBSTR(MNO,1,3) WHEN NOT SUBSTR(MNO,1,1) BETWEEN ''0'' AND ''9'' AND NOT SUBSTR(MNO,2,1) BETW...
- Tue May 03, 2011 12:51 pm
- Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
- Topic: Source table has 3 columns and target table has 1 column
- Replies: 5
- Views: 3974
Hello Create 3 stage variables (no need of split and collect the data ) 1)if not(isnull(ColumnA1)) Then ColumnA1 Else if not(isnull(ColumnA2)) Then ColumnA2 Else ColumnA3 Else 0= StgA 2)if not(isnull(ColumnB1)) Then ColumnB1 Else if not(isnull(ColumnB2)) Then ColumnB2 Else ColumnB3 Else 0 = StgB 2)...
- Tue May 03, 2011 7:03 am
- Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
- Topic: Source table has 3 columns and target table has 1 column
- Replies: 5
- Views: 3974
What is the mapping to each of the target columns? You're doing way too much work, but we need to know what has to go into each target column before being able to help further. The mapping to the Target col is: - Populate this element (COL_A) with either COL_A1, COL_A2,COL_A3 if the value is not nu...
- Mon May 02, 2011 6:58 pm
- Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
- Topic: Source table has 3 columns and target table has 1 column
- Replies: 5
- Views: 3974
Source table has 3 columns and target table has 1 column
Hello: I have a source table with 9 columns and Target table with 3 columns. These are date columns which are nullable columns. On source side they are Varchar and Target its a date field. So my SOURCE table has 9 Columns COL_A1, (NULLABLE) COL_A2, (NULLABLE) COL_A3, (NULLABLE) COL_B1, (NULLABLE) CO...