Viewing 2 posts - 1 through 2 (of 2 total)
Dear Friend,
Use this query
Syntax for Convert functions
=====================
CONVERT([datatype],[fieldname],[formattype])
SELECT CONVERT(datetime, date,101) FROM ConvertTable
I hope you can get the result what u expect.
M.Pothiraja
October 17, 2005 at 10:15 pm
#597820
Declare One variable querytype varchar(1) Ok. Based one the querytype values you can to insert and update.
For instance
IF querytype='I'
BEGIN
INSERT INTO TABLENAME ( Col1, Col2,......)
Values (@col1,@col2)
END
IF querytype='U'
UPDATE TABLENAME SET (Col1=@col1,
October 14, 2005 at 10:12 pm
#597486