Results 1 to 2 of 2

Thread: Setting up a specific query

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 1999
    Location
    Waynesville, OH, USA
    Posts
    11

    Post

    I am currently programming my database through the Microsoft Access program, but have recently been stuck on how to proceed in doing some of the more complex operations I need to accomplish.

    I am currently setting up a query to search through my entries and bring up results based on varying criteria. However, I am wondering if there is any way to make criteria based upon another field in the table.

    i.e. Say I have a [Table 1] with two data sources in it, say a [Date] and a [Value].
    I want to sort the [Value] only if the [Date] is between certain times or I want to ignore the entry and not sort the [Value] if the [Date] field contains an invalid argument. How would I go about doing this?

    Thanks for any assistance you may provide.

    Brett Beckett
    [email protected]

  2. #2
    Frenzied Member
    Join Date
    Aug 1999
    Location
    Santa Clara, Ca , 95058
    Posts
    1,105

    Post

    Again, consider a union. On SQL Server 6.5, it won't allow me to specify an order for each select statement (although it's supposed to) but it does merge the 2 selects, retaining the sort order, when a "UNION ALL" statement is used (as opposed to the "UNION" statement which performs exactly as though one select was issued).

    Problem with sorts is that they (in SQL) tend to be all or nothing.

    [This message has been edited by JHausmann (edited 08-09-1999).]

Posting Permissions

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



Click Here to Expand Forum to Full Width