Problem useing multiple value in parameter with where clause
Moderators: chulett, rschirm, roy
Problem useing multiple value in parameter with where clause
Hi,
I facing a problem while using mutiplie parameters in where clause.
the sql query is as below -
Where code in ('#$CODE#')
The value of parameter #$CODE# is AB\',\'CD
I have seen a post in the forum on this to use "\" slash as the complier does not identify the parameter value correctly if used directly AB','CD.
By this while running the job i gave the value as AB\',\'CD and it ran in Dev enviroment properly.
But when i have moved to job to another environment same thing is not working the query is fetching 0 records even when same query i ran in backend it resulted in data.
Please suggest on this, if "\" is environment specific and what setting can be done in new environment to make it working.
I facing a problem while using mutiplie parameters in where clause.
the sql query is as below -
Where code in ('#$CODE#')
The value of parameter #$CODE# is AB\',\'CD
I have seen a post in the forum on this to use "\" slash as the complier does not identify the parameter value correctly if used directly AB','CD.
By this while running the job i gave the value as AB\',\'CD and it ran in Dev enviroment properly.
But when i have moved to job to another environment same thing is not working the query is fetching 0 records even when same query i ran in backend it resulted in data.
Please suggest on this, if "\" is environment specific and what setting can be done in new environment to make it working.
Thanks & Regards,
Shobhit Jauhari
Shobhit Jauhari
Can you echo the parameter value in the job (i.e. to a PEEK stage) to see if the backslash characters are still in the string and that the single quotes have not been stripped?
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
You first need to do what Arnd asked and confirm if the quotes are indeed being stripped or not. Does your 'other environment' source from a different database? If so, any chance there's legitimately no records that match the where clause?
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Not sure how that helps, they need to see how a job parameter is being resolved to see if it retains its quotes or not. Perhaps a union with a simple sql to unconditionally pull a single record so you can get information into the Peek stage?
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Hi Arndw and Craig,
I have seen the output of the job in both the environemnt using peek stage. given mulpile intput to the paramter value, it is as follows -
Input Env 2 Output (in which Env 1 Output
issue is there)
AB\",\"CD AB\",\"CD AB","CD
AB\',\'CD AB\,\CD AB','CD (Desired o/p)
AB','CD AB,CD AB,CD
AB','CD AB,CD "AB,CD"
AB\',\'CD AB\,\CD "AB','CD"
AB'',''CD AB\,\CD AB,CD
AB''','''CD AB\,\CD AB,CD
So, in Env 1 the single qoute is stripped off if \ is not there not output is fine is \ is present before it.
But in Env 2 it is stripping the sengle quote even if \ is present.
Please suggest if any other character can be used in Env 2.
I have seen the output of the job in both the environemnt using peek stage. given mulpile intput to the paramter value, it is as follows -
Input Env 2 Output (in which Env 1 Output
issue is there)
AB\",\"CD AB\",\"CD AB","CD
AB\',\'CD AB\,\CD AB','CD (Desired o/p)
AB','CD AB,CD AB,CD
AB','CD AB,CD "AB,CD"
AB\',\'CD AB\,\CD "AB','CD"
AB'',''CD AB\,\CD AB,CD
AB''','''CD AB\,\CD AB,CD
So, in Env 1 the single qoute is stripped off if \ is not there not output is fine is \ is present before it.
But in Env 2 it is stripping the sengle quote even if \ is present.
Please suggest if any other character can be used in Env 2.
Thanks & Regards,
Shobhit Jauhari
Shobhit Jauhari
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: