Insert image value into table with image data type field

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kimsengora
    New Member
    • May 2010
    • 1

    Insert image value into table with image data type field

    Ex. I need to fill in values argument
    Field1 is text
    Field2 is image

    Insert into tbl1 values("'+val1+ "','+val2+' ")

    val2 is image like 0x424DFE9D00000 000000036000000 ............... ............... .......

    I really stuck on this with image values because I have to BCP out my data and and generate the insert statement with value data like above back to database

    if I use sql server feature to generate insert statement with data, the image can easily insert into table. But the problem I can't pass the step above to get the complete insert statement like SQL server 2008 generate for me.

    Normally, if the data is string, use single quote, if date we use # but for image data what can we use to package it?


    Thanks for your help
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    How about just directly moving the data to that new table? Or create a small DB, copy the table, back it up and restore it on the other server.

    Happy Coding!!!

    ~~ CK

    Comment

    Working...