Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> SQL formatting quesion re: TO_CHAR()
I have a special problem here in the school system.
The Big Bad State Education Office wants a report (1290) that looks like
this: 9003091F000120003 ^ ^ ^^^ ^ ^ (record type '9')/(filler
'003')/(grade '09')/(race code '1')/(gender 'F')/(number of records
'00012')/(school number '0003')
But I get this output:
9 003091F 00012 0003
when I use the following SQL script:
'9'|| to_char(T.SCH_CD, '000')|| T.GRD_LVL|| Student.ETHNC_CD|| Student.GENDER_CD|| to_char(COUNT(T.SDNT_ID), '00000')|| to_char(T.SCH_CD, '0000') FROM Student, Thrd_Fri_Enrl T, WAREHS.Thrd_Fri_DatesWHERE (T.SCH_CD in ('033', '032')
It appears the TO_CHAR formatting statement automatically inserts a space before the value, even if you try using concatenation. Any way around this?
Thanks in advance,
Kent
--
Kent Lewandowski
lewandow_at_uwm.edu
Intern, Graduate Assistant
Milwaukee Public Schools
-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum Received on Wed Sep 16 1998 - 14:28:55 CDT