Hi,

I have an sqlce query where I dynamically constructs the string by appending different strings. I have a field where I append a product name and its subname. Say for example
main name "Pepsi" and Subname "Large", there are some instance where the Subname is empty and the subname value comes as "null". So when I append the string it will be say

"Pepsi+null" ideally the result should be Pepsi but the sqlce interprets it as "null" and hence my query fails. My data comes from Orcale DB which doesnt support "null", hence even if I want the value as empty, Oracle will return me only null. Any idea why this is happening ? or is there is any solution.

Hope I havent confused you guys!!

-anoop

Show your code where you get and construct the query string, it will make it easier to understand and help you :)

Show your code where you get and construct the query string, it will make it easier to understand and help you :)

Hi,

I just put a null check for the subname for the whole query and fixed the problem, but I had to duplicate the code.

-anoop

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.