cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieval problem

Former Member
0 Kudos

in my application i am having check box and edit(the style type) in data objects i need to display som etexts on thos edit and those texts are there in my sql and in the dataobject i have a query like this

SELECT auth.c_name,

        auth.auth  ,

substring( auth.auth, 1 ,1) AS COLUMN_0 ,

( select "Fn" from key5932 where "keyyy" ='0' ) as index0,

FROM auth

where auth.c_name = :a_name

here "auth" and "Fn" are the two tables and only table"auth" has been selected in this dataobject and i am getting data from"auth"

and "index0" is the name of edit and text which must shown on the edit is taking from table "Fn" but those are not coming properly.

and there is code lyk

dw_security.retrieve(data) here "data is from "auth" and  there is retrievel argument (a_name )in the object  which is from "auth"

my problem is i am not getting values from table "fn"

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

I hope some problem with your query. try to run in database painter or backend and check you are getting value or not.

Former Member
0 Kudos

Delna,

What is the datatype of the keyyy column? Are you sure it's a string?

Do you get any result when you run the subselect from outside of the DW, e.g. SQL Developer?

Former Member
0 Kudos

keyyy column is in small in datatype

and i am getting values when i run the application outside the window

Former Member
0 Kudos


Okay, I'm just wondering because you enclosed 0 with single quotes. If keyyy is smallint, then 0 should not be enclosed in quotes because that would make it a string.


So, to confirm, you get values when you run just the subselect, like the below?


select "Fn" from key5932 where "keyyy" ='0'


Have you tried removing the quotes from 0 and did it make any difference?


Former Member
0 Kudos

then i got a error like:

Conversion failed when converting the varchar value "key-index" to data type int

Former Member
0 Kudos

Delna,

Your naming conventions here are... unusual.... and your explanation is.... first draft...

You say "Fn" is a table... what is "keyyy" then? In your sub-select.

dw_security.retrieve(data)


This indicates that a retrieval takes place in ItemChanged event somewhere?


Suggest you spend a little bit of time explaining what you are trying to do. Tidy up the typos prehups.


Lars

Former Member
0 Kudos

keyyy and Fn ar5e the columns sir.. and i am really sorry for the mistake