Solved

tab char in db2

Posted on 2009-07-07
2
2,278 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

I don't know if many of you have made the great mistake of using the Cisco Thin Client model with the management software VXC. If you have then you are probably more then familiar with the incredibly clunky interface, the numerous work arounds, and …
In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

705 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

19 Experts available now in Live!

Get 1:1 Help Now