Loading ...
Sorry, an error occurred while loading the content.

Help in query

Expand Messages
  • Kathy Iwasik
    Can any one please help me in creating query Actual Data in database ID Name Award Note 91 Maxine Ace Award Give on date 23rd February. 91 Maxine Ace Award
    Message 1 of 10 , Jul 15 5:52 AM
    • 0 Attachment
      Can any one please help me in creating query

      Actual Data in database
      ID Name Award Note
      91 Maxine Ace Award Give on date 23rd February.
      91 Maxine Ace Award Give on date 27th January.
      91 Maxine Meal Voucher Give on date 5th June.
      91 Maxine Meal Voucher Give on date 8th August.
      92 Collette Ace Award Give on date 2nd January.
      92 Collette Ace Award Give on date 3rd March.
      92 Collette Ace Award Give on date 5th July
      92 Collette Ace Award Give on date 9 April
      92 Collette Meal Voucher Give on date 8th November.
      92 Collette Meal Voucher Give on date 7th June.
      92 Collette Meal Voucher Give on date 4th July.

      Required Data
      ID Name Award No of Times Note
      91 Maxine Ace Award 2 Give on date 23rd February.Give on date 27th January.
      91 Maxine Meal Voucher 2 Give on date 5th June.Give on date 8th August.
      92 Collette Ace Award 3 Give on date 2nd January.Give on date 3rd March.Give on date 5th July
      92 Collette Meal Voucher 3 Give on date 8th November.Give on date 7th June.Give on date 4th July.
      Thanks,


      ---------------------------------
      Do you Yahoo!?
      Next-gen email? Have it all with the all-new Yahoo! Mail Beta.

      [Non-text portions of this message have been removed]
    • John Warner
      SELECT COUNT(Award) as Something, ID, Name, Note FROM Table name GROUP BY ID, Name, Note; I haven t test but give this a try. John Warner
      Message 2 of 10 , Jul 15 10:04 AM
      • 0 Attachment
        SELECT COUNT(Award) as Something, ID, Name, Note
        FROM Table name
        GROUP BY ID, Name, Note;

        I haven't test but give this a try.

        John Warner


        > -----Original Message-----
        > From: SQLQueriesNoCode@yahoogroups.com
        > [mailto:SQLQueriesNoCode@yahoogroups.com] On Behalf Of Kathy Iwasik
        > Sent: Saturday, July 15, 2006 8:52 AM
        > To: SQLQueriesNoCode@yahoogroups.com
        > Subject: [SQLQueriesNoCode] Help in query
        >
        >
        > Can any one please help me in creating query
        >
        > Actual Data in database
        > ID Name Award Note
        > 91 Maxine Ace Award Give on date 23rd February.
        > 91 Maxine Ace Award Give on date 27th January.
        > 91 Maxine Meal Voucher Give on date 5th June.
        > 91 Maxine Meal Voucher Give on date 8th August.
        > 92 Collette Ace Award Give on date 2nd January.
        > 92 Collette Ace Award Give on date 3rd March.
        > 92 Collette Ace Award Give on date 5th July
        > 92 Collette Ace Award Give on date 9 April
        > 92 Collette Meal Voucher Give on date 8th November.
        > 92 Collette Meal Voucher Give on date 7th June.
        > 92 Collette Meal Voucher Give on date 4th July.
        >
        > Required Data
        > ID Name Award No of Times Note
        > 91 Maxine Ace Award 2 Give on date 23rd February.Give on date
        > 27th January. 91 Maxine Meal Voucher 2 Give on date 5th
        > June.Give on date 8th August. 92 Collette Ace Award 3 Give on
        > date 2nd January.Give on date 3rd March.Give on date 5th July
        > 92 Collette Meal Voucher 3 Give on date 8th November.Give on
        > date 7th June.Give on date 4th July.
        > Thanks,
      • Arnie Rowland
        Hi Kathy, Here is some code that will give you the idea of how to create your query. Copy this into QA to see how it works. Then revise the FUNCTION below for
        Message 3 of 10 , Jul 15 10:19 AM
        • 0 Attachment
          Hi Kathy,

          Here is some code that will give you the idea of how to create your query.
          Copy this into QA to see how it works. Then revise the FUNCTION below for
          your needs.

          /*
          Desired Results is something like this

          Column1 Column2
          ---------- -----------------
          db1 host1,host2,host3
          db2 host1,host2
          db3 host2,host3

          */

          --Example Code to create the results

          CREATE TABLE ConcatTable
          ( Column1 varchar(10)
          , Column2 varchar(10)
          )
          GO

          INSERT INTO ConcatTable VALUES ( 'db1', 'host1' )
          INSERT INTO ConcatTable VALUES ( 'db1', 'host2' )
          INSERT INTO ConcatTable VALUES ( 'db1', 'host3' )
          INSERT INTO ConcatTable VALUES ( 'db2', 'host1' )
          INSERT INTO ConcatTable VALUES ( 'db2', 'host2' )
          INSERT INTO ConcatTable VALUES ( 'db3', 'host2' )
          INSERT INTO ConcatTable VALUES ( 'db3', 'host3' )
          GO


          -- In SQL Server 2000, it cannot be done in a single query. a function is
          needed.
          -- Create the function first...

          CREATE FUNCTION dbo.ConcatValues
          ( @Column1 varchar(10) )
          RETURNS varchar(1000)
          AS
          BEGIN

          DECLARE @Results varchar(1000)

          SELECT @Results = coalesce( @Results, '' ) + ',' + Column2
          FROM ConcatTable
          WHERE Column1 = @Column1

          RETURN stuff( @Results, 1, 1, '' )

          END
          GO

          --Now the query is simple.


          SELECT
          Column1
          , dbo.ConcatValues( Column1 )
          FROM ConcatTable
          group by Column1
          ORDER BY Column1

          DROP TABLE ConcatTable
          DROP FUNCTION dbo.ConcatValues

          Good Luck.

          - Arnie Rowland

          "I am a great believer in luck, and I find that the harder I work, the more
          I have of it." - Thomas Jefferson (1743-1826)


          -----Original Message-----
          From: SQLQueriesNoCode@yahoogroups.com
          [mailto:SQLQueriesNoCode@yahoogroups.com] On Behalf Of Kathy Iwasik
          Sent: Saturday, July 15, 2006 9:45 AM
          To: Arnie
          Subject: [SQLQueriesNoCode] Help in query

          Can any one please help me in creating query

          Actual Data in database
          ID Name Award Note
          91 Maxine Ace Award Give on date 23rd February.
          91 Maxine Ace Award Give on date 27th January.
          91 Maxine Meal Voucher Give on date 5th June.
          91 Maxine Meal Voucher Give on date 8th August.
          92 Collette Ace Award Give on date 2nd January.
          92 Collette Ace Award Give on date 3rd March.
          92 Collette Ace Award Give on date 5th July
          92 Collette Ace Award Give on date 9 April
          92 Collette Meal Voucher Give on date 8th November.
          92 Collette Meal Voucher Give on date 7th June.
          92 Collette Meal Voucher Give on date 4th July.

          Required Data
          ID Name Award No of Times Note
          91 Maxine Ace Award 2 Give on date 23rd February.Give on date 27th January.
          91 Maxine Meal Voucher 2 Give on date 5th June.Give on date 8th August.
          92 Collette Ace Award 3 Give on date 2nd January.Give on date 3rd March.Give
          on date 5th July
          92 Collette Meal Voucher 3 Give on date 8th November.Give on date 7th
          June.Give on date 4th July.
          Thanks,


          ---------------------------------
          Do you Yahoo!?
          Next-gen email? Have it all with the all-new Yahoo! Mail Beta.

          [Non-text portions of this message have been removed]





          Yahoo! Groups Links











          Disclaimer - July 15, 2006
          This email and any files transmitted with it are confidential and intended solely for SQLQueriesNoCode@yahoogroups.com. If you are not the named addressee you should not disseminate, distribute, copy or alter this email. Any views or opinions presented in this email are solely those of the author and might not represent those of Westwood Consulting, Inc. Warning: Although Westwood Consulting, Inc has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments.
          This disclaimer was added by Policy Patrol: http://www.policypatrol.com/


          [Non-text portions of this message have been removed]
        • Kathy Iwasik
          I try it but it simple display all records. I am using Access SELECT COUNT(Award1) as kk, award1 as aw, Emp_ID, Name1 as ss, Notes as not1 FROM Award GROUP BY
          Message 4 of 10 , Jul 15 12:00 PM
          • 0 Attachment
            I try it but it simple display all records. I am using Access

            SELECT COUNT(Award1) as kk, award1 as aw, Emp_ID, Name1 as ss, Notes as not1 FROM Award GROUP BY Emp_ID, Name1, Notes,award1 order by name1"

            Award1=Ace Award, Meal Voucher etc etc
            Name1=Maxine, Courtney etc etc


            S.No Name Reward No of Rewards Notes
            1 Barry Reeves Incentive Winner 1 Won June 06 award for 2nd most presale putaway transactions
            2 Brad Vanriper Ace Award 1 For stepping up and facilitating getting 25 skids of Mass annuity surplus back into WMS so it can be picked for orders.
            3 Brad Vanriper Incentive Winner 1 Won June 06 award for increasing his transactions month over month the most on the team.
            4 Braulio Lara Incentive Winner 1 Won June 06 award for most transactions by Supplementing team.
            5 Collette Johnson Ace Award 1 For finding a faster way to provide me with the IFST Report.
            6 Collette Johnson Time Off 1 Given the day off on 6/30 with pay due to the tremendous job she has been doing training Nicole and Maxine as she continues to flawlessly handle her own workload.
            7 Collette Johnson Meal Voucher 1 Great job being timely and accurate with all reporting for the department.
            8 Courtney Coghiel Meal Voucher 1 For his leadership around preparing the group for the ISO audit and clearing the floor.
            9 Courtney Coghiel Ace Award 1 For cleaning up the new side of the warehouse and filling in for Maxine answering CS requests.
            10 Julian Vargas Ace Award 1 For stepping up and facilitating getting 25 skids of Mass annuity surplus back into WMS so it can be picked for orders.
            11 Julian Vargas Incentive Winner 1 Won June 06 award for most presale putaway transactions.
            12 Marcia Lara Incentive Winner 1 Won June 06 award for most postsale putaway transactions.
            13 Maxine Gollab Ace Award 1 Catching an error on Postsale material.
            14 Maxine Gollab Meal Voucher 1 Great job leading the data entry/research team
            15 Maxine Gollab Ace Award 1 For taking the lead on answering all ordering questions.
            16 Maxine Gollab Ace Award 1 For working with me to fix all ordering issues.
            17 Maxine Gollab Time Off 1 Gave 7/24/06 off with pay for all the hard work and making copies of 4251 supps during the month of June.
            18 Nicole Simms Meal Voucher 1 Great job learning the T+1 and having a great attitude.
            19 Rod Bridgers Incentive Winner 1 Won June 06 award for 2nd most supplementing transactions.


            ---------------------------------
            Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.

            [Non-text portions of this message have been removed]
          • Arnie Rowland
            So now you tell us that you are using Access. Thanks. You may wish to try some of the 20+ Access newgroups located at Microsoft.public.access. - Arnie Rowland
            Message 5 of 10 , Jul 15 1:24 PM
            • 0 Attachment
              So now you tell us that you are using Access. Thanks.

              You may wish to try some of the 20+ Access newgroups located at

              Microsoft.public.access.

              - Arnie Rowland

              "I am a great believer in luck, and I find that the harder I work, the more
              I have of it." - Thomas Jefferson (1743-1826)


              -----Original Message-----
              From: SQLQueriesNoCode@yahoogroups.com
              [mailto:SQLQueriesNoCode@yahoogroups.com] On Behalf Of Kathy Iwasik
              Sent: Saturday, July 15, 2006 1:10 PM
              To: Arnie
              Subject: [SQLQueriesNoCode] Help in query

              I try it but it simple display all records. I am using Access

              SELECT COUNT(Award1) as kk, award1 as aw, Emp_ID, Name1 as ss, Notes as not1
              FROM Award GROUP BY Emp_ID, Name1, Notes,award1 order by name1"

              Award1=Ace Award, Meal Voucher etc etc
              Name1=Maxine, Courtney etc etc


              S.No Name Reward No of Rewards Notes
              1 Barry Reeves Incentive Winner 1 Won June 06 award for 2nd most presale
              putaway transactions
              2 Brad Vanriper Ace Award 1 For stepping up and facilitating getting 25
              skids of Mass annuity surplus back into WMS so it can be picked for orders.

              3 Brad Vanriper Incentive Winner 1 Won June 06 award for increasing his
              transactions month over month the most on the team.
              4 Braulio Lara Incentive Winner 1 Won June 06 award for most transactions by
              Supplementing team.
              5 Collette Johnson Ace Award 1 For finding a faster way to provide me with
              the IFST Report.
              6 Collette Johnson Time Off 1 Given the day off on 6/30 with pay due to the
              tremendous job she has been doing training Nicole and Maxine as she
              continues to flawlessly handle her own workload.
              7 Collette Johnson Meal Voucher 1 Great job being timely and accurate with
              all reporting for the department.
              8 Courtney Coghiel Meal Voucher 1 For his leadership around preparing the
              group for the ISO audit and clearing the floor.
              9 Courtney Coghiel Ace Award 1 For cleaning up the new side of the warehouse
              and filling in for Maxine answering CS requests.
              10 Julian Vargas Ace Award 1 For stepping up and facilitating getting 25
              skids of Mass annuity surplus back into WMS so it can be picked for orders.

              11 Julian Vargas Incentive Winner 1 Won June 06 award for most presale
              putaway transactions.
              12 Marcia Lara Incentive Winner 1 Won June 06 award for most postsale
              putaway transactions.
              13 Maxine Gollab Ace Award 1 Catching an error on Postsale material.
              14 Maxine Gollab Meal Voucher 1 Great job leading the data entry/research
              team
              15 Maxine Gollab Ace Award 1 For taking the lead on answering all ordering
              questions.
              16 Maxine Gollab Ace Award 1 For working with me to fix all ordering issues.

              17 Maxine Gollab Time Off 1 Gave 7/24/06 off with pay for all the hard work
              and making copies of 4251 supps during the month of June.
              18 Nicole Simms Meal Voucher 1 Great job learning the T+1 and having a great
              attitude.
              19 Rod Bridgers Incentive Winner 1 Won June 06 award for 2nd most
              supplementing transactions.


              ---------------------------------
              Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+
              countries) for 2¢/min or less.

              [Non-text portions of this message have been removed]







              Yahoo! Groups Links











              Disclaimer - July 15, 2006
              This email and any files transmitted with it are confidential and intended solely for SQLQueriesNoCode@yahoogroups.com. If you are not the named addressee you should not disseminate, distribute, copy or alter this email. Any views or opinions presented in this email are solely those of the author and might not represent those of Westwood Consulting, Inc. Warning: Although Westwood Consulting, Inc has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments.
              This disclaimer was added by Policy Patrol: http://www.policypatrol.com/


              [Non-text portions of this message have been removed]
            • Arnie Rowland
              Sue, I know that you tried to do a good job explaining your problem, and asking for help. However, the narrative is a little difficult to follow to understand
              Message 6 of 10 , Sep 3, 2006
              • 0 Attachment
                Sue,

                I know that you tried to do a good job explaining your problem, and asking
                for help. However, the narrative is a little difficult to follow to
                understand what help you need.

                It would help us better assist you if you could include table DDL, query
                strategy used so far, sample data in the form of INSERT statements, and an
                illustration of the desired results. (For help with that refer to:
                http://www.aspfaq.com/5006 )

                The less 'set up' work we have to do, the more likely you are going to have
                folks tackle your problem and help you. Without this effort from you, we are
                just playing guessing games.

                - Arnie Rowland

                "I am a great believer in luck, and I find that the harder I work, the more
                I have of it." - Thomas Jefferson (1743-1826)


                -----Original Message-----
                From: SQLQueriesNoCode@yahoogroups.com
                [mailto:SQLQueriesNoCode@yahoogroups.com] On Behalf Of Sue Hoffman
                Sent: Sunday, September 03, 2006 4:57 PM
                To: Arnie
                Subject: [SQLQueriesNoCode] Help in query

                Hi: Can any one please help me in creating query.I input from user the
                account number, Technician ID and then search the match in table tech_id
                <snip>


                Disclaimer - September 3, 2006
                This email and any files transmitted with it are confidential and intended solely for SQLQueriesNoCode@yahoogroups.com. If you are not the named addressee you should not disseminate, distribute, copy or alter this email. Any views or opinions presented in this email are solely those of the author and might not represent those of Westwood Consulting, Inc. Warning: Although Westwood Consulting, Inc has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments.
                This disclaimer was added by Policy Patrol: http://www.policypatrol.com/


                [Non-text portions of this message have been removed]
              • Sue Hoffman
                Thanks for your reply. My tables are: Tbl_PPVResearch ... TicketNum Autonumber PK AccountNum Type Text 00000-000000-00 FS_TechID1 Type Text 00000 FS_TechID2
                Message 7 of 10 , Sep 3, 2006
                • 0 Attachment
                  Thanks for your reply. My tables are:
                  Tbl_PPVResearch
                  ---------------
                  TicketNum Autonumber PK
                  AccountNum Type Text 00000-000000-00
                  FS_TechID1 Type Text 00000
                  FS_TechID2 Type Text 00000
                  FS_TechID3 Type Text 00000

                  Tbl_ValidDispute
                  -----------------
                  TicketNum
                  LstVldTech Type Text 00000
                  OtherAcct1 Type Text 00000-000000-00
                  OtherAcct2 Type Text 00000-000000-00
                  OtherAcct3 Type Text 00000-000000-00

                  Tech_ID
                  -------
                  ID PK
                  CORP Type Text 00000
                  Tech Type Text 00000
                  TECHCONT Type Text
                  -----------------------------------------------------------------------------------------------------------------------
                  SAMPLE DATA
                  tbl_PPVResearch
                  ---------------
                  TicketNumAccountNum FS_TechID1 FS_TechID2 FS_TechID3
                  328 07836-033752-01 309
                  329 07882-022113-12 786
                  330 07837-026980-07 773
                  334 07837-337410-03 590
                  335 07876-537867-04 222
                  336 07868-580112-06 643
                  348 07876-579223-02 228
                  349 07875-192714-06
                  351 07870-451873-05
                  352 07840-940441-02 101 20
                  353 07818-242399-05 71
                  356 07844-251648-08 85 415 415
                  362 07862-215662-01 304 70
                  366 07840-356692-02 119
                  377 07836-421118-01 522
                  392 07869-874266-02 316
                  395 07872-119872-03 419 669 538
                  397 07844-071040-06 471
                  400 07804-006655-05 369
                  402 07876-523152-01 CUST PICKUP
                  409 07836-596979-01 713 424 185
                  423 07870-739378-03 373
                  427 07883-596396-05 855 214
                  431 07836-547313-02 557
                  Tbl_ValidDispute
                  ----------------
                  TicketNum OtherAcct1 OtherAcct2 OtherAcct3 LstVldTech
                  478 07837-237258-02 07837-335799-01 07237-404300-01 251
                  647 07837-443814-01 07837-421471-05
                  743 07837-22220-02
                  761 07837-5690-01 07837-474611-02
                  751 07837-531065
                  1004 07837 242858-02
                  1450 07836-640954-02 678
                  1495 07837-024196-04 261

                  tech_id
                  -------
                  CORP TECH TECHCONT
                  07883 214 Fuentes
                  07836 185 Cruz
                  07837 261 Long
                  07837 251 Bing
                  07801 415 Messina
                  07801 416 Malgliolo
                  07801 417 Malgliolo
                  ----------------------------------------------------------------------------------------------------------------------
                  What i try is to run a query which search tech_id.CORP in tbl_PPVResearch.AccountNum, the first five number of AccountNum is a CORP. Once it mathc it search the tech.Tech in (tbl_PPVResearch.FS_TechID1,tbl_PPVResearch.FS_TechID2,tbl_PPVResearch.FS_TechID3) and once it find it shows the result.

                  Second it goes to Tbl_ValidDispute.OtherAcct1,Tbl_ValidDispute.OtherAcct2,Tbl_ValidDispute.OtherAcct3 and search the first five digt of tech_id.Corp once it match it search the tech_id.tech in Tbl_ValidDispute.LstVldTech and once it match it shows the result.

                  Either two different query or one query the output will be:

                  Account Number, Corp, Tech, Techcont

                  Thanks again.



                  ---------------------------------
                  All-new Yahoo! Mail - Fire up a more powerful email and get things done faster.

                  [Non-text portions of this message have been removed]
                • Sue Hoffman
                  Hi: Can any one please help me in creating query.I input from user the account number, Technician ID and then search the match in table tech_id with
                  Message 8 of 10 , Sep 4, 2006
                  • 0 Attachment
                    Hi: Can any one please help me in creating query.I input from user the account number, Technician ID and then search the match in table tech_id with tech_id.CORP and tech_id.TECH. In table tech_id the CORP is equals to the first five digit of account number in both tables.In tbl_PPVResearch there are also three fields (FS_TechID1, FS_TechID2, FS_TechID3). If FS_TechID3 is not empty and match with Tech_ID.Tech means its a lastvalidtechnician or if FS_TechID2 is not empty and FS_TechID3 is empty and match with Tech_ID.Tech it means FS_TechID2 is a lastavlidtechnician otherwise FS_TechID1 (if match with Tech_ID.Tech) is a last valid technician. Once AccountNum and FS_TechID is found then print the report

                    Same in Tbl_ValidDispute i have to search all three otheraccounts. First if otherAcct3 is not empty and match first five digit with tech_id.CORP and also match the LstVldTech with tech_id.TECH and if they both match then print the report. If otherAcct3 is empty but otherAcct2 is not empty then match first five digit with tech_id.CORP also match LstVldTech with tech_id.TECH if both match then print the report. if otherAcct2 and otherAcct3 is empty then match with otherAcct1 and print the report.
                    Thanks,
                    ----------------------------------------------------------------------------------------------------------------

                    Tbl_PPVResearch
                    ---------------
                    TicketNum Autonumber PK
                    AccountNum Type Text 00000-000000-00
                    FS_TechID1 Type Text 00000
                    FS_TechID2 Type Text 00000
                    FS_TechID3 Type Text 00000

                    Tbl_ValidDispute
                    -----------------
                    TicketNum
                    LstVldTech Type Text 00000
                    OtherAcct1 Type Text 00000-000000-00
                    OtherAcct2 Type Text 00000-000000-00
                    OtherAcct3 Type Text 00000-000000-00

                    Tech_ID
                    -------
                    ID PK
                    CORP Type Text 00000
                    Tech Type Text 00000
                    TECHCONT Type Text

                    REPORT
                    AccountNum, CORP, Tech, Techcont


                    ---------------------------------
                    Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small Business.

                    [Non-text portions of this message have been removed]
                  • John Warner
                    I get lost before I finish reading the third line of your question (I think it is the html getting badly formatted by the listserve), could you post the DDL to
                    Message 9 of 10 , Sep 4, 2006
                    • 0 Attachment
                      I get lost before I finish reading the third line of your question (I
                      think it is the html getting badly formatted by the listserve), could
                      you post the DDL to create the tables and some sample data in the form
                      of INSERT statements to help us populate the tables. Then show us the
                      SELECT Statement you have tried and the desired output.

                      Be glad to help, but need a bit of help from you.

                      John Warner


                      > -----Original Message-----
                      > From: SQLQueriesNoCode@yahoogroups.com
                      > [mailto:SQLQueriesNoCode@yahoogroups.com] On Behalf Of Sue Hoffman
                      > Sent: Monday, September 04, 2006 1:58 PM
                      > To: SQLQueriesNoCode@yahoogroups.com
                      > Subject: [SQLQueriesNoCode] Help in query
                      >
                      >
                      > Hi: Can any one please help me in creating query.I input from
                      > user the account number, Technician ID and then search the
                      > match in table tech_id with tech_id.CORP and tech_id.TECH. In
                      > table tech_id the CORP is equals to the first five digit of
                      > account number in both tables.In tbl_PPVResearch there are
                      > also three fields (FS_TechID1, FS_TechID2, FS_TechID3). If
                      > FS_TechID3 is not empty and match with Tech_ID.Tech means its
                      > a lastvalidtechnician or if FS_TechID2 is not empty and
                      > FS_TechID3 is empty and match with Tech_ID.Tech it means
                      > FS_TechID2 is a lastavlidtechnician otherwise FS_TechID1 (if
                      > match with Tech_ID.Tech) is a last valid technician. Once
                      > AccountNum and FS_TechID is found then print the report
                      >
                      > Same in Tbl_ValidDispute i have to search all three
                      > otheraccounts. First if otherAcct3 is not empty and match
                      > first five digit with tech_id.CORP and also match the
                      > LstVldTech with tech_id.TECH and if they both match then
                      > print the report. If otherAcct3 is empty but otherAcct2 is
                      > not empty then match first five digit with tech_id.CORP also
                      > match LstVldTech with tech_id.TECH if both match then print
                      > the report. if otherAcct2 and otherAcct3 is empty then match
                      > with otherAcct1 and print the report.
                      > Thanks,
                      >
                      > --------------------------------------------------------------
                      > --------------------------------------------------
                      >
                      > Tbl_PPVResearch
                      > ---------------
                      > TicketNum Autonumber PK
                      > AccountNum Type Text 00000-000000-00
                      > FS_TechID1 Type Text 00000
                      > FS_TechID2 Type Text 00000
                      > FS_TechID3 Type Text 00000
                      >
                      > Tbl_ValidDispute
                      > -----------------
                      > TicketNum
                      > LstVldTech Type Text 00000
                      > OtherAcct1 Type Text 00000-000000-00
                      > OtherAcct2 Type Text 00000-000000-00
                      > OtherAcct3 Type Text 00000-000000-00
                      >
                      > Tech_ID
                      > -------
                      > ID PK
                      > CORP Type Text 00000
                      > Tech Type Text 00000
                      > TECHCONT Type Text
                      >
                      > REPORT
                      > AccountNum, CORP, Tech, Techcont
                      >
                    • Sue Hoffman
                      There are four tables in my database, three are connected with the TicketNum(Tbl_PPVResearch,Tbl_ValidDispute,tbl_Events). I create a parameter form where user
                      Message 10 of 10 , Sep 4, 2006
                      • 0 Attachment
                        There are four tables in my database, three are connected with the TicketNum(Tbl_PPVResearch,Tbl_ValidDispute,tbl_Events). I create a parameter form where user select the accountnumber. There are four account in my parameterform(one from
                        Tbl_PPVResearch,3 from Tbl_ValidDispute). I need help here user select one or more then one account and also type the technician ID. Once account numbers are selected and technician ID is typed it press the search button and the query has to go to Tech_ID table and match the first five digit of account numbers with corp and also the Tech_ID.tech once both match it print the report
                        REPORT
                        ------
                        txt,AccountNum,OtherAcct1,OtherAcct2,OtherAcct3

                        Tbl_PPVResearch
                        ---------------
                        TicketNum Autonumber PK
                        AccountNum Type Text 00000-000000-00
                        FS_TechID1 Type Text 00000
                        FS_TechID2 Type Text 00000
                        FS_TechID3 Type Text 00000
                        Tbl_ValidDispute
                        -----------------
                        TicketNum Number
                        LstVldTech Type Text 00000
                        OtherAcct1 Type Text 00000-000000-00
                        OtherAcct2 Type Text 00000-000000-00
                        OtherAcct3 Type Text 00000-000000-00
                        tbl_Events
                        ----------
                        TicketNum Number
                        txt type Text

                        Tech_ID
                        -------
                        ID PK
                        CORP Type Text 00000
                        Tech Type Text 00000
                        TECHCONT Type Text


                        ---------------------------------
                        Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small Business.

                        [Non-text portions of this message have been removed]
                      Your message has been successfully submitted and would be delivered to recipients shortly.