i have a int column as Custid
initally value is balnk.
but i have set the default value when creating the field as 0
i need to increment the max Custid value
but if its null i need it be 0 so incrementing it would be 1
select isnull(Custid,0)+1 as ID from TABLE1
i have the Custid field blank with defualt value as 0
but when i use the abobe query i dont get 1
select isnull(Custid,0) as ID from TABLE1 i dont get 0
Can you provide DDL and sample data so that I can see what your source data looks like? See the link in my signature for details of how to do this.
Note that there is (potentially) a difference between 'NULL' and 'blank'.
And still you have not asked a question.
Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this
If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.
Please surround any code or links you post with the appropriate IFCode formatting tags. It helps readability a lot.