"UNICODE DATA INSERTION"

  • I am inserting unicode data in SQL server using insert statement as follows,

    INSERT INTO tablename (col1,col2)values (N'value1,value2)

    WHERE col1 is of NVARCHAR datatype.

    I want to run the above statement using a SQL SERVER stored procedure This procedure will take 2 parameters please help me in solving this problem.

  • CREATE PROCEDURE ip_InsertIt

    @value1 nvarchar(100),

    @value2 datetime

    AS

    INSERT INTO tablename (col1,col2) values (@value1,@value2)

    Just like doing any other stored procedure with a non-unicode datatype.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

  • No.u didn't get my point.If i insert data using ur stored procedure it will garbage the unicode data(arabic).that's why i m using 'N' clause with 'value1' to insert unicode data.

    I want the solution to pass 'N' clause in insert statement in a stored procedure.

  • Did you try using this way.

    ip_InsertIt N'yourunicodedatahere', GETDATE()

    Should work, however how are you running the procedure, application type?

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply