problem in query

  • name = file name in worksheet

    filename = file name in worksheet production month = 11/1/2008 day =2 test1 = 424 test2 = 647 test3 = 416

    filename = file name in worksheet production month = 11/1/2008 day =3 test1 = 402 test2 = 634 test3 = 417

    filename = file name in worksheet production month = 11/1/2008 day =4 test1 = 420 test2 = 629 test3 = 411

    filename = file name in worksheet production month = 11/1/2008 day =5 test1 = 424 test2 = 630 test3 = 410

    filename = file name in worksheet production month = 11/1/2008 day =6 test1 = 437 test2 = 628 test3 = 413

    filename = file name in worksheet production month = 11/1/2008 day =7 test1 = 431 test2 = 630 test3 = 415

    filename = file name in worksheet production month = 11/1/2008 day =8 test1 = 440 test2 = 626 test3 = 408

    filename = file name in worksheet production month = 11/1/2008 day =9 test1 = 415 test2 = 624 test3 = 405

    filename = file name in worksheet production month = 11/1/2008 day =10 test1 = 419 test2 = 649 test3 = 406

    filename = file name in worksheet production month = 11/1/2008 day =11 test1 = 419 test2 = 644 test3 = 403

    filename = file name in worksheet production month = 11/1/2008 day =12 test1 = 437 test2 = 644 test3 = 392

  • The day number would be ideal, why don't you use that instead of @Testname?

    “Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden

  • it is only doing to one worksheet then!!

  • pat (1/6/2009)


    it is only doing to one worksheet then!!

    Nah...IF (EXISTS (SELECT fname FROM testtable WHERE fname = @Testname AND day = @day))

    “Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden

  • Hi Thank you very much for your help. It is working fine now!! Appriciated you help and patient with me!!

Viewing 5 posts - 31 through 34 (of 34 total)

You must be logged in to reply to this topic. Login to reply