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
 General SQL Server Forums
 New to SQL Server Programming
 user define function

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-05-31 : 08:57:19
Fazlul Haq writes "i m new to sql server2000.my question is

" I CREATE A TABLE IN WHICH THREE COLUMS EXIST i.e SNO(NUMERIC),NAME(CHAR),FNAME(CHAR).I WANT TO ENTER VALUE IN SNO FIELD STARTING FROM ZERO(0)e.g 011,021,022 etc and when enter value without starting from zero an error messag is appered on the screen.I WANT THAT THIS CAN BE DONE BY CREATING A "FUNCTION" OR "RULE" OR "STORED PROCEDURE". PLZ HELP ME ""

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-05-31 : 09:02:55
When you use numeric column why do you want to keep leading 0? Store the number and add leading zeroes when you show the value of that column in front end application

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -