Thanks Guys for your input.... Sorry for the late reply. Finally I did it with programatically using assential datastage. I am using db2 ver 8.0 on aix
Hello,
I have a table which contains following data.
TableA:
ColumnA ColumnB
A1 C1
A1 C2
A2 C3
A2 C4
I need to build query which give me follwing output :
A1 C1:C2
A2 C3:C4
Can someone help me out.
Thanks,
Ram
Hello,
I have a table which contains following data.
TableA:
ColumnA ColumnB
A1 C1
A1 C2
A2 C3
A2 C4
I need to build query which give me follwing output :
A1 C1:C2
A2 C3:C4
Can someone help me out.
Thanks,
Ram
Hello,
I have a table which contains following data.
TableA:
ColumnA ColumnB
A1 C1
A1 C2
A2 C3
A2 C4
I need to build query which give me follwing output :
A1 C1:C2
A2 C3:C4
Can someone help me out.
Thanks,
Ram
Hi,
I have a following sample source file. How do I extract data as target table as shown
format. I will appreciate if some one help me in this.
Source File:
Customer: 111
Product code Product Description Amount
A123 ABC 100.00
B123...
Friends,
table A
Product_id Product_Category PRICE
1 A 10
2 A 2
3 A 3
4 B 23
5 C 12
6 D 56
7 A 23
8 A 23
9 C 34
10 D 67
table B
Product_id Product_Category PRICE Expected Result for Price
1 A 0 10
2 A 0 2
3 A 0 3
4 B 0
5 C 0
6 D 0...
It's not working because it will prefix '0' at start of number.
NOTE : INT_AMOUNT = NUMERIC(13,2)
Select AMOUNT,char(amount),length(char(amount)) from TABLE_NAME
RESULT
-1200000.00,-00001200000.00,15
-766799.03,-00000766799.03,15
-400000.00,-00000400000.00,15
-343663.97,-00000343663.97,15...
How do I find lenght of Numeric field in db2...???
For eg.
Amount Length (Expected Result)
-10202.343 10
19192222.44 11
-292.392 8
Thanks in advance
Ram
Hi,
I am new to datastage. I have following two simple question
1) How do I use not like function in datastage
for eg.
DB2:
table_name.column_name1 not like '%AB%'
datastage:
??
Thanks
Ram
What is equivalent of Oracle rownum in db2 ?
for eg.
Create tabe dept
(
deptno number(8)
deptname char(10)
loc char(10)
seq_no nummber(8)
)
insert into dept(deptno,deptname,loc,seq_no)
select dept_no,
deptname,
loc...
Hi,
How can I write a select statement that will retrieve last monday's date without knowing what today's date is? I know that if today where monday and I wanted to know last monday's date, I could just subtract 7 from today's date. If today were Tuesday, I could subtract 8 and so forth. But is...
Hi,
SQL : Select MAX( business_start ) AS business_start
from calendar
output : 2004-09-01
I need date in 'Sep 01,2004' format in db2. How do I modify above sql to get me this result
Thanks in advance.
Greg,
thanks for the reply. My question is how do I convert
date into 'Mon DD, YYYY' format.
Oracle:
to_char(calendar.business_start ,'Mon DD,YYYY')
Db2 : ??
thanks,
ram
Thank you very much. It worked
I have another similar sql with left outer join and
equi join. Do you know how do I write this:
Oracle :
========
Select T1.COL1,
T2.COL1,
T3.COL1,
SUM(T2.COL2)
FROM T1,
( SELECT MAX(DAY) FROM CALENDAR) CALENDAR,
T2,
T3
WHERE...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.