Hi Norm,
I think I got your recommended changes added correctly. I ended up with this:
loop
vColumns := vColumns ||
’ when "’
|| y.column_name ||
-- vColumns := vColumns || ' when ' || y.column_name ||
-- q'< like sys_context('userenv','client_info') then >' ||
q'<" like sys_context('userenv','client_info') then >'
||
q'< '>'
|| y.column_name ||
q’<’>’;
vWhereClause := vWhereClause ||
’ or ’
|| y.column_name ||
q'< like sys_context('userenv','client_info') >';
if
(vDebug)
then
***dbms_output.put_line***(' COLUMN: '
|| y.column_name);
end
if;
end
loop;
However, the script failed in my test sandbox environment, which includes a new table that only a low-life would appreciate. Here is a quickie script to create this table and insert one row:
CREATE
TABLE
“Mixed Case Madness”
(
PROGRAM VARCHAR2(50
BYTE),
"PROgramTest" VARCHAR2(50
BYTE),
"Comments WITH fugly spaces"
VARCHAR2(50
BYTE)
);
insert
into
“Mixed Case Madness”
(PROGRAM,
“PROgramTest”,
“Comments WITH fugly spaces”)
values
(‘Hickory’,
‘Dickery’,
‘Dock’);
commit;
select
*
from
“Mixed Case Madness”;
select
*
from
table(normSearch.textSearch(‘TGW7078’,
‘Dock’,
pDEBUG=>‘Y’));
– drop table “Mixed Case Madness” purge;
The output of running a search with the debug switch looks like that shown below.
It looks like the column names are properly quoted in the SELECT clause, but the table name and the columns are not properly quoted in the FROM or WHERE clauses:
After adding the indicated double quotes, this query runs correctly:
Tom
From: Norm [TeamT] [mailto:bounce-NormTeamT@toadworld.com]
Sent: Wednesday, April 26, 2017 2:06 PM
To: toadoracle@toadworld.com
Subject: RE: [Toad for Oracle - Discussion Forum] Line Numbers for PL/SQL code
RE: Line Numbers for PL/SQL code
Reply by Norm [TeamT]
Sorry, ignore the double quote added at the end of the second line of the loop, it’s already there in the lines I didn’t copy and paste. There should not a a double quote before the text >’ ||.
To reply, please reply-all to this email.
Stop receiving emails on this subject.
Or
Unsubscribe from Toad for Oracle Forum notifications altogether.
Toad for Oracle - Discussion Forum
Flag
this post as spam/abuse.