Wednesday, 28 December 2011

SQL SERVER DO and DO NOT

 Basic SQL Query with many filters

Sometimes you have so much of data and you require to filter the data with few twist then you can implement this query that will simply check
TWO conditions between
TWO coloumns of
TWO Tables


take a look and you'll get explained better
------------------------------------------------------------------------------------------------------------
SELECT     Author_no
FROM         Author
WHERE     
(confirmation = 1) and Author_no  not in(SELECT distinct Author_nox FROM SecondAuthortable)
-------------------------------------------------------------------------------------------------------------
where Author_nox & Author_no,confirmation are three columns of two diffrent tables.
SecondAuthortable and Author simultaneously.

No comments:

Post a Comment

Print Only Grid View in ASP.net

ASP.net How to Print Only GridView < div id ="gridviewDiv" >   < asp:GridView ID ="gridViewToPri...