Home » SQL & PL/SQL » SQL & PL/SQL » condition using not null
condition using not null [message #378297] Mon, 29 December 2008 20:35 Go to next message
radhavijaym
Messages: 65
Registered: December 2008
Location: singapore
Member
Hi,
i had two tables tab1 and tab2 from which i must select tab1.col1 and tab2.col1 where tab1.col2 and tab2.col2 must be not null and tab1.col3 and tab2.col3 must be not null. if it is true i must raise an message if not end the loop.
please help me.
i had written the query but im getting error.
Re: condition using not null [message #378304 is a reply to message #378297] Mon, 29 December 2008 21:02 Go to previous messageGo to next message
rleishman
Messages: 3724
Registered: October 2005
Location: Melbourne, Australia
Senior Member
Then why not post your query AND the error

Ross Leishman
Re: condition using not null [message #378305 is a reply to message #378297] Mon, 29 December 2008 21:05 Go to previous message
flyboy
Messages: 1832
Registered: November 2006
Senior Member
radhavijaym wrote on Tue, 30 December 2008 03:35
select tab1.col1 and tab2.col1 where tab1.col2 and tab2.col2 must be not null and tab1.col3 and tab2.col3 must be not null.

This is not syntactically correct SQL statement. For correct syntax, have a look into SQL Reference,found (with another Oracle documentation books) e.g. online on http://tahiti.oracle.com/.
Quote:
if it is true i must raise an message if not end the loop.

I am unable to understand it. Are you aware, that "raise an message" is work of client application, not SQL itself. Also what "loop" are you having in mind?
Previous Topic: Need whole ( system date )month production
Next Topic: how to copy one column values to other column in same table
Goto Forum:
  


Current Time: Mon Dec 05 11:01:29 CST 2016

Total time taken to generate the page: 0.18258 seconds