uv commands failing????

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
ferreirahe
Charter Member
Charter Member
Posts: 25
Joined: Wed Apr 09, 2003 12:58 pm

uv commands failing????

Post by ferreirahe »

Hi,

I have this command and the respective result:

>SELECT JOBNO, @ID, CATEGORY, NAME FROM DS_JOBS;
No... DS_JOBS... Category............ Job name............

1357 LDWE32AE ODS_EVT LDWE32AE
\\\ODS_MKT ODS_MKT_UPDATE \\\ODS_MKT_UPDATE
_UPDATE
1298 LDWE81AD ODS_EVT LDWE81AD
255 LRDJ11 ODS_FIN LRDJ11
1092 LTIPCB ODS_MKT_LOAD LTIPCB
1093 LTIPCBPRE ODS_MKT_LOAD LTIPCBPRE

However, if I query the uv with the following restriction...

>SELECT JOBNO, @ID, CATEGORY, NAME FROM DS_JOBS WHERE JOBNO=255;
DataStage/SQL: character and number types are incompatible in this operation
Scanned command was FROM DS_JOBS SELECT JOBNO , @ID , CATEGORY , NAME WHERE JOBNO = 255 ;
>

Why is it happening? The command seems alright to me...and it does not work between quotes or double quotes (i mean the 255), also. Any ideas?

Thanks,
Henrique
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You need to use single quotes around the job number.
-craig

"You can never have too many knives" -- Logan Nine Fingers
sumitgulati
Participant
Posts: 197
Joined: Mon Feb 17, 2003 11:20 pm
Location: India

Re: uv commands failing????

Post by sumitgulati »

Hi Henrique,

I do not know why single quotes are not working for you. I tried running the following command and it works perfectly fine for me:

Code: Select all

SELECT JOBNO, @ID, CATEGORY, NAME FROM DS_JOBS WHERE JOBNO='255';
Are you putting quotes at right place. Is the command you are trying to run any different from the one above.

Regards,
Sumit
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

For various reasons to do with the inner workings of DataStage, JOBNO is not a numeric column. Therefore, it must be quoted in the WHERE clause.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ferreirahe
Charter Member
Charter Member
Posts: 25
Joined: Wed Apr 09, 2003 12:58 pm

Post by ferreirahe »

Hi guys,

It might sound stupid to you but my keyboard lost its configuration and instead of writing ' ' it was writing ` `, and I didn't notice because it was late and I was tired and...I might need to change glasses ;-)...fortunately I am going on holidays today...I need to rest...uuufff!!! Barcelona, here I go...!!!

Anyways, thanks to you all, I stopped for a while, did a little rethinking and got the bug (MY BUG!!!)

Thanks & cheers,
Henrique
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

This - or something quite like it - can also happen when you construct queries in something like Microsoft Word when it has the "replace straight quotes with smart quotes" enabled. :roll:
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

That is okay, in Texas we have the three R's, readin, rightin and rithmatic.
Mamu Kim
Post Reply