Forum Replies Created

Viewing 15 posts - 451 through 465 (of 1,082 total)

  • RE: Rules For Effecient Joins?

    Thanks for the update Grant 🙂

    I've seen a query which joins two views (ok those views where based on other views) and the FORCE OPTION changed the query from +30secs...

  • RE: Rules For Effecient Joins?

    Hi,

    As far as I am aware the join order will make no difference as the optimizer decides how to do them.

    Unless you use the Query Hint Option 'FORCE ORDER'

  • RE: select query peformance

    Oh ok I guess it depends on the optimizer then

  • RE: Datepart and Preceding Zeros??

    Hey Chris how you doing long time no chat 🙂

    Just a note that if you found the solution could you post it please in case someone else has the same...

  • RE: Can you solve this sort problem?

    How about allowing the sort expression to be fully defined.

    here is my code with your sample data.

    CREATE TABLE Results

    (Username VARCHAR(100),

    Correct INT,

    TotalTime DECIMAL(10,2),

    testid INT)

    INSERT INTO Results

    SELECT 'Amy',9,13.5,1 UNION ALL

    SELECT 'John',8,10.9,1 UNION...

  • RE: Use Excel to DIFF Your Query Outputs

    Great tool.

    I'm already started using it and it's a charm.

    I made some changes for mine so that it could work in any workbook regardless of the names of the sheets....

  • RE: select query peformance

    Hi All,

    Gail, stop me if I'm wrong, but could the OP not use an EXISTS in the where clause instead of the join and this would allow the optimizer to...

  • RE: select query peformance

    you might want to check the link in my sig (Help us Help you) as well , it gives good advice and what to supply when making posts.

    🙂

  • RE: select query peformance

    ok I've created this code which you will note does not have clustered indexes on both tables but it still takes sec's to run.

    you might need to supply the query...

  • RE: select query peformance

    which column is the clustered index on and also is the storeId FK to the Id on the machine table or the other way around?

  • RE: select query peformance

    which table does NumberofParts sit in and what indexes are on the tables?

  • RE: CTE Constant

    Is this some sort of paging that you are trying to do?

  • RE: Display the Time

    I think this is what you want.

    DECLARE @date DATETIME

    SET @date = '2008-01-01 16:11:10'

    SELECT RIGHT(CONVERT(VARCHAR,@date ,100),6)

  • RE: Alternative of ROW_NUMBER() in sql server 2000

    try something like this.

    DECLARE @YourTable TABLE

    (Cust_ID INT,Date DATETIME)

    INSERT INTO @YourTable

    SELECT 1,'2008-12-05' UNION ALL

    SELECT 1,'2008-12-08' UNION ALL

    SELECT 1,'2008-12-25' UNION ALL

    SELECT 1,'2008-12-28'

    DECLARE @MyTable TABLE

    (id INT IDENTITY(1,1),Cust_ID INT,Date DATETIME)

    INSERT INTO @MyTable...

  • RE: Alternative of ROW_NUMBER() in sql server 2000

    There is no row number in SQL 2000

    What is it you trying to do?

Viewing 15 posts - 451 through 465 (of 1,082 total)