Results 1 to 9 of 9
  1. #1
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: access (2000)

    I'm a bit confused. Is the query SQL text that you posted first and attempt to do what you described? Or is it the basis on which you are trying to create a new query to return the things you indicated? If it is the latter, the SQL string will only return one name since it has a parameter prompt for Last Name.
    Wendell

  2. #2
    New Lounger
    Join Date
    Mar 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    SQL for query (Access 2000)

    Subject edited by HansV to be slightly more specific than just "Access"

    SELECT Count([SAR Log - Cumulative].UCN) AS CountOfUCN, Sum([SAR Log - Cumulative].[Lives Saved]) AS [SumOfLives Saved], Sum([SAR Log - Cumulative].[Lives Assisted]) AS [SumOfLives Assisted], Sum([SAR Log - Cumulative].[Lives Lost]) AS [SumOfLives Lost], Sum([SAR Log - Cumulative].[Property Saved]) AS [SumOfProperty Saved], Sum([SAR Log - Cumulative].[Property Assist]) AS [SumOfProperty Assist], Sum([SAR Log - Cumulative].[Property Lost]) AS [SumOfProperty Lost]
    FROM [SAR Log - Cumulative]
    WHERE ((([SAR Log - Cumulative].Date) Between [Start Date:] And [End Date:]))
    HAVING ((([SAR Log - Cumulative].[Asst/Break-In])=[Enter Last Name:])) OR ((([SAR Log - Cumulative].TCOW)=[Enter Last Name:])) OR ((([SAR Log - Cumulative].ODO)=[Enter Last Name:])) OR ((([SAR Log - Cumulative].[TCOW Asst])=[Enter Last Name:]));

    I am try to run a query on the following. the query is last name, date range , total numbers of sar cases.
    can anyone help me.

  3. #3
    New Lounger
    Join Date
    Mar 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: access (2000)

    I tired to run a quiery based on the information but , it does not work. I keep get errors .
    I copyed one query i had working, that query was giving me a date range so I wanted a query with a date range and last name displayed with the amout of sar cumm stats displayed.
    Thanks

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: access (2000)

    Like Wendell, I'm confused. Do you want to create a new query based on the query whose SQL you posted, or do you want to create a variation of that query? Please explain what the situation is and what you are trying to accomplish, and try to be as clear and as specific as possible.

  5. #5
    New Lounger
    Join Date
    Mar 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: access (2000)

    I want to creat a query based on the information in my sql.
    The only part of it that is not working is when I put in someones last name I am getting a error msg.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: access (2000)

    What does the error message say?

  7. #7
    New Lounger
    Join Date
    Mar 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: access (2000)

    I am at home and the program is at work, but it is saying something like it is to complex to run.

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: access (2000)

    Try the following:
    - Open the first query (whose SQL you posted) in design view.
    - Select Query | Parameters.
    - Type [Start Date:] (exactly as in your query) in the Parameter column in the first row.
    - Select Date/Time in the Data Type column.
    - Type [End Date:] (exactly as in your query) in the Parameter column in the second row.
    - Select Date/Time in the Data Type column.
    - Type [Enter Last Name:] (exactly as in your query) in the Parameter column in the third row.
    - Select Text in the Data Type column.
    - Click OK.
    - Save the query.
    - See if you can open the new query succesfully now.
    - If not, repeat the above steps for the new query.

  9. #9
    New Lounger
    Join Date
    Mar 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: access (2000)

    thanks
    I will try it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •