Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)

  • RE: How to convert varchar into datetime

    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

  • RE: One SP for Update and Add

    Dear Friend,

    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'

    BEGIN

    UPDATE TABLENAME SET (Col1=@col1,

Viewing 2 posts - 1 through 2 (of 2 total)