Help for advanced query to an Oracle database

Help for advanced query to an Oracle database

Hi guys,

I'm currently using the Service studio and I'm having a little problem in an advanced query to an Oracle database. I can't give you the real problem once I'm in a client project but I can explain what's happening.

My advanced query is: SELECT Distinct {TABLE}.[Att1] from {TABLE} where {TABLE}.[Att1]<>''
I'm receiving no results and I know that there is two records, the first: '' (null) and the second: 'some text'. I'm used to use SQL Server databases so probablly my mistake is the sintax. Does anyone can help me?
Hi João,

Here is a comparison between sqlserver and oracle. Regarding your advance query, if you want as output, all records where {table}.[att1] different from an empty string, OS platform represents empty strings with ' ' (note: there is a space between ' ' ) in Oracle and '' (note:without a space between '' ) in SQL Server, this information is in the post which I've mentioned before.
I hope I've helped you.
Nelson Baptista
Hi Nelson,

That's it! the problem was the space between the quotes. I guess I would never figure out how to solve this, as I said I'm used to SQL Server and I would never try to compare with a string with a space. Thanks! ;)

About the post, I get a permissions error, but by the name of the link it seems realy interesting! I would realy like to take a look at it!

Best regards,
João Martins
Hi João, Nelson,

I just published a Technical Note that may come in handy when migrating an application from SQL to Oracle:

Let me know if it helps.