Results 1 to 5 of 5

Thread: Blob in Tsql

  1. #1
    Join Date
    Apr 2003
    Posts
    11

    Unanswered: Blob in Tsql

    Hi,
    I am writing a tsql in which i am saving contents of one table into another using "insert into.. select".

    But it doesnt work for Blobs.. what should i do??

    can anyone help me on this.
    Thank You.

  2. #2
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Refer to UPDATETEXT/WRITETEXT/READTEXT under BOL.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  3. #3
    Join Date
    Apr 2003
    Posts
    11
    ya.. i have tried with writetext and readtext but am not able to get it right with it.

    i have to read a blob from a table and insert it into another table.

    the code is as follows:
    /**************
    DECLARE @ptrval binary(16)
    DECLARE @destval binary(16)

    SELECT @ptrval = TEXTPTR(icon_file)
    FROM subject_master where subject_id=1

    READTEXT subject_master.icon_file @ptrval 1 2000

    select @destval = TEXTPTR(icon_file)
    FROM subject_master_ver where subject_id=1

    Writetext subject_master_ver.icon_file @destVal @ptrval
    ************/
    but it doesnt work...
    can u help me out with this...

    Thank You.

    Originally posted by Satya
    Refer to UPDATETEXT/WRITETEXT/READTEXT under BOL.

  4. #4
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Have you tried using DTS in this case, if its a regular process then schedule the job to do so.

    HTH
    Originally posted by swatisk
    ya.. i have tried with writetext and readtext but am not able to get it right with it.

    i have to read a blob from a table and insert it into another table.

    the code is as follows:
    /**************
    DECLARE @ptrval binary(16)
    DECLARE @destval binary(16)

    SELECT @ptrval = TEXTPTR(icon_file)
    FROM subject_master where subject_id=1

    READTEXT subject_master.icon_file @ptrval 1 2000

    select @destval = TEXTPTR(icon_file)
    FROM subject_master_ver where subject_id=1

    Writetext subject_master_ver.icon_file @destVal @ptrval
    ************/
    but it doesnt work...
    can u help me out with this...

    Thank You.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  5. #5
    Join Date
    Apr 2003
    Posts
    11
    its not a regular process.... it is triggered by the user of the system.
    i have not used DTS at all.
    by the way what is the problem with my code??
    the way i am using writetext,readtext is fine??
    i am not able to find any example for writing a blob(image) into a blob(image) of a table... not available in the books online.
    pls help.

    Thank You.

    Originally posted by Satya
    Have you tried using DTS in this case, if its a regular process then schedule the job to do so.

    HTH

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •