Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 using NOT

Author  Topic 

WebCrab
Starting Member

8 Posts

Posted - 2009-08-18 : 02:17:38
hello, i want a query that will have the following functionality:
SELECT [faculty_name], [faculty_id] FROM [facultys] NOT faculty_id = 110
the NOT part is not correct syntax wise, and i need the right syntax.
10q.

Click! Click!

bklr
Master Smack Fu Yak Hacker

1693 Posts

Posted - 2009-08-18 : 02:23:30
SELECT [faculty_name], [faculty_id] FROM [facultys] where faculty_id <> 110
Go to Top of Page

Nageswar9
Aged Yak Warrior

600 Posts

Posted - 2009-08-18 : 02:24:22
hi, is this u want

SELECT [faculty_name], [faculty_id] FROM [facultys] WHERE faculty_id NOT in ( 110)
Go to Top of Page

WebCrab
Starting Member

8 Posts

Posted - 2009-08-18 : 02:51:42
Nageswar9
that's exactly it. 10q.

Click! Click!
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-08-18 : 02:54:13
Also

SELECT [faculty_name], [faculty_id] FROM [facultys] WHERE NOT faculty_id = 110

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -