Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
João Martins
1
Views
3
Comments
Help for advanced query to an Oracle database
Question
Hi guys,
I'm currently using the Service studio 5.0.2.47 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?
Nelson Baptista
Staff
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.
Regards,
Nelson Baptista
João Martins
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
Miguel Seabra Melo
Hi João, Nelson,
I just published a Technical Note that may come in handy when migrating an application from SQL to Oracle:
https://www.outsystems.com/community/download.aspx?DocumentId=637
Let me know if it helps.
Cheers,
Miguel
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...