• Using OPENROWSET is a bad idea when combined with an update (if at all possible). You should import the values from the text file into a table. To do that, you simply use BULK INSERT. Remember that when you're referring the file, the path should be written as a path for the server and not your local computer.

    This is an example that might not work, but it should give you an idea.

    CREATE TABLE #UIDs( UID int);

    BULK INSERT tempdb..#UIDs

    FROM 'c:\list\12345.txt'

    WITH

    (

    ,CODEPAGE = 'RAW'

    ,DATAFILETYPE = 'char'

    );

    Update dbo.AeFSState

    set FSState = 'ReleaseWait'

    WHERE UID IN (SELECT u.UID FROM #UIDs);

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2