• if you create a permanent or temp table that has the shape of the data, you can insert into it;

    a rough example, but it works on my side, assuming the proper tables and databases and stuff:

    CREATE TABLE [dbo].[#tmp] (

    [STATETBLKEY] INT NOT NULL,

    [INDEXTBLKEY] INT NOT NULL,

    [STATECODE] CHAR(2) NOT NULL,

    [STATENAME] VARCHAR(50) NOT NULL,

    [FIPS] CHAR(3) NULL)

    declare @sqltext varchar(max)

    select @sqltext='

    SELECT * FROM OPENQUERY(My2005LinkedServer,''SELECT * FROM LHC.dbo.TBSTATE'')'

    --insert into instead of just a select

    INSERT INTO #tmp

    exec (@sqltext)

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!