You can combine multiple queries in one?

I have a table of database options for additions to homes. I have another table for the categories for these options. Now I do a lot of queries for each individual category of the options. It looks like this:

< / cfquery >

< cfquery datasource = "applewood" username = "username" password = "password" name = "getCategory2" >

SELECT *.

From op_categories WHERE idOpCategories = 3

< / cfquery >

< cfquery datasource = "applewood" username = "username" password = "password" name = "getCategory3" >

SELECT *.

From op_categories WHERE idOpCategories = 4

< / cfquery >

.. and so on. Is there a way to make 1 query that finds each WHERE clause? I want it to look at this on a single page:

Category 1 category 2 category 3

---------------         -----------------          ----------------

Option 1 Option 1 Option 1

Option 2 Option 2 Option 2

Option 3 Option 3 Option 3

Any help would be appreciated.

What of this...

SELECT *.

Of op_categories WHERE idOpCategories in (3.4)

Tags: ColdFusion

Similar Questions

  • How to combine multiple PDFs into one file

    How to combine multiple PDFs into one file

    Hi Marketing Haskin,

    The link mentioned by Mandeep requires you to have the Acrobat software.

    However if you purchased export them to PDF / service Acrobat.com you can select 'Combine files' on the right side and then click on the button 'Select files' to select the files you want to combine.

  • You can run multiple instances of Windows Sidebar?

    I use multiple monitors and I would like to use more than 1 instance of Windows Sidebar as aware, I have 2 pages worth of gadgets.  and it would be easier to have a sidebar on each screen.

    Hi IT_Shaggy,

    It is not possible. If you have two monitors or more, you can place the sidebar on one of them

    For more information, see the link:

    Customize Windows Sidebar

    Hope this information is helpful

  • How to combine multiple PDFs into one document?

    A printer told me some time ago when I bought a few things, I can combine PDF files into one pdf. Can someone tell me how you do it, and do this with pdf that are the size of the different documents? I'm an invitation, program, cards and certificates for an awards ceremony, and wanted to know if I can combine all my pdf in a big pdf, even if they are all of different sizes.

    Thanks for any help!

    Even easier in Acrobat 9 (have nothing installed earlier to check): file > combine > merge files into a single PDF file...

    You must have a full version of Acrobat, possibly Pro, player not only.

  • You can host multiple sites on a single account webBasic?

    You can host multiple sites on a single account webBasic?

    Hello

    Basically not how it has been intended for.

    You have the option to have a partner account that you can create different sites in your portal where each site will be under its own plan.

    Or you have an existing account that is designed for a single site.  So I wouldn't say that, but ideally, you could add several domains under a plan account to a site, but you will then need to share the same account (a store of sense, a set of system messages, layout, etc.).

    These are the options at this point.

    I hope this helps!

    -Sidney

  • You can have multiple browsers? as internet explore and mozilla firefox?

    Sometimes I wonder "do you want to be your default browser to internet explore.» I say still no. is there a time where I should use internet explore instead of Mozilla Firefox? am totally confused. I am not computer, so need to know in terms of "laymen" s, please. Thank you

    A browser is software that allows you to 'see' the Internet. Yes, you can have several browsers installed and it's actually a good thing because if you think you want one browser over another. It is also good for troubleshooting because if you have questions related to the Internet, you can run the other browser to see if the problem is specific to the browser or a more general problem of Windows.

    Personally, I prefer Firefox over Internet Explorer but * you * should be the one to decide what he * you * like. Here are links to various browsers, you can download and install to try:

    Firefox
    Google Chrome
    Safari
    Opera

    MS - MVP - Elephant Boy computers - don't panic!

  • Combine multiple lines into one line (from two tables / result sets)

    Hello experts,

    I would like to know how to combine multiple lines/records in a single record. Here are the DDL and DML to tables:

    create table test_table)

    client_name varchar2 (50 char),

    login_time timestamp (6).

    logout_time timestamp (6).

    auto_type varchar2 (10 char)

    )

    create table root_table)

    navigation_time timestamp (6).

    client_name varchar2 (50 char),

    VARCHAR2 (50 char) nom_du_groupe

    )

    Insert into test_table

    values ("John", TO_TIMESTAMP ('2013-12-05 17:04:01.512 ',' YYYY-MM-DD HH24:MI:SS.)) FF'), TO_TIMESTAMP ('2013-12-05 17:27:31.308 ',' YYYY-MM-DD HH24:MI:SS.) FF'), 'SIMPLE');

    Insert into test_table

    values ('David', TO_TIMESTAMP ('2013-12-05 06:33:01.308 ',' YYYY-MM-DD HH24:MI:SS.)) FF'), TO_TIMESTAMP ('2013-12-05 06:45:01.112 ',' YYYY-MM-DD HH24:MI:SS.) FF'), 'SIMPLE');

    insert into root_table

    values (TO_TIMESTAMP ('2013-12-05 17:04:01.512 ',' YYYY-MM-DD HH24:MI:SS.)) FF'), 'John', "invalid");

    insert into root_table

    values (TO_TIMESTAMP ('2013-12-05 17:14:22.333 ',' YYYY-MM-DD HH24:MI:SS.)) FF'), 'John', "GROUP_1");

    insert into root_table

    values (TO_TIMESTAMP ('2013-12-05 17:27:31.308 ',' YYYY-MM-DD HH24:MI:SS.)) FF'), 'John', "GROUP_1");

    insert into root_table

    values (TO_TIMESTAMP ('2013-12-05 06:33:01.308 ',' YYYY-MM-DD HH24:MI:SS.)) FF'), "David", "invalid");

    insert into root_table

    values (TO_TIMESTAMP ('2013-12-05 06:45:01.112 ',' YYYY-MM-DD HH24:MI:SS.)) FF'), 'David', 'GROUP_5');

    game results test_table

    client_name

    login_time logout_time auto_typeJohn05/12/2013 5:04:01.512000 PM05/12/2013 5:27:31.308000 PMSIMPLEDavid05/12/2013 6:33:01.308000 AM05/12/2013 6:45:01.112000 AMSIMPLE

    root_table result set

    navigation_time client_name GroupName
    05/12/2013 5:04:01.512000 PMJohnNot valid
    05/12/2013 5:14:22.333000 PMJohnGROUP_1
    05/12/2013 5:27:31.308000 PMJohnGROUP_1
    05/12/2013 6:33:01.308000 AMDavidNot valid
    05/12/2013 6:45:01.112000 AMDavidGROUP_5

    And here is the SQL code I'm writing:

    Select a.customer_name, a.login_time, a.logout_time, a.auto_type, Max (b.group_name)

    from test_table a, b root_table

    where a.customer_name = b.customer_name

    Group of a.customer_name, a.login_time, a.logout_time, a.auto_type

    As the 'invalid' value is greater than the value "GROUP_1" (based on the number of letter in English), the GroupName is returned as 'invalid '. I want to bring the GroupName based on the navigation_time column in the root_table so that it always returns a valid GroupName. Please help me.

    Output current:

    Client_name.      Login_Time.     Logout_Time |     Auto_Type |     GroupName

    --------------------------------------------------------------------------------------------------------------------------------------------

    John |     05/12/2013 5:04:01.512000 PM |     05/12/2013 5:27:31.308000 PM |     SIMPLE |     Not valid

    David |     05/12/2013 6:33:01.308000 AM |     05/12/2013 6:45:01.112000 AM |     SIMPLE |     Not valid

    Expected results:

    Client_name.      Login_Time.     Logout_Time |     Auto_Type |     GroupName

    --------------------------------------------------------------------------------------------------------------------------------------------

    John |     05/12/2013 5:04:01.512000 PM |     05/12/2013 5:27:31.308000 PM |     SIMPLE |     GROUP_1

    David |     05/12/2013 6:33:01.308000 AM |     05/12/2013 6:45:01.112000 AM |     SIMPLE |     GROUP_5

    Thank you!

    Adding INSERT statements, current and planned outputs.

    This...

    SELECT client_name

    login_time,

    logout_time,

    auto_type,

    GroupName

    Of

    (select a.customer_name,

    a.login_time,

    a.logout_time,

    a.auto_type,

    b.group_name,

    ROW_NUMBER() over (PARTITION BY a.customer_name, a.login_time, a.logout_time, a.auto_type ORDER BY b.group_name) rn

    from test_table a, b root_table

    where a.customer_name = b.customer_name)

    WHERE rn = 1;

    OUTPUT:-

    =========

    David DECEMBER 5, 13 06.33.01.308000000 AM DECEMBER 5, 13 06.45.01.112000000 AM SIMPLE GROUP_5
    John DECEMBER 5, 13 05.04.01.512000000 PM DECEMBER 5, 13 05.27.31.308000000 PM SIMPLE GROUP_1

    Thank you

    Ann

  • You can move a drawing from one group to another?

    The new version so much my individual drawings in individual groups. How you group? I can see how you can move the order within a group, but cannot see how to move a picture from one group to the other.

    Looks like you can hold a drawing, and then drag to the next group. But you can't...

    Hi David,

    In Adobe Illustrator to draw, you can rearrange your individual sketches so that move to different groups.

    Check it out!

    Thank you

    -Kathleen

  • You can merge multiple Webhelp projects?

    Hi all

    Is it possible to merge multiple Webhelp projects separately created so that when you start a project, you can see the table of contents of other projects as well? (that is to say, they would all appear to be part of the same assistance but were actually created separately). I use RH10.

    Thank you.

    See merged help on my site.

  • You can host multiple Sites in Dreamweaver?

    Hello.

    I use Dreamweaver CS5.5 to the company Web site. I use it to connect to the remote host and then update the website of the company here.

    However I asked me to update a Web site linking different. I have all the details of access for it and I was wondering if it was possible to connect to this Web site using my copy of Dreamweaver without losing my connection to the company's site.

    So what I'm asking is, is it possible to have a connection to more than one Web site on a single version of Dreamweaver. Because that would be useful as I could then just to distance access or other of them whenever I had to in order to update.

    Thank you

    James

    Altogether. You can manage hundreds of sites with a single installation of dreamweaver. Define the site of DW. In the menu, choose the site, new site.

  • When we can find multiple queries in view logn

    Hi all

    Wen we can find multiple requests to connect

    thnks
    Françoise

    Hello

    Let's say you use tables of logical facts of the facts/2 2 in your report... then, you will find 2 respective requests on each fact

  • You can add a Facebook or one of your Favorites in your dock?

    Can you add from your Safari home Favorites to your dock such as Facebook, etc?  I'm on Macbook pro

    If you have these sites stored as bookmarks, you can add them to the hold on the way to the sidebar in Safari or going to bookmarks > Show bookmarks, sliding to a site in the sidebar to the dock. You must drag the site on the right side of the dock (to the right of the separator, near the trash icon).

  • You can add multiple sets of cuts on one page

    In CS5.5. I'm sure it's possible, but don't know how. I need to add crops to an image on a page. Thanks for the help.

    Jon

    Check the utilities > Scripts and search for Cropmarks.jsx in the javascript file.

    Select the object, double-click the script.

  • You can convert multiple PDF to DOC (MS Word) files at the same time?

    Hello

    I use Adobe Acrobat 8 Standard. While I can simultaneously convert several files in PDF format by selecting all the files you want, right click then "Convert to Adobe PDF", there seems to be no way to do the opposite of this, which would be to convert PDF several files in a different format, in my case the format in DOC or MS Word file (2003).

    I scanned the help files, the knowledge base and here (the forums), but I can't seem to find an answer.

    Could someone tell me: is it possible to simultaneously convert multiple PDF files to another type of file using Adobe Acrobat 8 Standard or other software? If it is possible using Acrobat 8 Standard, could someone tell me how I would do?

    Thank you

    If the standard batch processing, the answer would be Yes, but I think it's only one Pro feature.

  • How you can list multiple paths of the files?

    Hello!

    I use the "write to binary file" vi and I need to write a bunch of different files. Is there a way to add multiple names of paths to it? The Green thingy seems to only allow you to put one there at the time, and I would not have 20 'write in the binary' in my project of vi...

    Thank you!

    Provide paths in a table and use a loop!

    See you soon

    Edgar

