Welcome! Log In Create A New Profile

Advanced

Substitution Variables

Posted by ligararu 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Substitution Variables
June 29, 2010 03:20PM
Please someone help. What could I be doing wrong. when I run the following query I am getting error message, what am I doing wrong

this is on page 2-24 of the Oracle database 10g manuals

SELECT employee_id, last_name, Salary, department_id
From employees
WHERE employee_id = &employee_num ;
Re: Substitution Variables
June 29, 2010 04:17PM
Are you running from the command line or from the web client?
avatar Re: Substitution Variables
June 29, 2010 04:17PM
ligararu Wrote:
-------------------------------------------------------
> Please someone help. What could I be doing wrong.
> when I run the following query I am getting error
> message, what am I doing wrong
>
> this is on page 2-24 of the Oracle database 10g
> manuals
>
> SELECT employee_id, last_name, Salary,
> department_id
> From employees
> WHERE employee_id = &employee_num ;

try removing the "&"...
Re: Substitution Variables
June 29, 2010 05:02PM
The & is correct because that is how the system knows to prompt you for the variable. But I could only get this to work from the command line. So I could help you get that right, but unfortunately not from the web client.
Re: Substitution Variables
June 30, 2010 07:55AM
I ran into the same problem.

Check Tut letter 102 pg 22. It seems that in the XE environment the ampersand sign & should be replaced with the colon :

Give it a try, it works for some of the code but not for all.

Once again Unisa have not crossed all of the i's and dotted all of the t'sangry smiley
Re: Substitution Variables
June 30, 2010 01:28PM
TRUE.
The "&" should be substituted with a colon " : " if you using the XE environment
Re: Substitution Variables
June 30, 2010 01:42PM
Aaaahh!!!! How frustrating that it was that simple tongue sticking out smiley oh well! Thanks for that smiling smiley
Re: Substitution Variables
July 09, 2010 03:05PM
I finaly got it working by using the SQL command line
Sorry, only registered users may post in this forum.

Click here to login