Solved

tab char in db2

Posted on 2009-07-07
2
2,352 Views
Last Modified: 2013-12-06
I want to concat a tab char in a DB2 sql statement..... Any ideas ???
db2 "select c.nombre,'\t',pel.nombre,'\t',prog.fecha,'\t',prog.hora from tableA as c, tableB as prog, tableC as pel where c.field1=prog.field1 and pel.field2= prog.field2 and prog.field2 in(3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,19,20,40,41,42,43,44,74,98,104,112,130,132,135,136,145,   154,155,168,169,171,178,180,188,189,190,191,192,193) and prog.field3 >=current date order by c.nombre asc"

Open in new window

0
Comment
Question by:vcarrillor
2 Comments
 
LVL 45

Accepted Solution

by:
Kdo earned 500 total points
ID: 24797005

Hi vcarrillor,

The '\t' signature isn't universal, and DB2 doesn't use it.  use chr(9) instead.

SELECT name, chr(10), .....


Good Luck,
Kent
0
 
LVL 37

Expert Comment

by:momi_sabag
ID: 24797469
it depends on the platform you are using
and on the character set
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction How to create multiboot configuration with XP\Vista and Windows 7 on it? And most important question - how to do this correctly so not to have any kind of nightmares we get when system gets screwed? First of all one should realize t…
Sometimes a user will call me frantically, explaining that something has gone wrong and they have tried everything (read - they have messed it up more and now need someone to clean up) and it still does no good, can I help them?!  Usually the standa…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now