473,397 Members | 1,974 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Help Needed in formatting output data !!

Can anyone of you let me knw how to obtain the output flat file in the below format ?

"ID"|"NAME"|"PARENT_ID"
"NQ TEL"|"14"|"Macetown"

But I am gettin the output.. as below.

VENDOR_NAME||'|'||VENDOR_ID||'|'||CITY
----------------------------------------------------------------------------------------------------
NQ TEL|14|Macetown
NA TEL|14|Molokai


I am using the followin script :
set heading on
set echo off
set feedback off
spool Y:\Spool\output1.txt

select Vendor_Name || '|' || Vendor_ID || '|' || City from vendor where city like 'Mo%';

spool off;
set feedback on
set echo on
set heading on



Can anyone help me on this.? In Addition to this, I also need to remove the line separating Header and the Data .
Thanks a ton. :)
Oct 16 '07 #1
1 1059
amitpatel66
2,367 Expert 2GB
Can anyone of you let me knw how to obtain the output flat file in the below format ?

"ID"|"NAME"|"PARENT_ID"
"NQ TEL"|"14"|"Macetown"

But I am gettin the output.. as below.

VENDOR_NAME||'|'||VENDOR_ID||'|'||CITY
----------------------------------------------------------------------------------------------------
NQ TEL|14|Macetown
NA TEL|14|Molokai


I am using the followin script :
set heading on
set echo off
set feedback off
spool Y:\Spool\output1.txt

select Vendor_Name || '|' || Vendor_ID || '|' || City from vendor where city like 'Mo%';

spool off;
set feedback on
set echo on
set heading on



Can anyone help me on this.? In Addition to this, I also need to remove the line separating Header and the Data .
Thanks a ton. :)
Place the below code in a sql file and execute:

Expand|Select|Wrap|Line Numbers
  1.  
  2. SET ECHO OFF
  3. SET FEEDBACK OFF
  4. SET TERMOUT OFF
  5. SET VERIFY OFF
  6. SET HEADING OFF
  7.  
  8. SPOOL c:\a.txt
  9.  
  10. ttitle '"ID"|"NAME"|"PARENT_ID"' LEFT
  11. select  CHR(34)||Vendor_Name||CHR(34)|| '|' ||CHR(34)||Vendor_ID||CHR(34)|| '|' ||CHR(34)||City||CHR(34) from  vendor where city like 'Mo%';
  12.  
  13. SPOOL OFF
  14.  
  15.  
Oct 16 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
6
by: Jamal | last post by:
I am working on binary files of struct ACTIONS I have a recursive qsort/mergesort hybrid that 1) i'm not a 100% sure works correctly 2) would like to convert to iteration Any comments or...
8
by: Mike MacSween | last post by:
tblCourses one to many to tblEvents. A course may have an intro workshop (a type of event), a mid course workshop, a final exam. Or any combination. Or something different in the future. At...
7
by: BBFrost | last post by:
I'm receiving decimal values from database queries and placing them on a report page. The users want to see the following .... Db Value Display Value 123.3400 123.34...
2
by: mike | last post by:
Hi I am trying to setup a timesheet app. However I have come up against an unexpected problem (possibly fatal) I cannot seem to find a field type in postgres that is equivalent to h:mm without...
0
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
2
by: rookiejavadude | last post by:
I'm have most of my java script done but can not figure out how to add a few buttons. I need to add a delete and add buttong to my existing java program. Not sure were to add it on how. Can anyone...
5
by: Icarus - iD_Ten_T helper | last post by:
First of all, my apologies if this should be in a php newsgroup and not here, but I thought this the best place to start. I want to parse the text from a <textareaform element but when I pass...
1
by: mik357 | last post by:
Hello all, I just started using SQL to create a report. I got the syntax working but I have absolutely no idea of how to format data. Can anyone kindly look at my code and help me? I thank you...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.