Maybe you are looking for

  • Skype can't detect webcam

    Hello I use an ASUS A43T laptop and my Skype can't detect the integrated webcam. It worked fine until a few days ago. I tried to test my webcam via other online sites and it works very well. Update my driver for the webcam. Skype is in its latest ver

  • Invalid SIM for 6plus iphone 64 GB

    I use a sim card the name of the carrier's cell IDEA. It is a 3 g SIM. He works in any other phone 6 and others also. but ijn my phone, it shows INVALID SIM, ' installed the sim card you are currently is a carrier that does not support ask that this

  • Problem printer 0x000006be

    I am on Windows Vista.  I have a HP Laserjet 1020 and it used to work properly.  One day it just wouldn't.  I uninstalled it, I deleted things from the register that I was responsible.  Now, my print spooler crashes, I continually get the error 0X000

  • Blue border light to return the text

    I rode the text around a PNG image. I placed inside the text box and set the margins. However when she spotted in the browser, there is always a light blue border around the PNG. I tried the other PNGs and placed in various areas of text with the sam

  • Installation add on LR 5 stand alone?

    HelloI want to install the uploader add on stand alone LR5 500px. I do not use creative cloud. So far, I tried the following:Install desktop creative cloud application: Installation failed with error 1?Install the extensions and hollow Manager app it