Upload File on sql serverDB

  • 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

  • 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

Viewing 2 posts - 1 through 2 (of 2 total)

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