472,805 Members | 3,554 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,805 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 1041
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: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

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.