cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with DB2 select quary in NWDS 7.0

Former Member
0 Kudos

GoodMorning All,

First of all i want to thanks all for solving my previous problem(Loading AdobeLiveCycle in NWDS to edit interactive form).

I am having another problem this time and its about DB2 quary, running in NWDS.The specification of database which i am using are.

Database     EP1

Schema       W2HCMSC

Tablespace   W2HCMTS

Table           TESTEMPLOYEE

Cloumns      ZONE, Workshop, Year, Employee Name, Designation, DOB

The snapshot of the database with values is

When from NWDS i am running the quary "select * from w2hcmsc.testemployee" it returns all 4 rows. But

if i am running "select * from w2hcmsc.testemployee where 'Zone' = '1'" its not returning any row and in the database

am getting message that 0 rows selected. I need a help with this DB2 quary. If I can have any kind of help it would be great.

Thanks,

Anjanav Das

anjanav.das@capgemini.com

+91-958604114

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

The problem was coming because the column name was written wrong. Of all the columns in the table only DOB was written in all caps and rest of the others are written Zone, Name like that but while interpretting the quary the columns were conveted to all caps so that was causing a column name mismatch.

Thanks for all the help every one

Thanks

Anjanav Das

Answers (2)

Answers (2)

udaykumar_kanike
Active Contributor
0 Kudos

Hi Anjanav,

              It looks like the second query is failing because of where condition. Try the second select  query with different where condition or without quotes for zone.

regards

uday

Former Member
0 Kudos

Uday can ypu plz tell me which quary you are reffering to.

Sreejith1
Contributor
0 Kudos

Hi,

This is not a solution but just want to check with your views about your query

In your query why you give Zone in quotes?

anyway your problem lies in side this part. So please check the quotes .

where 'Zone' = '1'"

Regards,

Ram

Former Member
0 Kudos

Hello Ram,

Thanks for the quick reply, I have tried all possible options but if i give Zone without quotes then also the result is same and i am not getting any rows in return. but if i give Zone and 1 in quotes i will get the message that 0 rows are selected. i will upload the screen shots.

plz wait

Former Member
0 Kudos

Mr Ram,

I am having this kind of senario.

Sreejith1
Contributor
0 Kudos

Hi Das,

Still I think giving the Zone in quotes are not proper. We need to find the reason.

Can you try the above with ZONE = 1 ?

no quotes for 1. Still I don't think giving quotes to field is proper even it shows error

Can you able to install some tool for querying or testing?

Few API tools are available.

Let me know the result

one more thing.

Can you able to update the table data?that query also have the same problem?

Regards,

Ram

Former Member
0 Kudos

ZONE = 1 (all w/o quotes)  are not giving any result. sorry can you plz tell me any name of API for debugging, and more over do i have to address zone with schema name or tablespace name.

and i have not tried to update quary i will try.

anjanav das

Former Member
0 Kudos

the update quary also not working

Sreejith1
Contributor
0 Kudos

Hi Das,

Can you give some background information about this table/view?

Whether it is upgraded/user created etc...

(In your table zone is 50 char long and you are using some numbers.So it must be char while comparing. ..nothing important just checked with you)

by the mean time,

Try to use other columns also so that we can make sure that it is not the problem of that particular column.

Also if possible try to test with other table to check whether it is not a problem with this particular table.

Pls check this for some API's:

http://www.sqldbx.com

http://www.winsql.com