sam_btech (6/17/2008)
i am new to sql server 2005. i want upload file in sql server.i am use varchar it will store string.
pls reply data type
assuming the file is on the server, and the SQL Server has permissions to access it:
DECLARE @filecontent VARCHAR(MAX)
SELECT @filecontent = result.BulkColumn
FROM OPENROWSET(BULK 'z:\ljkasd.txt', SINGLE_CLOB) AS result
SELECT @filecontent
Regards,
Andras
Andras Belokosztolszki, MCPD, PhD
GoldenGate Software