Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Quick sqlplus cr/lf question
"BD" <robert.drea_at_gmail.com> wrote in message
news:1154713578.174703.72910_at_p79g2000cwp.googlegroups.com...
:> you don't have any sql posted that includes chr(10), so that problem
can't
: > be diagnoses
:
: Ah yes - well, I tried _exactly_ what you had suggested, including the
: pipes. Here's the line I used, and the result:
:
: --SELECT STATEMENT
: select '*********************' || chr(10) ||,
: 'TRAINING SLICE COUNTS' || chr(10) ||,
: '*********************' || chr(10)
: from dual;
: ---------------------------------------
: -ERROR
: select '*********************' || chr(10) ||,
: *
: ERROR at line 1:
: ORA-00936: missing expression
: ---------------------------------------
umm, it wasn't my suggestion. and there is a typo in it (which is a good reason to not rely on cutting and pasting code without understanding what it's doing)
have you looked up the concatenation operator (||)? it requires two
expressions, as in a||b
ORA-00936 is telling you that you're missing an expression, and SQL*Plus is
showing you exactly where oracle thinks the problem is (in a fixed font, you
can seee the asterisk is right below the comma -- try removing the comma so
that the syntax for the concatenation operator is correct.
:
: BUT - the 'prompt' works, and does make more sense. Thanks for that.
realize that PROMPT is a SQL*Plus command -- don't try to start using it in
PL/SQL or in with other tools
:
: > not sure waht you mean by _both_ defined headers or what you mean by
: > pagebreak headers
:
: As to the headers: here is what I _want_ to see:
:
: *********************
: TRAINING SLICE COUNTS
: *********************
:
: Owner Table USER1 USER2
: ---------- ------------------------------ ----------- ----------
: SCHEMA1 TB_ACCOUNT 189 194
: SCHEMA2 TB_ACCOUNTINFO 189 194
: .
: .
: .
: --UNTIL END OF DATA
:
:
: With no 'set pagesize' line, I get that, but after 63 lines of data,
: the 'Owner', 'Table' and two USER headers appear again. I believe I see
: why they do, in that this would seem to be the 'page break' point in
: the output. But if I put 'set pagesize 0', or 'set pagesize <any
: value>, I see the following:
:
: *********************
: TRAINING SLICE COUNTS
: *********************
: SCHEMA1 TB_ACCOUNT 189 194
: SCHEMA2 TB_ACCOUNTINFO 189 194
: .
: .
: .
: .
: --UNTIL END OF DATA
:
: In other words, the headers which I defined with my 'column' statements
: are simply not there - even at the very top. Granted, the data in the
: report appears uninterrupted by a repeat of the column header
: information... but it's not quite what I'd like.
:
: This is not a BIG deal, and I'll take the repeating headers over no
: headers. But ideally, for the purposes of my reporting, I would like to
: see them once - ONLY once. ;)
:
what are you actually putting in for <any value>?
this is typical syntax and has worked for about 20 years or so:
set pagesize 50000
select * From all_users
/
(50000 is the max, at least in v10 -- don't remember if it's been changes since v2)
++ mcs Received on Fri Aug 04 2006 - 13:57:48 CDT
![]() |
![]() |