Connect and share knowledge within a single location that is structured and easy to search. I've included a copy of the corresponding table below the output for my most recent query:. The screenshot of your data and output clearly shows the problem. The concatenation operator automatically takes care of NULL and you don't need to do anyhting. For dealing with individual columns, you need to use something like NVL or Case expressions.
I don't have an Oracle instance to test against right now, but something strikes me as odd in your data. Nulls in Oracle are supposed to concatenate to empty strings. Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. How to omit multiple columns where is not null? Ask Question. Asked 5 years, 10 months ago. Suppose you have to record emergency contacts of employees with various phone numbers: work phone, home phone, and cell phone.
The following statements insert some emergency contacts into the table:. The following query retrieves the employees and their emergency contacts with phone numbers:. See the following statements:. This question is You Asked I have a trigger for recording the old and new values of the fields changed on a table.
I compare If updating and :old. Rating 33 ratings Is this answer out of date? You can also catch regular content via Connor's blog and Chris's blog. Or if video is more your thing, check out Connor's latest video and Chris's latest video from their Youtube channels. And of course, keep up to date with AskTOM via the official twitter account. Question and Answer. You Asked I have a trigger for recording the old and new values of the fields changed on a table.
A user gives an input and then i have to display all records that match this value in C1, if user inputs null then all nullls should be displayed How can I do this in sql. June 25, - pm UTC. If they are equal, then the function returns null.
If they are not equal, then the function returns expr1. You cannot specify the literal NULL for expr1. June 26, - pm UTC. Sort of a work around Please comment on this workaround. June 27, - pm UTC. In our table, we can't figure out what one of the column values is.
The column is a varchar2 1 and it looks like it's a blank or a null. It's neither a null or one blank space. When we converted it to ascii, it converts to a zero and ascii 0 is considered a null in ascii format. Could you let me know what could have caused that and what an ascii 0 translates to? We are using Oracle version 8. August 12, - am UTC. Matt, December 02, - pm UTC. I picked up the following query from Cary Millsaps new book. I wondered what the purpose of CHR 0 was and when it might appear in the terminal column.
Any ideas? December 02, - pm UTC. Kurt, December 03, - am UTC. Tom, Comparing 2 values, each of which is possibly null, seems to be a common problem. But it can be used in SQL when needed.
0コメント