The code example below works , using the NULL into a numeric data type. The ideal situation is to check and handle this type of situation at the application level ,
create table #temp1 (myname nvarchar(100), age NUMERIC)
thank you for ur kinldy reply.. If my texbox have empty value then it should be stored at backend as 0 or if my textbox has value then it should be store...
my querey is: insert into tbl_name values(1500.25)
if it's empty how to store 0... Please tell the solution...
thank you for ur kinldy reply.. If my texbox have empty value then it should be stored at backend as 0 or if my textbox has value then it should be store...
my querey is: insert into tbl_name values(1500.25)
if it's empty how to store 0... Please tell the solution...
Thanks In Advanced
Lawce
check for blanks and make it as 0 ie do something like
CASE WHEN @TextboxValue > '' THEN @TextboxValue ELSE 0 END
@TextboxValue is parameter through which you pass the textbox entered value to database
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/