SUJOY SANTRA

Monday, 28 July 2014

Use of case in where clause

SELECT * 
FROM    tableName
WHERE   dateCol =   CASE WHEN @considerDate =1
                         THEN @date 
                         ELSE dateCol 
                    END
Posted by sujoy santra at 11:29 No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels: SQL
Newer Posts Older Posts Home
Subscribe to: Comments (Atom)

Search This Blog

Blog Archive

  • ▼  2016 (3)
    • ▼  September (1)
      • Maintaining State of CheckBoxes to checked While ...
    • ►  February (1)
    • ►  January (1)
  • ►  2015 (89)
    • ►  December (3)
    • ►  November (2)
    • ►  October (5)
    • ►  September (8)
    • ►  August (16)
    • ►  July (1)
    • ►  June (18)
    • ►  May (2)
    • ►  March (14)
    • ►  February (11)
    • ►  January (9)
  • ►  2014 (141)
    • ►  December (5)
    • ►  November (13)
    • ►  October (11)
    • ►  September (3)
    • ►  August (16)
    • ►  July (7)
    • ►  June (9)
    • ►  May (32)
    • ►  April (16)
    • ►  March (13)
    • ►  February (13)
    • ►  January (3)
  • ►  2013 (69)
    • ►  December (6)
    • ►  November (2)
    • ►  October (3)
    • ►  September (6)
    • ►  August (43)
    • ►  July (5)
    • ►  June (4)

About Me

My photo
sujoy santra
Bakhrahat, West Bengal, India
View my complete profile

Popular Posts

  • Serversite function in ClientSite
     <asp:TemplateField HeaderText="Action" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left...

Total Pageviews

Picture Window theme. Powered by Blogger.