Forum Replies Created

Viewing 15 posts - 31 through 45 (of 60 total)

  • RE: linked server t-sql

     

    Proper syntax is:

    delete openquery (LINKEDSERVER,'select cols from table where 1=1)

    This article explains the original posters error message and proper syntax:

    http://support.microsoft.com/kb/270119

    OpenQuery requires a result set to be returned,...

  • RE: OPENQUERY Error on a linked server

    Bev,

    You post is many months back, but figure I'd still reply so others can see the solution.  You're issue is different than the original poster.

    Proper syntax is:

    delete openquery...

  • RE: Delete from a Linked Server

    Proper syntax is:

    delete openquery (LINKEDSERVER,'select cols from table where 1=1)

    This article explains the original posters error message and proper syntax:

    http://support.microsoft.com/kb/270119

    OpenQuery requires a result set to be returned, but...

  • RE: Setting a variable to the results of an Exec () statement

    Nathan,

    Hope this helps...I had to do something similar this week.  A snippet from the code I wrote that concerns writing the statment to a temp table and executing the statments.

    Kim

    --create...

  • RE: dynamic SQL & triggers

    Okay, I see I missed something.  First, Ninja's RGR'us pointed out I needed to make my own verion of master.dbo.sp_execresultset instead of modifying it, in order to keep the warranty...

  • RE: xp_execresultset & ANSI_NULLS

    Thanks for the tip -- I will certainly do as you suggested.

  • RE: dynamic SQL & triggers

    Jono,

    I'm doing something similar.  I have three databases with the same table and I want to copy the data from one database to another (3 seperate clients who sort of...

  • RE: linked server trigger problem

    I did figure out the issue I had.  My sproc was created with SET ANSI_NULLS ON.  Within my sproc I was calling master.dbo.execresultset.  THAT sproc was not created with SET...

  • RE: xp_execresultset & ANSI_NULLS

    As it turns out xp_execresultset calls master.dbo.sp_execresultset.  THAT sproc was not create with set ANSI_NULLS ON.  So, I recreated it that way and everything runs just fine.

  • RE: linked server trigger problem

    Hum, obviously you have indeed created this the way all the posts suggest (ANSI_NULLS ON).  Just wanted to verify.

    Wish I had a solution for you.  I have a very similar...

  • RE: linked server trigger problem

    What is the value for this (1=ON):

    SELECT OBJECTPROPERTY(OBJECT_ID('dbo.tri_InsertUPSShipmentTrigger'), 'ExecIsAnsiNullsOn')

    AS 'AnsiNulls'

  • RE: query

    I'm guessing...Hard to say without a little more info (such as sample data and sample expected results) :

    select a,b,c,d from emp

    inner join (select distinct c from emp) emp2 on emp2.c...

  • RE: linked server trigger problem

    I'm having a similar issue.  Let me know what you find and I'll do the same.

    There are several posts that instruct you to be sure that you create the sproc...

  • RE: EXEC the result set of a query?

    My bad.  I structured my search a couple different ways and found an answer.

    I see this has been asked a million times and xp_execresultset seems to be the answer.

    Anyone have any...

  • RE: does not match with a table name or alias name used in the query

    Would something like this work for you (I didn't set up test data to check the syntax):

    select PP.product_id,PP.product_description,ACC.account_number

    into ##temp

    from dbo.products as PP

    inner join other_server_name.db_named.dbo.account_table as ACC on PP.productid = ACC.productid

    inner...

Viewing 15 posts - 31 through 45 (of 60 total)