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
 Other Forums
 Other Topics
 question

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-11-10 : 07:19:48
Vinay writes "sELECT nvl(MAX(ID), 1) AS Expr1
FROM dbo.user_diplome


would like to find max of id and if null then it should return
1
how to write query for the same"

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2003-11-10 : 07:25:27
SELECT isNul(MAX(ID), 1) AS Expr1 FROM dbo.user_diplome

7 seconds in books online would have answered that, you were almost there.



Damian
Go to Top of Page

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2003-11-10 : 11:12:35
I've looked and looked, but Damian, I can't fine isNul in BOL ... Luckly, I don't make typing errors ....

(Vinay, look up "ISNULL")

Jay White
{0}
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2003-11-10 : 11:47:27
quote:
Originally posted by Page47

I've looked and looked, but Damian, I can't fine isNul in BOL ... Luckly, I don't make typing errors ....

(Vinay, look up "ISNULL")

Jay White
{0}



Never say Never

And luckily for me there's SQL Team...

Damain, back still bothering you?



Brett

8-)
Go to Top of Page
   

- Advertisement -