help for sql select command !!!

Hi Everyone!
Imagine we have 3 checkBoxes in a search page and 3 boolean fields in
DB table and every checkbox is for one of these fields . In search
page users check every 3 checkBoxes and what i want is that first it
shows the records that every their 3 fields are checked then 2 and
then 1(DESC).
BTW my DB is MS Access.
Please help me !
3/1/2010 6:17:53 PM
dotnet.framework.aspnet 1425 articles. 0 followers. Follow

3 Replies

Similar Articles

[PageSpeed] 52

On Mar 1, 7:17=A0pm, "" <>
> Hi Everyone!
> Imagine we have 3 checkBoxes in a search page and 3 boolean fields in
> DB table and every checkbox is for one of these fields . In search
> page users check every 3 checkBoxes and what i want is that first it
> shows the records that every their 3 fields are checked then 2 and
> then 1(DESC).
> BTW my DB is MS Access.
> Please help me !

ORDER BY field1, field2, field3
gives you that result. however it is not clear what does "then 2"
mean, because it could be first two, or first and third, or second and
third option
3/1/2010 8:19:52 PM
Thanks Alexy !

I meant after that it shows the records that have 2 checked fields and
then shows the records that have 1 checked field .
You got it . I'll try it
3/1/2010 8:50:51 PM
On Mar 1, 9:50=A0pm, "" <>
> Thanks Alexy !
> I meant after that it shows the records that have 2 checked fields and
> then shows the records that have 1 checked field .
> You got it . I'll try it

In my example if you have

X _ X
X _ _
X X _
_ _ X

you will get the result set ordered like this

X X X (3)
X X _ (2)
X _ X (2)
X _ _ (1)
_ _ X (1)
3/1/2010 9:52:55 PM

Similar Artilces:

Help Sendobjest
I am hopping some one can help me I have an application in Access 2000 which has been running on XP and XP professional for a very long time every morning this application creates a list of reminders it then creates an E-Mail for each reminder and with a loop it sends all the e-mails one at a time the code is DoCmd.SendObject acSendNoObject, , acFormatTXT, StrFullAddress, , , strMailSubject, strMailMsg, False All of a sudden a couple of months ago I noticed that it was sending the first mail ok with the usual out look message and then it just looped through the rest but did not send...

meeting invites now show up as emails only
As of very recently, Outlook invites sent from my work calendar to my home calendar (both Outlook, although work Outlook is 2003 I think) now only show up as emails, not as calendar invites. Does anyone have an idea why this is happening - it used to work just fine. Fixes? ...

Please Help: Toolbars in DLL Dialog
Hello, Creating toolbars in an EXE app is a relative piece of cake. However, I am trying to insert a toolbar into a DLL dialog. This is how my DLL dialog works: 1) Contents of a function exporting a dialog AFX_MANAGE_STATE(AfxGetStaticModuleState()); CSvg* dlg; try { dlg = new CSvg(); dlg->Create(IDD_MAIN_FRAME); dlg->ShowWindow(SW_SHOW); } catch (CSvg *dlg) { dlg->PostNcDestroy(); delete dlg; } 2) Use a function in my Dialog class to insert a toolbar: int CSvg::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CDialog::OnCreate(lpCreateStruct) == -1) return -...

NEED HELP-wrong formatting saved ??
After using word 2007 and saving a word file, it changed the formatting from the previous file (i think it was .wps microsoft works word processor) and now its all messed up.....I think I saved it in some other wrong encoding, whenever I open this file now half of it is in some weird looking unreadable this with wha捬屨捦ㅳ尠晡‰汜牴档晜獣‰歜牥楮杮尰扤档慜㍦㔱㔰楜獮獲摩㌱ㄳ〶‷਍灜牡素筽⩜灜獮捥癬ㅬ灜畮牣屭湰瑳牡ㅴ灜楮摮湥㝴〲灜桮湡⁧屻湰硴慴ges! That is what seems to happen once the system breaks its laws from the inside. ......couldnt find online solutions...does anyone have any suggestions or s...

DoCmd.Quit Error "The command or action 'Quit' isn't available now
Hi I need to exit an application if the user closes a certain form in the adp and am trying to do this via the unload method. basically there can be various instances of this form but if one instance is a certain one then it must close the whole application. If have tried in a blank database by putting DoCmd.Quit in the unload method of a form and that works so there must be somthing running that is causing this not to work in my adp. I have also tried putting a button on the form in my adp just to see if putting DoCmd.Quit in the click event would work and it did but this is of no us...

Help with creating a formula
Hello! I am trying to create a formula that will sum up certain criteria from one column as it relates to criteria in the same row in another column. For example, I want to sum up all the entries that begin with the letter "H" in column A as it relates to an entry of "2" from column B that is in the same row as the "H" entry from column A. COLUMN A COLUMN B H10 2 G01 2 H09 3 H15 2 H12 2 If there is such a formula...

