English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I'm unloading a table within a Unix Shell Script through SQL and need the delimiter to be nothing. I want the three columns to blend together seamlessly. The reason is after the tables are unloaded we're saving them to a mainframe which needs one big long line. Any ideas? Thanks a bunch.

2006-07-14 06:50:22 · 3 answers · asked by Jason 2 in Computers & Internet Programming & Design

the table has numbers in place. when i add: Delimiter " to the end of the select line, it makes the quotation mark the delimiter. looking for now space between columns

2006-07-14 06:55:37 · update #1

I must not be making myself clear.
Three columns which have data:
1234 - EYE
5678 - EAR
9100 - NOSE
select EYE, EAR, NOSE Delimiter ??
from table1

What goes where the ?? are to get the result
123456789100

If you use:
select EYE, EAR, NOSE Delimiter '?'
from table1

your table would look like
1234?5678?9100
not what i want

2006-07-14 07:07:37 · update #2

3 answers

If its just a blank or no space and the columns are chars then just use '' as the character delimiter. For example, if I have a column name Cust_num and some are null and blank and I want to find the ones that are blank or have no data, then I would use the SQL select * from table where cust_num='' and it would bring up all the rows where the cust_num are blank and has no data string or characters. Its just two single quotation marks.

I dont know why you need to use the delimiter if you dont want a delimiter. Just concat it depending on what SQL you are using.

Example 1:
MySQL/Oracle:
SELECT CONCAT(eye, ear, nose) FROM table1

Example 2:
Oracle:
SELECT eye || ear || nose FROM table1

Example 3:
SQL Server:
SELECT eye + ear + nose FROM table1

2006-07-14 06:53:08 · answer #1 · answered by Sean I.T ? 7 · 0 1

Hi Jason,

select EYE || EAR || NOSE
from table1


Good Luck,

Telco DBA
OCP - Oracle Certified Professional 9i, 10g

Database-Whitepapers: http://www.Mercury-Consulting-ltd.com/wp/whitepapers.html
Database-Checklists: http://www.IT-Checklists.com/Database_checklists.html

2006-07-14 15:03:56 · answer #2 · answered by Anonymous · 0 0

For a good time, make the delimiter a backspace.

2006-07-14 13:55:45 · answer #3 · answered by sheeple_rancher 5 · 0 0

fedest.com, questions and answers