SPOOL file contain more than data
OK, another newbie problem
I wanted to spool the result data to a file.
I was able to get the SQL to finally work but now I am getting more that just the data in the SPOOL file. I am just expecting just the data in the SPOOL file but I am getting some of the SQLPLUS as well. Can this be stopped?
Here is what the SPOOL file contains:
SQL> set linesize 32000 trimspool on pagesize 3000
SQL> SELECT
2 to_char(c.update_date, 'FMMonth, YYYY')
3 ||'|'|| b.SHIPMENT_GID
4 ||'|'|| count (distinct (b.SHIPMENT_GID))
5 ||'|'|| count(distinct(a.i_transaction_no))
6 ||'|'|| count(*)
7 ||'|'|| sum (case when a.responding_gl_user_gid is null then 0 else 1 end)
8 ||'|'|| min (numtodsinterval((b.expected_response - b.insert_date),'day'))
9 ||'|'|| min (numtodsinterval((a.update_date - a.transaction_time),'day'))
10 ||'|'|| max (numtodsinterval((a.update_date - a.transaction_time),'day'))
11 ||'|'|| numtodsinterval((max(a.update_date) - min(a.update_date)),'day')
12 ||'|'|| numtodsinterval((max(b.shipment_time) - max(c.insert_date)),'day')
13 ||'|'|| (max(a.bid_amount) - min(a.bid_amount))
14 from tender_collab_servprov a, tender_collaboration b, shipment c
15 where a.i_transaction_no = b.i_transaction_no
16 and b.shipment_gid not in (select sqa.shipment_gid from tender_collaboration sqa, tender_collab_servprov sqb where sqa.i_transaction_no = sqb.i_transaction_no and sqb.acceptance_code = 'A')
17 and a.i_transaction_no in (select i_transaction_no from tender_collaboration where tender_type = 'Spot Bid')
18 and b.shipment_gid = c.shipment_gid
19 AND c.update_date >= trunc(last_day(to_date((to_char(add_months(SYSDATE,-2), 'MM-DD-YYYY')),'MM-DD-YYYY')) + 1)
20 group by c.update_date, b.SHIPMENT_GID
21 order by c.update_date, b.shipment_GID;
TO_CHAR(C.UPDATE_DATE,'FMMONTH,YYYY')||'|'||B.SHIPMENT_GID||'|'||COUNT(DISTINCT(B.SHIPMENT_GID))||'|'||COUNT(DISTINCT(A.I_TRANSACTION_NO))||'|'||COUNT(*)||'|'||SUM(CASEWHENA.RESPONDING_GL_USER_GIDISN
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
April, 2012|PARKER.0001004|1|1|1|0|+000000000 00:20:34.000000000||||+000000002 23:54:00.000000000|
April, 2012|PARKER.0001005|1|1|2|0|+000000000 00:13:54.000000000||||+000000002 23:57:26.000000000|
April, 2012|PARKER.0001006|1|1|1|0|+000000000 00:09:09.000000000||||+000000002 23:56:15.000000000|
April, 2012|PARKER.0001008|1|1|1|0|+000000000 00:07:40.000000000||||+000000002 23:52:42.000000000|
April, 2012|PARKER.0001013|1|1|2|0|+000000000 00:08:00.000000000||||+000000000 03:56:35.000000000|
April, 2012|PARKER.0001020|1|1|3|2|+000000000 00:02:59.000000000|+000000000 00:02:12.000000000|+000000000 00:03:04.000000000|+000000000 00:00:52.000000000|-000000000 00:03:30.000000000|6999
April, 2012|PARKER.0001026|1|1|31|9|+000000002 21:32:48.000000000|+000000000 00:01:26.000000000|+000000002 20:49:24.000000000|+000000002 20:47:58.000000000|+000000005 18:41:32.000000000|13479.0299999999999727151589468121528625
April, 2012|PARKER.0001031|1|1|31|8|+000000001 01:41:16.000000000|+000000000 00:03:08.000000000|+000000000 21:31:04.000000000|+000000000 21:27:56.000000000|+000000008 22:42:15.000000000|7044.15999999999985448084771633148193359
April, 2012|PARKER.0001032|1|1|31|6|+000000000 19:59:14.000000000|+000000000 00:04:13.000000000|+000000001 00:34:59.000000000|+000000001 00:30:46.000000000|+000000004 22:55:48.000000000|654.770000000000209183781407773494720459
April, 2012|PARKER.0001033|1|1|31|3|+000000000 03:08:25.000000000|+000000000 00:54:27.000000000|+000000000 18:26:19.000000000|+000000000 17:31:52.000000000|+000000000 18:40:40.000000000|3853.42999999999983629095368087291717529
April, 2012|PARKER.0001035|1|1|31|4|+000000000 19:02:38.000000000|+000000000 00:34:44.000000000|+000000014 22:39:06.000000000|+000000014 22:04:22.000000000|+000000001 22:48:45.000000000|781.699999999999818101059645414352416992
April, 2012|PARKER.0001036|1|1|31|7|+000000001 14:44:26.000000000|+000000000 00:02:35.000000000|+000000000 18:33:46.000000000|+000000000 18:31:11.000000000|+000000006 18:46:11.000000000|704.780000000000200088834390044212341308
April, 2012|PARKER.0001046|1|1|32|5|+000000000 03:35:01.000000000|+000000000 00:47:59.000000000|+000000000 03:36:09.000000000|+000000000 02:48:10.000000000|+000000000 17:36:18.000000000|423.710000000000036379788070917129516601
April, 2012|PARKER.238645|1|1|31|5|+000000000 20:21:53.000000000|+000000000 00:05:51.000000000|+000000001 00:59:23.000000000|+000000001 00:53:32.000000000|+000000001 22:36:08.000000000|1624.18999999999959982233121991157531738
April, 2012|PARKER.0001043|1|2|33|6|+000000000 02:57:58.000000000|+000000000 00:03:24.000000000|+000000008 00:00:09.000000000|+000000014 04:36:38.000000000|+000000026 23:57:13.000000000|470.199999999999818101059645414352416992
May, 2012|PARKER.0001051|1|1|5|2|+000000000 17:25:59.000000000|+000000000 00:07:09.000000000|+000000000 00:12:00.000000000|+000000000 00:04:52.000000000|+000000000 21:16:53.000000000|700.039999999999963620211929082870483399
16 rows selected.
SQL> spool off