Query for yes/no field

Hello,
I have an access database with a Yes/No field. In access
table it creates a checkbox which is checked if it is yes. Now, i
want to query this field in my code. I am using CFMX7.
<cfquery name="qcategoy" datasource="xyz">
select *
from tblgroup
Where 1=1
<cfif form.group1 EQ 'broilers'>AND broiler =
true</cfif>
</cfquery>
I want this to be exported to an excel spreadsheet. If I take
away the condition of "Broilers" then it works fine, but when I add
this <cfif> code, I get an error
"Internet Explorer was not able to open this file"
BTW, this code is able to export the report to excel
correctly in CF5, but in CFMX7 there is an error.
Please help.

start by looking at how the values come through the drivers.
<cfquery name = "abc">
select distinct true_false_field
from yourtable
<cfdump var="#abc#">
What do you get in your dump?

Similar Messages

  • In a query, for the selection field 'KNB1-ZWELS' a match-code isn't availab

    Hi All,
    Creating a query, for the selection field 'KNB1-ZWELS' a match-code isn't available.
    Could anyone tell me the reason?
    Thanks
    Gandalf

    Hi,
    Match Code Object is not available for the field ZWELS. If required, You need to contact a Developer for creating one .

  • Applying functions to database fields when querying for a form field

    Hi,
    how is it possible to apply trim() or another method to the content of a database field when a query is initiated?
    The actual problem is that there are entries in the database which are entailed by a blank and, because the user is not aware of this fact, he cannot be forced to add a blank or % to the form field he is querying.
    Does anyone have an idea how to solve this issue?
    Thank you very much in advance.
    Message was edited by:
    user492074
    null

    The where clause is built that way:
    WHERE (ETN.trim(ETN_PLZ)=:1)
    The error message:
    ORA-00904: "ETN"."TRIM": invalid identifier
    Actually, I guess that the trim statements should surround ETN.ETN_PLZ but that is obviously not the case.
    Apart from that I did not enter 1 as the value to query for.
    Nevertheless, thank you for your help. Forms version is 10.1.2 by the way.

  • Reg Query For Multiple Text Fields

    Hi all
    I am New to this forum..
    I am developing an application for generating reports.
    In my application i have multiple text fields.
    The user might enter any of the textfields or even enter all the fields.
    In those cases how to use the query when some fields are empty??

    Welcome to the forum.
    It always helps to post a small, simplified example of what it is you're trying to achieve.
    (When posting examples, put the {noformat}{noformat} tag before and after the example, so it will get posted formatted on this forum.)
    In those cases how to use the query when some fields are empty??If your textfields serve as parameters/bind variables for you query, then you could use NVL.
    Something like:select ...
    from some_table
    where col1 = nvl(p_col1, col1)
    and col2 = nvl(p_col2, col2)
    And how about wildcards (the '%' or '_' sign), by the way? Are they allowed as well?
    You also might want to read about this approach:
    http://www.oracle.com/technology/oramag/oracle/09-jul/o49asktom.html                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Creating an SQL Query for Project Custom Fields Values

    Hello:
    I'm currently trying to create an SQL Query to show all of the server's Project Custom Fields Values, along with the modification date.
    So far, I've managed to display correctly all of the data for all of the Projects' text value Custom Fields (those not based on a LookUp Table) with this query:
    SELECT
    MSP_PROJECTS.PROJ_NAME,
    MSP_CUSTOM_FIELDS.MD_PROP_NAME,
    MSP_PROJ_CUSTOM_FIELD_VALUES.CODE_VALUE,
    MSP_PROJ_CUSTOM_FIELD_VALUES.TEXT_VALUE,
    MSP_PROJ_CUSTOM_FIELD_VALUES.MOD_DATE
    FROM
    MSP_PROJ_CUSTOM_FIELD_VALUES
    INNER JOIN
    MSP_CUSTOM_FIELDS
    ON MSP_CUSTOM_FIELDS.MD_PROP_UID = MSP_PROJ_CUSTOM_FIELD_VALUES.MD_PROP_UID
    INNER JOIN
    MSP_PROJECTS
    ON MSP_PROJECTS.PROJ_UID = MSP_PROJ_CUSTOM_FIELD_VALUES.PROJ_UID
    WHERE
    MSP_PROJ_CUSTOM_FIELD_VALUES.CODE_VALUE IS NULL
    ORDER BY
    MSP_PROJ_CUSTOM_FIELD_VALUES.PROJ_UID,
    MSP_PROJ_CUSTOM_FIELD_VALUES.MD_PROP_UID
    However, when I try a new Query to obtain the actual values for the Projects Custom Fields that do use a LookUp Table, I can't seem to find what table in the model I'm supposed to link to the MSP_PROJ_CUSTOM_FIELD_VALUES.CODE_VALUE field (the TEXT_VALUE
    field has NULL value when CODE_VALUE field isn't NULL)
    Any suggestions on how to obtain the actual Projects' custom fields values instead of the Code Value, for Metadata that do use a LookUp Table?
    Also, I'm able to run this query only in the Published Database, since the MSP_CUSTOM_FIELDS table is empy in the Draft Database. Why is that?
    Awaiting your kind reply,
    Sebastián Armas PMO Project Manager

    Hi Sebastián, rather than directly accessing the database it would be better to use the PSI to get this data.  Take a look at the ProjTool sample in the SDK whcih gets this data.
    Best regards,
    Brian.
    Blog |
    Facebook | Twitter | Posting is provided "AS IS" with no warranties, and confers no rights.
    Project Server TechCenter |
    Project Developer Center |
    Project Server Help | Project Product Page

  • Display Title in BEX query for Master Data Field

    Hi All,
    Appreciate if someone can assist me in this.
    When we display query result, we will have results of master data field for as master data and Text, e.g Customer and customer text.
    BEX display:
    Header Line : Customer
    Display Line : 90002011   Mary Kay
                          90002023   John Smith
    For the header Line, we have title 'customer', can we have the title for 'Customer Description' instead of having it as a blank field.
    Appreciate if someone can assist me in this, I cant find this issue posted by anyone.
    Thank you.

    Hi,
    For one object you can not have seperate description for key and text.
    Either you need to have seperate object. Check if your Customer object is having some name attribute then display cutomer key with name attribute so that there will be two object and you may change the description in report display.
    If this is not possible then you may not have dirctly in reporting. You need to stage one more object in staging area with same cutomer field then one you may use as text the other one as key.
    I hope it will help.
    Thanks,
    S

  • SP_Transaction Notification Query for Transaction Category field

    Dear Experts,
    I want to make Transaction Category field mandatory under Tax Tab on Sales Order document and being tried SP_Transaction Notification.
    Please send me right query or any other solution.....
    Thanks.....

    Hi!
    Try this
    IF (@object_type = '17')
    BEGIN
    if (@transaction_type in ('A','U'))
    BEGIN
    if exists ( Select R0.Docentry from ORDR R0, RDR12 R12  where R0.Docentry=@list_of_cols_val_tab_del and
    R0.Docentry=R12.Docentry and (R12.Transcat is Null or R12.Transcat=''))
    BEGIN
      set @error = 0
    END
    ELSE
    BEGIN
        set @error_message='Enter the Transaction Code in Tax Tab'
        set @error=1  
    END
    END END
    Regards,
    [Thanga Raj K|Q3 Wrap-Up: What happened in the third quarter of 2009 in the SAP Business One Community]

  • Query for selecting the field of VBRK

    Hi All,
      I have fetched the Ztable into it_bauch.
    In the loop of It_bauch i have to fetch the records of vbrk in which the field of zuonr is wrongly stored in xblnr.
    while fetching VBRK the zuonr0(8) should be comapred with it_zbauch-xblnr2(8).
    select single * from vbrk where fkart = 'F2'
                                      and fktyp = 'L'
                                      and vbtyp = 'M'
                                      and rfbsk = 'C'
                                      and fksto = space.
                                 <b>  and ZUONR0(8)  = it_wabuch-xblnr2(8).</b>
    ZUONR0(8)  = it_wabuch-xblnr2(8).</b>
    the above line cannot be return so the below code is given whether it would work or not or any other solution kindly do respond
          data : begin of it_vbrk occurs 0.
                  include structure vbrk.
          data :  end of it_vbrk.
          data vbrk_flag type c.
    data : begin of wa_vbrk,
              zuonr(8) type c,
              end of wa_vbrk.
    loop at it_bauch.
    select single * from vbrk into  it_vbrk where fkart = 'F2'
                                      and fktyp = 'L'
                                      and vbtyp = 'M'
                                      and rfbsk = 'C'
                                      and fksto = space.
    loop at it_vbrk.
            wa_vbrk-zuonr  = it_vbrk-ZUONR+0(8).
            read table it_wabuch with key xblnr+2(8) = wa_vbrk-zuonr.
            if sy-subrc = 0.
              clear vbrk_flag.
              vbrk_flag = 'X'.
            endif.
            clear wa_vbrk-zuonr.
          endloop.
    if vbrl-zuonr  =  'X'.
    After lot of select querey are there based on above condition would trigger.
    endif.
    endloop.

    data : vxblnr(9).
    vxblnr = it_wabuch-xblnr+2(8).
    concatenate vxblnr '%' into vxblnr.
    select single * from vbrk where fkart = 'F2'
    and fktyp = 'L'
    and vbtyp = 'M'
    and rfbsk = 'C'
    and fksto = space.
    and ZUONR like vxblnr.
    regards
    shiba dutta

  • Select Query for smart form-invoice

    Hi Folks,
    I have to fetch the following fields as per the requirement for desiging a invoice smartform.I had copied lb_bill_invoice smartform into z format.
    Can anyone here please give me the select query for the same.
    fields to fetched are as follows:-
    1.vbrp-arktx,
    2.vbrp-fkimg,
    3.konv-kbetr with respect to vbrk-knumv
    4.konv-kwert.
    And also what all I have to give in format interface and global definitions of the smartform.
    please help  me in this regard.
    Points will be given.
    K.Kiran.

    Hi,
    declare the variables V_arktx(40) and v_Qty like vbrp-fkimp  and other varaibles for Kbetr, kwert, knumv on the global definitions.
    select  single arktx fkimg into (v_arktx, v_qty) from vbrp
    where vbeln = LBBIL_IT_REFPURORD-BIL_NUMBER.
    select single knumv into v_knumv from vbrk where where vbeln = LBBIL_IT_REFPURORD-BIL_NUMBER.
    this select has to fire in the item level and in the loop.
    so have to write in the correct place.
    select kbetr kwert into (v_kbetr, v_kwert) from konv
    where where knumv = v_knumv and kposn = LBBIL_IT_REFPURORD-ITM_NUMBER.
    regards,
    anji

  • Need to write a query for extractions

    How can I extract the following data from Oracle:
    1. Segment1 and description from mtl_system_items_b
    2. Onhand quantity that is orderable (Not under the WIP manufacturing or PO)
    3. Onhand quantity that not orderable (That is under WIP manufacturing or PO)
    4. Retail Price of these items.
    There is only one organization_id =21 needs to be considered. This extract needs to be a daily kind of an extract. If you can help me in writing the query for all the fields above with proper joins, I'll really appreciate.
    Thanks & Regards
    KM

    Hi,
    Primary_uom_code and Primary_transaction_quantity shows the items quantity on the basis of primary code
    whereas Secondary_uom_code and secondary_transction_quantity shows the items quantity on different code.
    e.g. suppose you have an item Pen opened on the primary code as Each. 1 Each = 1 Pen.
    You have a conversion set as 10 Each = 1 Pkt.
    At the time of transaction if you selects as 1 Pkt,
    The primary_transaction_quantity will show 10 Each where as the secondary_transaction_quantity will show 1Pkt.
    Now as the transaction has done as Pkt the column Transaction_quantity will display 10Pkt.
    If you have done this transaction on the primary code as 10 Each.
    The primary_transaction_quantity would show the same 10 Each but the Secondary_transaction_quantity will by
    null and the transaction_quantity will be 10 Each.
    Hope this will clarify the issue.
    2) why you want to join these tables
    How can I join the following tables: qp_list_lines and mtl_system_items_b? I want to find the price of each
    item. I tried using inventory_item_id but it does not work as inventory_item_id can be null in qp_list_lines table.i have not been able to find any thing in table qp_list_lines.

  • Select query for fetching from 3 tables.

    Can we have a single Select query for fetching same fields (kappl,kschl,vkorg,vtweg,spart,kunwe,datbi,knuma,datab,knumh)
    from 3 tables >> KOTE707,KOTE708 and KOTE709 into an internal table for a particular KUNNR?
    Regards,
    Shashank.

    Hi,
    If you have kunnr field in all the 3 tables then it is possible. use inner join as below
    PARAMETERS: p_cityfr TYPE spfli-cityfrom,
                p_cityto TYPE spfli-cityto.
    DATA: BEGIN OF wa,
             fldate TYPE sflight-fldate,
             carrname TYPE scarr-carrname,
             connid   TYPE spfli-connid,
           END OF wa.
    DATA itab LIKE SORTED TABLE OF wa
                   WITH UNIQUE KEY fldate carrname connid.
    SELECT c~carrname p~connid f~fldate
           INTO CORRESPONDING FIELDS OF TABLE itab
           FROM ( ( scarr AS c
             INNER JOIN spfli AS p ON p~carrid   = c~carrid
                                  AND p~cityfrom = p_cityfr
                                  AND p~cityto   = p_cityto )
             INNER JOIN sflight AS f ON f~carrid = p~carrid
                                    AND f~connid = p~connid ).
    LOOP AT itab INTO wa.
      WRITE: / wa-fldate, wa-carrname, wa-connid.
    ENDLOOP.
    <b>Reward Points if this helps,</b>
    Satish

  • Creating Query for deatils of theVendor Sub Range

    Dear All
    I am in IS RETAIL( ECC 6.0) project and are using Vendor Sub Range Scenario.A requirement has come to create a Query for the Below Fields for a specific Vendor 'S say iMPORTVENDORS..  May i know from which tables we can extract and if possible thesteps in creating this query.
    Primary Vendor  Description   Ordering vendor     Description     Payment Vendor     Description     PaymentTerms
    With Kindest regards

    Hi,
    Pls check if you could get this information from WYT3 and LFM2 tables.

  • Querying for custom picklist values

    Hello all,
    I have created a new field on my opportunity type called "Industry" and gave it picklist values. However, the system is not allowing me to query for the values using the Picklist web service. Am I missing a step here, or does the system not allow querying for custom picklist field values? I can get to certain lists of picklist values for Opportunity (Type, Probability, some others) but not the picklist I created. Am I doing something wrong?
    Thanks!
    -Kevin Green

    Hi,
    Find integration tag for custom field in Field Setup. When you call getPicklist method, pass three values like Object type(ex: Lead), integratin tag for the custom field, "" ( this is language, this field is no need for English languague)
    Hope this willl work
    Raja Kumar Malla
    [email protected]

  • Select query for fields in selection screen

    SELECT * FROM hrus_d2
               INTO TABLE ta_list
               WHERE us_name IN subs_obj
               and begdat in date_ran.
              and enddat in date_ran
    How can I rewrite the above query for high and low ranges of date_ran field in condition? It doesn't allow in operator with date_ran-low.Can u please help me out

    Hi
    rahul
    SELECT *
    FROM hrus_d2
    INTO TABLE ta_list
    WHERE us_name IN subs_obj
    and begdat = date_ran-low
    and enddat = date_ran -high.
    u can write like this or i amnot getting why u r expliciting this date u can give directly as
    SELECT *
    FROM hrus_d2
    INTO TABLE ta_list
    WHERE us_name IN subs_obj
    date in date_ran.
    plzz reward if i am usefull to u in any way.. plzz dont forget to reward

  • SAP Query for difference of 2 currency fields

    Hello Experts,
    I have created a SAP query in which I need to fetch data from only 1 custom table through "direct read of table" method.
    I have also added an additionl field in the query output and the field name is "Difference" (difference between 2 currency fields).
    Please help me out in writing the code for this additional field which gives the difference of 2.
    Ex: there are 5 fields A, B, C, D and E to be displayed in output of SAP query. I have added additional field X. So please help me out to write the code which gives difference of A and B fields.
    Thanks,
    Tousif

    Hi,
    By using t-code SQ02. Use option direct read from table. Then move forward. you have a code option, click on it.
    Here you declare your data as same as your report.
    On coding section, you get a option of events. use event and move you code forward as per your requirement.

Maybe you are looking for

  • When updating my ipod touch, it crashed.

    When I tried to update my iPod touch today, it crashed in the middle of it somewhere (there is a backup file of at least part of it).  It told me I would need to Restore.  Restore failed ... so I went to support and followed all the instructions.  Up

  • Multiple Files at sender side

    Hi Friends, Im working with a scenario which gives me two different files for a single sender file. My sender structure is having a filed "Position" which takes 2 values ( One and Two). When i give these values, my target structure will be of two mes

  • FCPx (10.0.4) best HDD performance?

    Hi 1# I have one external 1HDD with everything pointing of RAW an project in that harddrive. 2# In my machine is the 2HDD that "apple" from AppStore installd the FCPx program, so its on the OSX Lion drive in machine. 3# And the third external 3HDD i

  • Maximum Allowed Text Length for JTable Column

    Can you please help me with a JTable Doubt How do I set the Maximum Allowed Text Length for a Particular Column of a JTable?

  • Weblogic managed service not starting up after Windows restart

    Hi All I have an issue with start up of Managed instances configured as windows service. When we reboot the machine the services which are configured to be automatically start are not starting up. When I manually start them they would just run fine.