Home » SQL & PL/SQL » SQL & PL/SQL » Query logic
Query logic [message #337870] Fri, 01 August 2008 07:37 Go to next message
gauravpuri2002
Messages: 24
Registered: October 2007
Location: Bangalore
Junior Member
Hi

In my table there is one column and has values 2,3,7
Now i want to write a query that will display those values which are less than 10 and don't contain 2,3 and 7.that is it will display 1,4,5,6,8,9,10

Regards
Gaurav
Re: Query logic [message #337874 is a reply to message #337870] Fri, 01 August 2008 07:46 Go to previous messageGo to next message
joy_division
Messages: 4644
Registered: February 2005
Location: East Coast USA
Senior Member
10 is not less than 10 where I come from.
where whatever < 10
and whatever not in (2,3,7);


As basic as a where clause can be.

[edit]
Ok, upon further reading, it looks like another example of unclear description of the problem, but have a look at connect by clause, if my assumption is correct.

[Updated on: Fri, 01 August 2008 07:48]

Report message to a moderator

Re: Query logic [message #337877 is a reply to message #337874] Fri, 01 August 2008 07:50 Go to previous messageGo to next message
gauravpuri2002
Messages: 24
Registered: October 2007
Location: Bangalore
Junior Member
thanks i got it...
Re: Query logic [message #337892 is a reply to message #337870] Fri, 01 August 2008 08:28 Go to previous message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Maybe the same kind of question than http://www.dba-village.com/village/dvp_forum.OpenThread?ThreadIdA=33889

Regards
Michel
Previous Topic: comparing values in table
Next Topic: table confusion
Goto Forum:
  


Current Time: Fri Dec 09 21:30:59 CST 2016

Total time taken to generate the page: 0.12675 seconds