Operating System - Linux
1828341 Members
3592 Online
109976 Solutions
New Discussion

Re: using When condition in sql control file

 
Gyankr
Frequent Advisor

using When condition in sql control file

Hi,
I am using a when condition for a number like
When empno=2
but i am getting an exception like --Expecting quoted string or hex identifier, found "2".

When i use "2" or '2' the records are not being loaded as empno is a number.

Please let me know how to go about this?

Regards,
Gyan
2 REPLIES 2
Robin T. Slotten
Trusted Contributor

Re: using When condition in sql control file

A snippit of your code would help, but I'll take a stab at it.

If this is a shell script,
When is not a valid condition.

empno is not defined as a specific type.

#!/usr/bin/sh

set -x
typeset -i empno=2 #define var as integer

if [ $empno -eq 2 ];then
print "employee 2"
fi

while [ $empno -eq 2 ];do
print "employee 2"
empno=3
done
# end job

Rob...
IF you do it more than twice, write a script.
Gyankr
Frequent Advisor

Re: using When condition in sql control file

oops sorry forgot about it,its not about unix,it is sql loader concept.