views:

99

answers:

2

I am using Oracle SQL Developer.

I am using parameters &TableName

My query comes back to me in the results with an OLD: tag before it, and again with a New: tag (the variable is replaced with the value that I have typed in) and then my results follow this.

How do I get rid of this annoying return and change it to just display my results?

+2  A: 
SET SHOW OFF

Details are in the manual: http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch12040.htm#sthref2871

a_horse_with_no_name
That will prevent system variables being shown as `old:` and `new:` when issuing a `SET` command, but doesn't affect whether the query is shown with the variable name and substituted value; for that you need `VERIFY`. And it isn't supported in SQL Developer anyway, it gives `SQLPLUS Command skipped`. Useful link though.
Alex Poole
Sorry, didn't see that this was supposed to work with SQL Developer
a_horse_with_no_name
A: 

In SQL*Plus I think you mean SET VERIFY OFF. I don't have SQL Developer to hand to check it's the same but I'd imagine so.

Edited to add example and confirm it does work in SQL Developer too.

define tmpVar='test'

set verify on

select '&tmpVar' from dual;

set verify off

select '&tmpVar' from dual;

which produces:

old:select '&tmpVar' from dual
new:select 'test' from dual
'TEST' 
------ 
test   

'TEST' 
------ 
test   

The link @a_horse_with_no_name provided shows this too.

Alex Poole