Hi all,
My job design is
ODBC------>Trans---------->SeqFile.
I'm getting the dates as output.I won't recquired all the dates as out put.Among all i need only Max and Min dates.
Pls help me how to do this?
Thanks in advance
How to minimise the output?
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 92
- Joined: Mon May 07, 2007 4:26 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 92
- Joined: Mon May 07, 2007 4:26 am
Hi all,
In source i'm having only one column.
This is my query pls check it
WITH DATES AS(
SELECT MIN(XX_MA_DT) STRT_DT,MAX(XX_MA_DT) END_DT
FROM
(SELECT DISTINCT XX_MA_DT
FROM EMP.T1
WHERE T1.XX_MX_DT < CURRENT DATE
ORDER BY XX_MA_DT DESC
FETCH FIRST 13 ROWS ONLY) TMP).
I'm having only XX_MA_DT this column. I'm not having the STRT_DT and
END_DT.
I need only Max and Min dates as out put.
Pls help me what are the stages recquired and what should i do ?
Thanks in advance
In source i'm having only one column.
This is my query pls check it
WITH DATES AS(
SELECT MIN(XX_MA_DT) STRT_DT,MAX(XX_MA_DT) END_DT
FROM
(SELECT DISTINCT XX_MA_DT
FROM EMP.T1
WHERE T1.XX_MX_DT < CURRENT DATE
ORDER BY XX_MA_DT DESC
FETCH FIRST 13 ROWS ONLY) TMP).
I'm having only XX_MA_DT this column. I'm not having the STRT_DT and
END_DT.
I need only Max and Min dates as out put.
Pls help me what are the stages recquired and what should i do ?
Thanks in advance
-
- Participant
- Posts: 92
- Joined: Mon May 07, 2007 4:26 am
Hi all,
In source i'm having only one column.
This is my query pls check it
WITH DATES AS(
SELECT MIN(XX_MA_DT) STRT_DT,MAX(XX_MA_DT) END_DT
FROM
(SELECT DISTINCT XX_MA_DT
FROM EMP.T1
WHERE T1.XX_MX_DT < CURRENT DATE
ORDER BY XX_MA_DT DESC
FETCH FIRST 13 ROWS ONLY) TMP).
I'm having only XX_MA_DT this column. I'm not having the STRT_DT and
END_DT.
I need only Max and Min dates as out put.
Pls help me what are the stages recquired and what should i do ?
Thanks in advance
In source i'm having only one column.
This is my query pls check it
WITH DATES AS(
SELECT MIN(XX_MA_DT) STRT_DT,MAX(XX_MA_DT) END_DT
FROM
(SELECT DISTINCT XX_MA_DT
FROM EMP.T1
WHERE T1.XX_MX_DT < CURRENT DATE
ORDER BY XX_MA_DT DESC
FETCH FIRST 13 ROWS ONLY) TMP).
I'm having only XX_MA_DT this column. I'm not having the STRT_DT and
END_DT.
I need only Max and Min dates as out put.
Pls help me what are the stages recquired and what should i do ?
Thanks in advance
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You could wrap that SQL in another SELECT statement to form the MIN and MAX of XX_MA_DT.
You could use an Aggregator stage to form the MIN and MAX.
You could use stage variables in a Transformer stage.
There's three ways, just off the top of my head.
You could use an Aggregator stage to form the MIN and MAX.
You could use stage variables in a Transformer stage.
There's three ways, just off the top of my head.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 92
- Joined: Mon May 07, 2007 4:26 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: