Filter in MSAccess Query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nasie
    New Member
    • Jan 2012
    • 5

    Filter in MSAccess Query

    I have the following table in MS Access and want to Sort the remedies columns (all rows ) so the remedy corresponds the maximum symptom should be the first and the less later
    Attached Files
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    Please post the SQL rather than attaching a file.

    Comment

    • Nasie
      New Member
      • Jan 2012
      • 5

      #3
      Originally posted by Rabbit
      Please post the SQL rather than attaching a file.
      Sir I Can't do this because I don;t know the SQL. Please Help me if You Can. Thanks in advance.

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        Go to the SQL view of the query and then copy and paste it.

        Comment

        • Nasie
          New Member
          • Jan 2012
          • 5

          #5
          Thanks for reply.

          as I attatched the files basically the programme was written in Perl at and its working version at baltimore homeopathy and its Source codes are also available at carelesshand.co m but I need it Vb code to work behand repertorise button

          Regards Nasie

          Comment

          • Nasie
            New Member
            • Jan 2012
            • 5

            #6
            Sir

            I have the following sorting Procedure in Perl.
            wher the database consist of two column one "SX" and second is "RX" it work fine Exproler but i want to use it in MSAccess Batabase can any one help me how to do

            Code:
            my @i = sort (split (/,/, $form->{rubric}));
            
            if (@i) {
                my $tab = {};
                foreach my $i (@i) {
            	$repertory[$i]->{CHECKED} = 1;
            	
            	my @rx = split (/,\s*/, $repertory[$i]->{RX});
            	foreach my $rx (@rx) {
            	    $tab->{$rx}{$i} = 1;
            	}
                }
                
                # Create an array of remedies sorted in order 
                # of how many rubrics contain them
                
                my @counted_rx;
                foreach my $rx (keys %$tab) {
            	push (@counted_rx, [$rx, scalar keys %{$tab->{$rx}}]);
                }
                
                @counted_rx = sort {$b->[1] <=> $a->[1]} @counted_rx;
                my  @rx = map {$_->[0]} @counted_rx;
                @rx = @rx[0 .. $nrx-1];
            Last edited by Rabbit; Feb 20 '12, 11:35 PM. Reason: Please us code tags when posting code.

            Comment

            • Rabbit
              Recognized Expert MVP
              • Jan 2007
              • 12517

              #7
              I have no idea what you're talking about. In your original post, you said you're using MS Access but all of a sudden you're talking about perl.

              Comment

              • Nasie
                New Member
                • Jan 2012
                • 5

                #8
                Sir Rabbit

                I orignally posted and talking abbout MSAccess And am still talking about msaccess I have other programme in Perl that is working fine but I want to convert in MSaccess Database All other necessities I have managed the only & final thing I ask for help.

                Sir basicaly The programme is related to Homeopathic repertorization Sir Please if to look in to the matter As I already asked for its working version is at the following address homeopathy.inba ltimore.org/boger.pl and source code are also avaiable at carelesshand.ne t by mr Bernie Simon

                Sir final repertorise page could not manage by myself if You kindly have a look at my attached file

                Regards

                Nasie

                Comment

                • Rabbit
                  Recognized Expert MVP
                  • Jan 2007
                  • 12517

                  #9
                  Unfortunately I don't know perl so I can't help you there. If you want, I can move your question to the perl forum and they may be able to help you out there.

                  Comment

                  • rekedtechie
                    New Member
                    • Feb 2012
                    • 51

                    #10
                    'what kind of connection you used to connect your system in your database access .mdb?

                    'if you used ADODC
                    'set this before you get all the data..

                    adodc1.doSql "SELECT * FROM your_tbl_name ORDER BY your_fld_name desc"

                    'desc means descending from max to min..
                    'you can also make it from min to max
                    'by changing the descending to "asc" ascending.

                    Comment

                    Working...