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.
| Author |
Topic |
|
magikminox
Starting Member
27 Posts |
Posted - 2008-06-12 : 04:47:51
|
| Hi GUYSI am trying to use the datediff function to return a Y if difference is greater than 0 and a N if difference is less than or equal to 0select if datediff(dd,maturity_date,log_changed) > 0 'Y','N')and i am getting a syntax error.Can someone show me where i am getting it wrong.In god we trust,everything else we test. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-06-12 : 04:50:06
|
| select case when datediff(dd,maturity_date,log_changed) > 0 then 'Y' else 'N' end |
 |
|
|
magikminox
Starting Member
27 Posts |
Posted - 2008-06-12 : 04:59:39
|
| you have been of great help.thanks and God BlessIn god we trust,everything else we test. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-06-12 : 05:01:18
|
quote: Originally posted by magikminox you have been of great help.thanks and God BlessIn god we trust,everything else we test.
you're welcome |
 |
|
|
|
|
|