View previous topic :: View next topic |
Author |
Message |
yadav2005 Intermediate

Joined: 10 Jan 2005 Posts: 348 Topics: 144
|
Posted: Fri Feb 09, 2007 1:28 pm Post subject: insert spaces between columns |
|
|
I want to unload data from a DB2 Table to a dataset and i am writing my query as :
Code: |
SELECT EMPNO,EMPNAME FROM TABLENAME;
|
EMPNO CHAR(06)
EMPNAME CHAR(24)
so my unload dataset will have LRECL as 32 because initially one filler will be introduced and then one more filler will be introduced after enpmo so total = 1 + 6 + 1 + 24 = 32 = LRECL.
Now want i want is i want to introduce 10 spaces between EMPNO and EMPNAME ? Please help me how can i write a query which will introduce 10 spaces between EMPNO and EMPNAME .I have one solution is download to a temp dataset and then make of SORT utility to introduce 10X and then form the dataset.Please let me know how to solve the problem. |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Fri Feb 09, 2007 2:30 pm Post subject: |
|
|
Code: |
SELECT EMPNO
, CHAR(' ')
, EMPNAME
FROM TABLENAME;
|
with 9 spaces between the quotes. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Fri Feb 09, 2007 5:11 pm Post subject: |
|
|
thx for the syntax tip! dbz _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
|
|