473,624 Members | 2,025 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

iSQL*Plus bug with substitution variable?! (9.2.0.1.0)

I am trying to learn iSQL*Plus for the 1Z0-007 exam. I am having a bit of
problems with the substitution variables. My understanding was that they
behave as in SQL*Plus, but my experiments beg to differ.

I log on to the sample schema 'hr' and enter the following statements:

-- statements begin
set verify on
define name = K%

select last_name
from employees
where last_name like '&name'
-- statements end

When I click the 'Execute'-button, I am prompted for the value of the 'name'
substitution variable. Regardless of what I enter, the result is:

-- iSQL*Plus output begin
old 3: where last_name like '&name'
new 3: where last_name like 'K%'
LAST_NAME
King
Kochhar
Khoo
Kaufling
King
Kumar

6 rows selected.
-- iSQL*Plus output end

So my entered value is discarded and the value explicitly defined is always
used, very strange! When executing the same statements in SQL*Plus, a prompt
does not appear.

I tried a few other experiments which showed other differences between
iSQL*Plus and SQL*Plus, so my question is: "Should iSQL*Plus and SQL*Plus
behave the same or are there subtle differences?". If this is a bug, how do
I report it to Oracle?

Best regards,
Jacob Grydholt Jensen

Jul 19 '05 #1
1 5143
"Jacob Grydholt Jensen .dk>" <jacob@rgrydhol t.<REMOVE> wrote in message
news:40******** *************@d read11.news.tel e.dk...
| I am trying to learn iSQL*Plus for the 1Z0-007 exam. I am having a bit of
| problems with the substitution variables. My understanding was that they
| behave as in SQL*Plus, but my experiments beg to differ.
|
| I log on to the sample schema 'hr' and enter the following statements:
|
| -- statements begin
| set verify on
| define name = K%
|
| select last_name
| from employees
| where last_name like '&name'
| -- statements end
|
| When I click the 'Execute'-button, I am prompted for the value of the
'name'
| substitution variable. Regardless of what I enter, the result is:
|
| -- iSQL*Plus output begin
| old 3: where last_name like '&name'
| new 3: where last_name like 'K%'
|
|
| LAST_NAME
| King
| Kochhar
| Khoo
| Kaufling
| King
| Kumar
|
| 6 rows selected.
| -- iSQL*Plus output end
|
| So my entered value is discarded and the value explicitly defined is
always
| used, very strange! When executing the same statements in SQL*Plus, a
prompt
| does not appear.
|
| I tried a few other experiments which showed other differences between
| iSQL*Plus and SQL*Plus, so my question is: "Should iSQL*Plus and SQL*Plus
| behave the same or are there subtle differences?". If this is a bug, how
do
| I report it to Oracle?
|
| Best regards,
| Jacob Grydholt Jensen
|
|
|

interesting...

in standard sql*plus (which i'm pretty sure is invoked, or pipe to, by
iSQL*Plus) pre-defined variables are not prompted for

so, i'd say remove the DEFINE and you'll be ok (seems like a bug to me, but
have not researched)

if you're looking for a default value for &name, then use NVL() in your
WHERE clause (you'll most likely need the UPPER function, too), ie:

select last_name
from employees
where last_name like nvl(upper('&nam e'),'K%')

;-{ mcs
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
3723
by: Rui Cunha | last post by:
Hi, i'm having some problems at work with isql*plus in what concerns with session timeouts... here is the scenario: a class with 30/40 students working on PL/SQL and requesting the database server for info.no client installation was made...they only use the isqlplus tool via browser...
2
4127
by: Ant | last post by:
Hi, I have an SQL assignment to do and at my school we use SQL *Plus there however I don't have Oracle at home, where I would like to do the work ,so I was wondering whats the easiest way to get an SQL environment up so I can code in that then just paste it into SQL *Plus later. I don't really want to install Oracle on my home pc and I was wondering if there are other IDE's for SQl that would fit my need for this.
4
1841
by: sukh | last post by:
we have to enter URL address of the iSQL*Plus.i have gone into http.cof file but didn't file hostname how it is written in that file. i have port number 7778.the how to find the name of computer. Please help me. thank you.
7
7131
by: samayjain | last post by:
Dear , Please let me know the correct answer for the following 1.Which three statements about subqueries are true? (Choose three.) A. A single row subquery can retrieve only one column and one row. B. A single row subquery can retrieve only one row but many columns. C. A multiple row subquery can retrieve multiple rows and multiple columns.
2
1524
by: subbarao1955 | last post by:
Hi If any body help me , what is the meaning of @@ in Oracle. regards SubbaRao
1
387
by: Jacob Grydholt Jensen | last post by:
I am trying to learn iSQL*Plus for the 1Z0-007 exam. I am having a bit of problems with the substitution variables. My understanding was that they behave as in SQL*Plus, but my experiments beg to differ. I log on to the sample schema 'hr' and enter the following statements: -- statements begin set verify on define name = K%
4
2913
by: mndprasad | last post by:
I am creating a jsp application . . . .I am retreiving some values from my database oracle 10g..my query taking time to execute even in isql plus..am uisng tomcat5 and oracle 10gR2..can anyone pls tell me why it happens...my query fetches data from four tables...i dont know exactly why its taking so muc time say 15 seconds...when i run the application in my local host it retrievs fast when i do that in server it creates a problem.. thanx in...
0
1526
by: NewToOracle | last post by:
Hi All, Can anybody guide me for how to access isql* plus host variable and assigning them to the variable declared in PL/SQL ..?
0
8236
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8173
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8679
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8621
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7159
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6110
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5563
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
1785
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1482
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.