Need URGENT Attention !!!
I am using MS SQL 2000.
I have database table as follows:
client_images (
serial_no int identity (1, 1) ,
client_code varchar(10) not null ,
client_image image not null
)
I have csv file having client codes and it's related bmp , jpg or png file.
The csv file name is client_images_file.csv having rows
abc001,c:\img\abc001.bmp
abc002,c:\img\abc002.bmp
abc003,c:\img\abc003.bmp
abc004,c:\img\abc004.jpg
abc005,c:\img\abc005.png
Using DML statements in a stored procedure I want to store the client codes and its IMAGE (not the image file name) in the database table client_images.
Please, can any one help me on this?
I was trying the following statement found in other posts on this forum.
INSERT INTO myTable(Document) SELECT * FROM OPENROWSET(BULK N'C:\Image1.jpg', SINGLE_BLOB) AS Document
I am getting error:
"Incorrect syntax near key word BULK."
Please help me. Thanks