NDR Help
Hi, I hope someone can help on this. A few people have complained they cannot e-mail to us always. They get an NDR. This is very intermittent it seems and not everyone is affected. They have forwarded the NDR they have received. I've attached it below. I can't work out if our mail server has sent that to them or if it is generated by their company e-mail server. This happens mainly with one company but i think it has happened to some others as well - i can't be sure but the one company mainly (or even only). It is odd in that they can e-mail and get through then do it aga...

Drag and drop help
I am trying to get drag and drop working between a few windows in my application. I can get the dragging started, but can't get away from the 'no-entry' mouse cursor. I have read through the MSDN and I have done the following in a CTreeView derived class called TreeCtrlArtifacts: void TreeCtrlArtifacts::OnTvnBegindrag(NMHDR *pNMHDR, LRESULT *pResult) { LPNMTREEVIEW pNMTreeView = reinterpret_cast<LPNMTREEVIEW>(pNMHDR); // TODO: Add your control notification handler code here CUIntArray arrayOfSelected; arrayOfSelected.Add(0); CMainFrame *main = (CMainFrame*) AfxGetMa...

dialog based app & command line
Hello, I'm trying to launch my application with command line arguments, but I received an error, without any identification number of it. The MessageBox tolds me: "Runtime error" "the path to my exe file" "This application has requested the Runtime to terminate it in an unusual way. Please contact...". Have somebody a ideea where is the problem? Thank you a lot in advance, Alex PS: When I debbutg the appllication with command line args. from project properties the app. starts very well Try setting the start command line options fro...

Recordset Help Needed
I have the below code that works some of the times, but not all. Here is my issue. If there is no records in the table it works the first time. Then when I go to add another record it says "No Current Record". If I close the form and then re-open it, it work. I thought by adding the Set rs = Nothing it may help. It did seem to do anything. Private Sub TRAN_TYPE_DblClick(Cancel As Integer) Dim rs As DAO.Recordset Dim rs1 As DAO.Recordset 'Save any edits If Me.Dirty Then Me.Dirty = False End If 'Check there is an order in the form. If...

*CANT log into Windows -please help
Hi, I need step by step instructions on how to use my recovery console CD in order to fix a problem. Here is my prob: A virus/malware scan I did probably messed up my logon file. The antivrus program either removed or quaranteined the virus/trojan that was attached to my logon file. Because when AVG prompted me to reboot after this scan, It stopped at the welcome screen logon part. I click on my user name (only one there) and it says its logging on...But then it says saving settings and nothing else happens. My machine does not reboot or anything. It just stays at this logon sc...

need basic help setting up a graph
Hello, I am trying to set up a chart of days and times. The X- axis shoul have the days of the week (mon, tues, etc) and the Y - axis should hav various times of the day. I would like to have a line from on specific time on one day to another specific time on the next. So, point would be monday at 10:00 and the next would be tuesday at 1:00 followed by wednesday at 12:00, etc. Any suggestions?? Thanks fo your help Davi -- Message posted from Hi David, See my attachment. Is that the situation you explained? I use formula =IF(B2<0.5,B2+1,B2) in column ...

Move data from column to rows HELP!!!
Hi thanks for taking the time to look at my problem, currently i have column that has thousands of rows of information in it, it looks lik this A 40432 432654 3432 532543 32432 523 53425 532532 532 523 532 111 222 333 666 numbers that go on into mabye the 5000-6000 range what i need to do is have that data moved So it looks like this A | B | C 40432 | 32432 | 532 432654 | 523 | 523 3432 | 52432 | 111 532543 | 532532 | 222 So on and so on, so instead of 1 column with 6000 lines it ...

HELP! CFtpConnection GetFile cause memory leaking, WHY?
I'm trying to use CFtpConnection GetFile to download files from a WS_FTP server. I found if I download 1000 files (Size from 17KB to 25KB ), it can cause about 10M memory leaking. When I commented out the GetFile( ) line, there was no memorry leaking. WHY? Following is part of my source code: try { // Request a connection to Image Server //Use default FTP Port //Use Passive MODE pConnect =3D sess.GetFtpConnection(strISIP,strFtpUser,...

Newbie Needs Help With Formatting E-Mails
Newbie Needs Help With Formatting E-Mails Hi all. I'm new to this site and would appreciate some formatting help. I created a new Word doc and copied and pasted some graphics and some simple text boxes in to it. The graphics and text boxes were created in Powerpoint by someone else. Looks fine on my screen. Before sending it out via e-mail to an Outlook e-mail group I have, I first sent myself a test message to see what it would look like on the receiving end. It looks a mess! The text boxes are all over the place, as is the text that is not in a box. Also, everything slide over to ...

