Forum Replies Created

Viewing 15 posts - 5,206 through 5,220 (of 5,394 total)

  • RE: Query Timeout

    This is because you're working with constant values: 1/0 is evaluated before the query is executed, I think during the execution plan elaboration.

    In my test code this works:

    DECLARE @id int

    SELECT...

  • RE: Query Timeout

    I can't answer any of your questions, I can only confirm that short circuit is one of the features implemented in sqlserver:

    http://technet.microsoft.com/it-it/cc678236(en-us).aspx

    Search in this page for shor circuit and you'll...

  • RE: Query Timeout

    Test code:

    CREATE TABLE #tmpTab (

    column1 int,

    column2 int

    )

    INSERT INTO #tmpTab

    SELECT A.colorder, B.status

    FROM syscolumns A

    INNER JOIN syscolumns B

    ON A.colorder = B.colorder

    This is what I tried:

    SET STATISTICS IO ON

    SELECT 1

    WHERE...

  • RE: Query Timeout

    It would be nice to investingate what happens when indexes are involved: does this happen only beacuse my example works on a heap?

    I'll be back with news...

  • RE: Query Timeout

    Other cases with the same test data:

    Divide by zero error:

    select *

    from @tmpTab

    where (column1/column2 = 1)

    OR column1 = column1

    No error thrown:

    select *

    from @tmpTab

    where (column1/column2 = 1)

    OR 1...

  • RE: Query Timeout

    Now I'm sure that SQLServer uses shortcircuit OR. Try this:

    DECLARE @tmpTab TABLE (

    column1 int,

    column2 int

    )

    declare @param1 int

    declare @result int

    set @param1 = 3

    insert into @tmpTab VALUES(1,1)

    insert into @tmpTab...

  • RE: how to retrive the second highest value from the table

    I can't believe this thread is still alive...

    Maybe we'll have to write an article titled "100 ways to find 2nd highest salary"...:-D

  • RE: Query Timeout

    With Shortcircuit OR I mean that if the first expression is True, all the other expressions in the OR clause are not even evaluated and True is returned. Maybe SQLServer...

  • RE: Query Timeout

    If you look at the execution plan for the test code I posted earlier, you will see that IN is turned to OR in the table scan predicate. I can...

  • RE: SQL Server Clustering and Virtual Server

    In the Transfer Jobs task I simply pick a connection, on which I could easily type the server name.

    Can you attach a screenshot of your problem?

  • RE: SQL Server Clustering and Virtual Server

    I can't tell you why the virtual server name can't be detected, but I can tell you that it's never been a problem for me, since I always type the...

  • RE: update column from another table

    Steve Jones - Editor (5/18/2009)


    You have duplicates, but why not a straight update if you don't have them?

    update Person

    set postto = orgid

    from functionofperson

    where functionofperson.pid = person.pid

    No...

  • RE: update column from another table

    I think this is a database design problem: if a person can have more than 1 function, maybe person table is not the right table to store that information. Probably...

  • RE: update column from another table

    I guess it's exactly what the error message states: the query returned more than 1 row.

    Check if you have duplicate pid in functionofperson:

    SELECT pid, COUNT(*)

    FROM functionofperson

    GROUP BY pid

    HAVING COUNT(*)...

  • RE: how to use SFTP with dts sql 2000

    I'm sorry, DTS packages don't implement SFTP, I think you'll have to implement it with a 3rd party tool, like putty.

    http://www.putty.org

    I think there's some way to automate SFTP tasks, but...

Viewing 15 posts - 5,206 through 5,220 (of 5,394 total)