Hi guys,
I tried to pass a sql query as parameter to the job through job activity in sequence job. My query contains where ('ABC') and this goes like ABC and throwing the error
Provided sql statement did not complete correctly. I tried consecutive single quotes on both sides, But still its not working. Any other workarounds. Please share.
Version : 8.0.1
query as parameter
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 597
- Joined: Fri Apr 29, 2005 6:19 am
- Location: Singapore
-
- Premium Member
- Posts: 54
- Joined: Thu Oct 18, 2007 4:20 am
- Location: Chennai
If you are passing any parameter and you need to retain your single quotes please use escape character as Chulett said...
For example:
SELECT * FROM EMPLOYEE WHERE ENAME LIKE 'ABC'
should be passed as a parameter like
SELECT * FROM EMPLOYEE WHERE ENAME LIKE \'ABC\'
so that DataStage does not parse your single quotes or else you will end up passing on without Single Quotes
SELECT * FROM EMPLOYEE WHERE ENAME LIKE ABC
For example:
SELECT * FROM EMPLOYEE WHERE ENAME LIKE 'ABC'
should be passed as a parameter like
SELECT * FROM EMPLOYEE WHERE ENAME LIKE \'ABC\'
so that DataStage does not parse your single quotes or else you will end up passing on without Single Quotes
SELECT * FROM EMPLOYEE WHERE ENAME LIKE ABC
Regards
LakshmiNarayanan
LakshmiNarayanan