Crystal Reports help
We are currently using GP 8.0 and Crystal Reports 10. We will be running most of our reports through Crystal because you can do so much more than with the Report Writer. I am looking for a good reference book for Crystal 10 (this is the first version I have ever used) any suggestions? You can get books on Crystal 10 in any large bookseller. One thing you won't get is how to use Crystal with Great Plains. There was some training materials available. You will want to consult the Great Plains SDK for help on the tables to use. JO wrote: > We are currently using GP 8.0 and Crystal R...

Help with an IIF expression
My database is similar to a checkbook register and contains the following fields: Amount Combo box with the expense categories of Housing, Medical, Personal I have a report that gives me a monthly total for each of these categories and a grand total of all categories for the month. However, I need help in calculating a monthly total for Medical and Personal combined. Please help me with the expression. I want to add a text box to my report to show the results of this expression. Thank you! You can create a hard-coded expression like: =Sum(Abs([ExpCat] IN ("Medi...

Help, how do I get an exe file with outlook 2002.
is there a way to turn off the GD stupid F#@$ing level one interecept "feature" in outlook? I am so angry with this stupid program@! I need to download an exe file and cannot with this software! Maybe if you washed your mouth out with soap, someone would be willing to help you. This is a technical forum -- not a place for ranting fools. "Sean" <> wrote in message news:5a8001c42d8f$52c08b20$a401280a@phx.gbl... > is there a way to turn off the GD stupid F#@$ing level > one interecept "feature" in outlook? > > I am so angr...

Need PO Generator Replenishment Level Help
I=92m confused as to exactly how the Replenishment Level works. On the Purchase Order Generator Item Maintenance screen you can select a Replenishment Level. There are 3 choices: Order Point Qty, Order Up- To Level and Vendor EOQ (if Order Method is set to Independent Site). Online help states: Order Point Qty Enter the quantity this item should be reordered at to maintain your desired stock, including a safety stock quantity. This quantity is used to calculate the quantity to reorder when you print the Purchase Advice Report. For example, if the reorder level is 10, and there are eight in...

Can anyone help with this chart?
I would like to have the following values/labels on the y and x axis of any style of chart: X-axis: July, August, September etc for a full financial year; Y-axis: FB, AP, DR, LA, PC. OR the other way around. Presently the Y-axis simply displays the labels 'Jan Jan Jan Jan Jan' etc. Thank you. Any help would be much appreciated. Check out Jon Peltier's article on creating a vertical category axis: -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "A little stuck" wro...

HELP: Email body deleted when I receive voting response
Hi All, Whenever I vote using voting buttons, Email body gets deleted when the voting response is sent. So for eg: If I have enabled voting buttons and asked to vote on something from person xyz, the person xyz votes "accept" or "reject" and the email body is deleted when I receive the vote response email. Is there a solution for this? I want the email body to stay when I receive the voting responses. Thanks in advance. ...

Worksheet Help req PLZ
Hey All, I have a small issue where I have created a worksheet called data and in Cell A3 I have a linked cell to another worksheet and cell "WK48!A2" In Cell A4 in the "data" worksheet I need a link to "WK49!A2". I would like to link all cells in Column A to consecutively "WKxx" worksheet once I add them to the workbook. I thought I could drag them mouse down but al I get is links to consecutive cells in "WK48" work sheet. Please help mag()() Try =INDIRECT("'WK"&ROW(48:48)&"'!A2") -- Reg...

Help with SQL- SupplierList cost into Item cost field
Hi, re-posted! See below. Hi, thanks for that- it worked perfectly. There is just one snag however and I didn't think of it until I was testing. Many of the suppliers use specific currencies so the information I need copied from the Supplier tab is actually the Local Cost. When I view the SupplierList table, Local Cost doesn't appear as a column. Is it just a calculation based on exchange rates for information or does it actually exist somewhere within the database? Your help once again would be much appreciated. T. "convoluted" wrote: > Hi Tara - backup your...

Help #6
I am a student I Niagera college and am working with excel, I have a n ifstatmet that is giving the correct answer but its not solving the anser. The statment : =IF(G9>B3,+"sum(G9*C3)",+"sum(G9*1)") The Answer sum(G9*C3) The problemi is that it is the wright answer but it will not tally the sum. Help me PLZ How about: =IF(G9>B3,G9*C3,G9) the use of the SUM function is wastefull (as there is nothing to sum), as it is the multiplication by 1. Regards, KL "Niagera College Student" <Niagera College> wrot...

Restoring Exchange Data
HI. I experienced a crash with my Windows 2000 server which is the Global Catalog and dns server. Anyhow in my infinite wisdom I decided to do soemthing with the exchange server and in the meantime - it blew any active directory info which had replicated to the exchange server. The Exchange server was a part of the domain with AD installed, etc. The exch. server is a running windows 2003 server w/ exch. server 2003. Fast forward...I rebuilt the Windows 2000 server and its backup. I also rebuilt the Exchange Server...not completely knowing how to proceed....I installed w2k3 with all ...