Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Query Help Needed

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Query Help Needed

    I keep track of students who make honor roll each quarter.

    I have two tables - One labeled EMF that contains the student's name and ID#, and another named HNR that contains ID#, HR_Grade, and HR_Type. HR_Grade can have the value "QT1GRADE" OR "QT2GRADE" OR "QT3GRADE" - meaning 1st, 2nd or 3rd quarter. HR_Type can have values of "000", "AB" or "A" - meaning "Didn't make honor roll", "Made A's & B's" and "Made all A's"

    The SET is based on EMF table with a ONE to MANY link to HNR with the linking field ID#.

    I need to know which students made the HONOR ROLL 2 out of 3 quarters. In other words they need to have A or AB on two of the three quarters.

    I wrote this query expression, BUT get an error that I have specified an invaled filter order... Can anyone help? Graduation is this week! Thanks - Dave

    ((Hnr->Hr_grade = "QT1 GRADE") .and.
    (Hnr->Hr_type = "A" .or. Hnr->Hr_type = "AB" ) .AND. (Hnr->Hr_grade = "QT2 GRADE") .AND.
    (Hnr->Hr_type = "A" .or. Hnr->Hr_type = "AB" ))

    .OR.

    ((Hnr->Hr_grade = "QT1 GRADE") .and.
    (Hnr->Hr_type = "A" .or. Hnr->Hr_type = "AB" ) .AND. (Hnr->Hr_grade = "QT3 GRADE").AND.
    (Hnr->Hr_type = "A" .or. Hnr->Hr_type = "AB" ))

    .OR.

    ((Hnr->Hr_grade = "QT2 GRADE" ) .and.
    (Hnr->Hr_type = "A" .or. Hnr->Hr_type = "AB" )
    .AND. (Hnr->Hr_grade = "QT3 GRADE" ) .and.
    (Hnr->Hr_type = "A" .or. Hnr->Hr_type = "AB" ))
    David Theoharides
    Assistant Superintendent of Schools
    Sanford School Department
    917 Main Street - Suite 200
    Sanford, ME 04073
    [email protected]

    #2
    RE: Query Help Needed

    David, that makes my head hurt.

    If it were me, I'd design 3 separate operations, to copy the honorees to another table, and base the report on that table.

    Q1 & Q2

    Q1 & Q3

    Q2 & Q3

    When finished I'd weed out the duplicates. If someone is eligible in all 3 quarters, they'll be in the list 3x.

    -- tom

    Comment


      #3
      RE: Query Help Needed

      Thanks Tom... My head hurts too... I've been working on this supposedly simple problem too long. All I want to do is select parent records from a set by querying the records of the child table. Can that be done? If a parent record contains child records that, in this case, equal a certain value, then select it.

      How would you do what you explained in your reply?

      Thanks

      Dave
      David Theoharides
      Assistant Superintendent of Schools
      Sanford School Department
      917 Main Street - Suite 200
      Sanford, ME 04073
      [email protected]

      Comment


        #4
        RE: Query Help Needed

        David, yes, in principle a cross-level query will find the correct parent table records. The difficulty is how the data is arranged in your tables, coupled with the permutations and combinations that must be dealt with in your retrieval criteria. My first suggestion was an effort to try to break the complex down into smaller more manageable pieces. Let me think about it some more. I'll be back.

        -- tom

        Comment


          #5
          RE: Query Help Needed

          David,

          If the HNR table only contains records for the current school year, here's how I'd approach this problem:

          1) I'd write a short script to process the records in the HNR table, copying only the ID# field value from that table to a temporary table whenever the student made the honor roll in 2 out of 3 quarters.

          2) I'd create a simple 1:1 set with the temp table as parent, and the EMF table as child.

          3) I'd print the report listing the names of eligible students from the set.

          If this is something you wish to explore I'll be happy to coach you through it via email.

          -- tom

          Comment


            #6
            RE: Query Help Needed

            I think a simpler solution would be to create a field, "honors_total", in the EMF table. Then do a posting operation from the HNR table to add "1" to the appropriate record in the HNR table for every "A" or "AB" found. Then all you have to do is to query the EMF table for everyone with a 2 or a 3 in the honors_total field.

            Comment


              #7
              RE: Query Help Needed

              Dr. Wayne,

              Indeed! Very good! If modifying the structure is an option that looks like it's the easy ticket! (Though it would be fun to write a little script with nested while : end while loops, too!)

              Let's hope the HNR table only has records for the current school year.

              -- tom

              Comment


                #8
                RE: Query Help Needed

                Thanks Guys,

                before reading your responses, I made a copy operation to copy only records that were A or AB from Q1. I then used the same operation for Q2 and then Q3 - resulting in three new tables. I then JOINED Q1 and Q2, then JOINED that new table with Q3. UGH... what a hassle! It did work though and I was able to then filter the resulting like this:

                (Hr_Typeq1"" .AND. Hr_Typeq2"") .OR. (Hr_Typeq1"" .AND. Hr_Typeq3"") .OR. (Hr_Typeq2"" .AND. Hr_Type3"")

                Thanks for both of your suggestions.

                Dave

                David Theoharides, Principal
                Mattanawcook JHS
                Lincoln, ME 04457
                David Theoharides
                Assistant Superintendent of Schools
                Sanford School Department
                917 Main Street - Suite 200
                Sanford, ME 04073
                [email protected]

                Comment


                  #9
                  RE: Query Help Needed

                  Glad you got your problem solved. In looking at your original post, I'm confused. You posted the filter expression but state that the error message was

                  "get an error that I have specified an invaled filter order"

                  That error refers to something entirely separate, namely the order expression, not the filter expression.

                  Could well be that your original filter, as posted would have worked.
                  There can be only one.

                  Comment


                    #10
                    RE: Query Help Needed

                    I understand what you mean, but I tried with and without an order expression. I'll play with that approach some more.
                    Thanks
                    David Theoharides
                    Assistant Superintendent of Schools
                    Sanford School Department
                    917 Main Street - Suite 200
                    Sanford, ME 04073
                    [email protected]

                    Comment

                    Working...
                    X