• Hi

    What kind of remote server is connected?

    rjern (5/1/2009)


    I have a very complex and large SQL program that has one OPENQUERY select statement using a linked server. The problem I am expericing is that I have appearently hit a limit on the number of characters that one can have in a single Select statement

    Could you explain more detailed what you are doing in this statement? Example? DDL?

    or I hit a limit of the number of files you can loop against

    What do you mean with "files"?

    I have 3 more fields and 3 more tables that require 2 select coding loops to pull the most current data by max date. When I try to add them within the OPENQUERY statement I get a syntax error when validating the code and it is bogus as there is not any syntax error.

    A syntax error usually specifies an error in your statement, not a to huge statement.

    Can one use multiple OPENQUERY statements in a single TSQL program and if not what is a good work arournd?

    What do you mean with "TSQL program"? Sure, you can use more than one statements using OPENQUERY in an application. You can also use more than one OPENQUERY in one SQL statement.

    Maybe have a look to the link in my signature to get better help.

    Greets

    Flo