Forum Replies Created

Viewing 15 posts - 5,431 through 5,445 (of 6,036 total)

  • RE: Obscure Error Message in Query Analyser

    can you post your CAST statement?

  • RE: Can sp_executesql return results into variables???

    Yes, it's possible using OUTPUT parameters.

    See BOL how to use parameters with sp_executesql and how to declare and use OUTPUT paramenters.

  • RE: Search by Stored Procedure size

    It's about size of joined rows.

    Len(text)*2 + len(name)*2 + other fixed sizes must be < 8095

    You can identify problermatic objects with this query:

    select O.Name, S.Text, LEN(S.Text), len(O.Name) + LEN(S.Text)

    from...

  • RE: Search by Stored Procedure size

    I've got the same error when I ran this query against master db!

    I modified script a little and error has gone:

    select O.name , SumLen

    from sysobjects O

    INNER...

  • RE: Search by Stored Procedure size

    sysobjects O

    inner join syscomments S on O.ID = S.ID

    Group by O.name

    Order by Sum(Len(S.Text)) Desc 

     

      |--Sort(ORDER BY:...

  • RE: Search by Stored Procedure size

    My SQL Server is SP4.

    And everything works perferct.

    I have SP with size 104kb. And I can see it in the resultset.

    I don't know how collation may affect this query because there...

  • RE: Search by Stored Procedure size

    But it works!

    Any of these scripts does not fail on any of servers I can access.

    Try to find out what's wrong with your server.

    Do some test exersises like this:

    SELECT MAX(LEN(TEXT))...

  • RE: Search by Stored Procedure size

    TEXT column in syscomments has type NVARCHAR(4000).

    It cannot be too long.

  • RE: Search by Stored Procedure size

    I've used copy-paste into my QA for the first suggestion - it works without any problem.

    SQL Server 2000 SP4.

    What's wrong with your SQL Server?

  • RE: select exec @String_Variable

    # tables exist until connection is ended or you explicitely drop it.

    If you run it from QA it will stay there until you close the window or execute

    DROP #Foo.

    If...

  • RE: link server as a variable

    DECLARE @linkedServerName VARCHAR(255)

    SET @linkedServerName = 'ProductionLinkedServerName'

    GO -- What this thing is doing here???

    EXEC('CREATE PROCEDURE whatever

    AS

    BEGIN

        SELECT * FROM ['+@linkedServerName+']. ...

    END

    GO')

    And...

  • RE: CharIndex function, a bug???

    Result from my computer:

    RIGHTHAND                 Position_SpaceSpaceHAND Position_SpaceHAND

    ------------------------- ----------------------- ------------------

    RIGHT HAND with one space 0                       6

    (1 row(s) affected)

    RIGHTHAND                  Position_SpaceSpaceHAND Position_SpaceHAND

    -------------------------- ----------------------- ------------------

    RIGHT HAND with two spaces 6                       7

    (1...

  • RE: Restarting numbering when deleting tables

    Did you bother to open BOL on topic "IDENTITY (property)"?

  • RE: limitation to UDF parameters (returns table)?

    BTW, table UDF is a View with parameter.

    If you want to have a VIEW dependable on any parameter you don't need to inbiuld table UDF in this VIEW, you need...

  • RE: limitation to UDF parameters (returns table)?

    When optimizer parses query it cannot tell how many records will be returned.

    So it treats SELECT as an array, no matter what you have in mind.

    Table function desined to return...

Viewing 15 posts - 5,431 through 5,445 (of 6,036 total)