check the exsistance of query inside a struct

in CF 7

I want to do this...

< cfif isdefined('variables.getReport["STATUS"][1]') >

<! - do stuff - >

< / cfif >

But it seems that CF does not like this convention. Even if its happy enough to use the convention itself NOT in a statement isdefined.

Ideas otherwise, how could I test of the existence of the ' variables.getReport ["STATUS"] [1]?

Is set takes a string and check if there are any variables named with the same string.

"variables.getReport" is the name of the variable.

['STATUS'] [1] are a key structure index and table of this variable, but has nothing to do with the name of the variable.


Is how we can check all three layers of this variable.

Post edited by: ilssac sorry, arrayIsDefined() has been added to the CF 8, re-reading I see that you are on CF7.  Until you update, you will need to use something like "arrayLen (variables.getReport ["STATUS"]) GTE 1" for the third test.

Tags: ColdFusion

Similar Questions

  • To check the State exists query

    Hello

    I have a query where I use is the function to check the weather dates fall between the dates, something like this

    Select 1 from T1 a

    where there are

    (select 1 from T2 b where a.col_1 between b.col_1 and b.col_2

    and a.col_2 between b.col_1 and b.col_2);

    I need to check if the a.col_2 is sysdate, then check only a.col_1 between b.col_1 and b.col_2 else check

    a.col_1 between b.col_1 and b.col_2

    and a.col_2 between b.col_1 and b.col_2

    SQL > select * from T2 a

    2 where exists (select 1 from T1 b where a.start_Date between b.start_date and b.end_Date

    3 and (a.end_date between b.start_date and b.end_Date or trunc (a.end_date) = trunc (sysdate)));

    START_DATE END_DATE

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

    8/22/2000-7/2/2007

    7/3/2007-8/11/2008

    8/18/2008 7/10/2015

  • How to check the performance of query via the command sqlplus prompt

    Hello

    I work in the production environment, I want to check the performance of the queries in a production environment, we have no specific tools such as the expliin plan, TK Proff.

    I need chek performnce of sqlplus command line query

    Please let me know the process of query tuning of sqlplus command promt

    Here to explain plan:

    SQL> explain plan for
      2  select * from employees where employee_id = 170;
    
    Explained.
    
    SQL> select * from table(dbms_xplan.display());
    
    PLAN_TABLE_OUTPUT
    -----------------------------------------------------------------------------------------------
    Plan hash value: 1833546154
    
    ---------------------------------------------------------------------------------------------
    | Id  | Operation                   | Name          | Rows  | Bytes | Cost (%CPU)| Time     |
    ---------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT            |               |     1 |    69 |     1   (0)| 00:00:01 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| EMPLOYEES     |     1 |    69 |     1   (0)| 00:00:01 |
    |*  2 |   INDEX UNIQUE SCAN         | EMP_EMP_ID_PK |     1 |       |     0   (0)| 00:00:01 |
    ---------------------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
       2 - access("EMPLOYEE_ID"=170)
    

    You can also use autotrace, which is super easy:

    SQL> set autotrace on
    SQL> select * from emp;
    
                   EMPNO ENAME      JOB                        MGR HIREDATE
    -------------------- ---------- --------- -------------------- --------------------
                    7369 SMITH      CLERK                     7902 17-DEC-1980 00:00:00
                    7499 ALLEN      SALESMAN                  7698 20-FEB-1981 00:00:00
                    7521 WARD       SALESMAN                  7698 22-FEB-1981 00:00:00
                    7566 JONES      MANAGER                   7839 02-APR-1981 00:00:00
                    7654 MARTIN     SALESMAN                  7698 28-SEP-1981 00:00:00
                    7698 BLAKE      MANAGER                   7839 01-MAY-1981 00:00:00
                    7782 CLARK      MANAGER                   7839 09-JUN-1981 00:00:00
                    7788 SCOTT      ANALYST                   7566 19-APR-1987 00:00:00
                    7839 KING       PRESIDENT                      17-NOV-1981 00:00:00
                    7844 TURNER     SALESMAN                  7698 08-SEP-1981 00:00:00
                    7876 ADAMS      CLERK                     7788 23-MAY-1987 00:00:00
                    7900 JAMES      CLERK                     7698 03-DEC-1981 00:00:00
                    7902 FORD       ANALYST                   7566 03-DEC-1981 00:00:00
                    7934 MILLER     CLERK                     7782 23-JAN-1982 00:00:00
    
    14 rows selected.
    
    Execution Plan
    ----------------------------------------------------------
    Plan hash value: 3956160932
    
    --------------------------------------------------------------------------
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    --------------------------------------------------------------------------
    |   0 | SELECT STATEMENT  |      |    14 |   532 |     3   (0)| 00:00:01 |
    |   1 |  TABLE ACCESS FULL| EMP  |    14 |   532 |     3   (0)| 00:00:01 |
    --------------------------------------------------------------------------
    
    Statistics
    ----------------------------------------------------------
            480  recursive calls
              0  db block gets
             92  consistent gets
              9  physical reads
              0  redo size
           1630  bytes sent via SQL*Net to client
            520  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              7  sorts (memory)
              0  sorts (disk)
             14  rows processed
    

    This guide has lots of good info:
    http://docs.Oracle.com/CD/B19306_01/server.102/b14211/TOC.htm

  • Query cannot be parsed in the generator. If you believe that your query is syntactically correct, check the generic "columns" box below the source of the region without analysis. ORA-00905: lack of keyword

    Hi all

    I have create report sql in version 4.2, and now we have apex version 5.0 upgrade.

    I encountered error when I change the State of sql

    The error massage:

    Query cannot be parsed in the generator. If you believe that your query is syntactically correct, check the generic "columns" box below the source of the region without analysis. ORA-00905: lack of keyword

    My SQL

    SELECT VW.*

    , CASE WHEN (VW.file_code is null

    OR VW.cancel_flg = 'Y'

    OR (TOUR_DEP_DATE + GET_FILE_LOCKING_DAYS (VW. (SBU_CODE) < = trunc (sysdate))

    ) THEN

    ' < font color = "Red" > < b > other < /b > < / police > '

    ON THE OTHER

    "< a href =" f? p = & APP_ID.:51: & SESSION. : O PR: & DEBUG. : 51:P51_FILE_CODE, P51_COSTING_CODE, P51_TOUR_REG_NO, P51_VERSION_NO, P51_REQUEST, P51_AGENT_NAME, P51_ADULTS, P51_CHILDS, P51_MKT_CODE, P51_QUOT_CURR:'

    || FILE_CODE | «, » || COSTING_CODE | «, » || TOUR_REG_NO | «, » || VERSION_NO | «, » ||' OPR' | «, » || AGENT_CODE | «, » || VW. FROM_PAX | «, » || 0||','|| VW.mkt_code | ',' | VW. QUOT_CURR |': ' > < font color = blue > < b > other < /b > < / police > '. "

    END as "other Actions".

    , CASE WHEN ((VW.file_code is not null AND TOUR_DEP_DATE + GET_FILE_LOCKING_DAYS (VW. (SBU_CODE) < = TRUNC (SYSDATE))

    OR cancel_flg = 'Y '.

    OR (VW. REF_COSTING_CODE = VW. ADDL_FIELD2 AND VW. ADDL_FIELD1 LIKE '% COPIED FROM % OF APPROVAL'

    AND BOOKING_NAME LIKE "%-Backup")

    ) THEN

    ' < font color = "Red" > < b > edit < /b > < / police > '

    ON THE OTHER

    "< a href =" f? p = & APP_ID.:149: & SESSION. : & DEBUG. : 149:P149_COSTING_CODE:'

    || COSTING_CODE |': ' > < font color = blue > < b > edit < /b > < / police > '. "

    END AS 'Edit '.

    , CASE WHEN (Nvl (cancel_flg, 'n') = 'Y')

    )

    THEN

    ' < font color = "Red" > < b > add < /b > < / police > '

    ON THE OTHER

    "< a href =" f? p = & APP_ID.:33: & SESSION. : & DEBUG. : 33:P33_COSTING_CODE, P33_FILE_CODE, P33_MKT_CODE, P33_QUOT_CURR, P33_NO_OF_ADULT, P33_NO_OF_CHILD:'

    || COSTING_CODE | «, » || file_code | «, » || VW.mkt_code | ',' | VW. QUOT_CURR | «, » || VW. FROM_PAX | «, » || 0 | ': "> < font color = blue > < b > add < /b > < / police > '

    END as 'Services '.

    OF TOUR_MAS_VW VW

    How to solve it.

    Thank you

    Dear friends

    Thanks for your helping hands.

    I found the solution for this. We can solve this problem by using these solutions

    • A region of HTML:

      click me
      
    • Using PL/SQL:
      htf.anchor('f?p=100:5:'||V('APP_SESSION'),'click me');
      
    • Using a SQL query: SELECT htf.anchor('f?p=100:5:'||:APP_SESSION,'clickme') FROM DUAL;

    We can write the query in the form

    SELECT ' f? p = 100: 1 :'|| : APP_SESSION |': ' | : APP_UNIQUE_PAGE_ID |

    ': P1_EMPNO :'|| employe_id,

    first name,

    job_id

    Employees

    Thank you & best regards

    CORINE

  • After that the effects cannot continue: error when access to the files instead of inside "/ users/me/Library/Preferences/Adobe/After Effects / 13.8", if it please check the file permissions and try again.

    After that the effects cannot continue: error when access to the files instead of inside "/ users/me/Library/Preferences/Adobe/After Effects / 13.8", if it please check the file permissions and try again.

    [Fixed spelling - Mod]

    Go to the folder listed in the path and change the permissions to read/write. Do you know how? It is in the info file.

  • How to check the size of the tablespace by query?

    How to check the size of the tablespace by query?

    Run this query...

    SELECT
    A.tablespace_name 'space ',.
    A.bytes / (1024 * 1024) "Total_Size (MB).
    Sum (B.bytes) / (1024 * 1024) "free_space (MB).
    NVL (Round (Sum (B.bytes) * 100 / A.bytes), 1) "%Free."
    Round ((A.bytes - SUM (B.bytes)) * 100/A.bytes) '% Used_Space '.
    FROM dba_free_space B,.
    (SELECT tablespace_name, SUM (bytes) bytes
    FROM dba_data_files
    A GROUP BY nom_tablespace)
    WHERE B.tablespace_name (+) = A.tablespace_name
    GROUP OF A.tablespace_name, A.bytes
    UNION ALL
    SELECT
    A.tablespace_name 'space ',.
    B.bytes / (1024 * 1024) "Total_Size (MB).
    Sum (A.bytes_free) / (1024 * 1024) "free_space (MB).
    NVL (Round ((Sum (B.bytes) - A.bytes_used) * 100 / B.bytes), 1) "%Free."
    Round ((Sum (B.bytes) - A.bytes_free) * 100 / B.bytes) '% Used_Space '.
    FROM dba_temp_files B,.
    (SELECT tablespace_name, bytes_free, bytes_used
    V $ temp_space_header
    GROUP BY tablespace_name, bytes_free, bytes_used) has
    WHERE B.tablespace_name (+) = A.tablespace_name
    GROUP OF A.tablespace_name, B.bytes, A.bytes_free, A.bytes_used
    ORDER BY DESC 4;

  • EOA: The query cannot be parsed, please check the syntax of your query.

    Hi all

    I have a 'DEVETL_OAE' scheme that OAE is set up. I am able to connect to this schema using Toad/Sqlplus and I can access a table "INFA8_INS_NEW" located in "ADW_DEV_REP" scheme.

    "ADW_DEV_REP" scheme gave a grant to select this table in a role of selection (i.e. ' ADW_DEV_REP_SELECT') SELECT 'DEVETL_OAE' 'INFA8_INS_NEW'.

    I can run a query in sqlplus and I am able to access this table as "select * from ADW_DEV_REP." INFA8_INS_NEW'.

    But, SAQ, when I try to create the region and source, when I'm trying to ' select * from ADW_DEV_REP. INFA8_INS_NEW' sql, I get the error message like "Query cannot be parsed, please check the syntax of your query. (ORA-00942: table or view does not exist) »

    What should I give manual grant to the schema 'DEVETL_OAE' on ' ADW_DEV_REP. INFA8_INS_NEW' table?

    Pls help.

    Thank you and best regards,
    Vinay

    "Indeed, you must grant select on ' ADW_DEV_REP. INFA8_INS_NEW' DEVETL_OAE (so not through a role).

  • to check the number of rows affected by an update query in a procedure

    Hello
    I want to check the number of rows affected by the update script that I used in a procedure and I shoud be able to use this count towards the end of the procedure.
    How can I do?

    for example:
    create or replace procedure p1 is
    Start
    Update table1 set x = 'a', where y = 'b ';.
    end p1;

    Published by: christele CS on May 1, 2012 22:06

    Hello

    Try the below a...

    create or replace procedure p1 is
    Start
    Update table1 set x = 'a', where y = 'b ';.
    dbms_output.put_line (SQL % ROWCOUNT |) ("Lines updated ');
    end p1;

  • How can I get the installer for my application check the operating system type and then install the correct driver type?

    I have a request that I wrote and have been use and distribute for awhile. The installer I created for this application is an additional installer to install a driver for the USB connection. The USB connection is actually a virtual COM Port. The problem is that the people who drafted modified driver setup the installation program itself. They used to have an installer that would check for 32-bit or 64-bit OS and then install the appropriate driver.

    Now, they have two distinct installation programs: one for the other for 32-bit and 64-bit. They let the user know their OS and install the appropriate driver. I'd rather not have to rely on my users to do. From what I've seen the creater Installer provides that an executable to be run after the application installs.

    Is it possible to have the installer of the application, check the type of OS and then run the correct executable file after installing my application? I think that I could write an Installer 'wrapper' that checks the type of operating system then executes the correct Installer. But I expect a better solution.

    Thank you
    Joe

    So, I make it work!

    The trick is to find a way to determine what type of OS you are using. The method I used was, indeed, read the environment variable. A buddy of mine sent me this link:

    http://StackOverflow.com/questions/2401756/how-to-find-if-the-machine-is-32bit-or-64bit One of the phrases he bibliography the Processor_Architecture environment variable.

    It seemed like a reasonable idea. So I started to research how read LV it environment variables turns out, you do it by reading a registry key. There is an example of LV on how to read a registry key. But I did not know where they are in the registry. So, I searched the Processor_Architecture registry. I found it in HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment.

    According to the article in the link, this value will already be x 86 for a 32 bit OS, or something with 64 inside. I just check the response for x 86 string. If it is, I just run the x 86 version of the driver Installer. Otherwise, I run the x 64 version.

    It turned out to be as simple as that.

    I hope this helps someone.

    Joe

  • Understand the * idn? query

    Hi all

    I just started using labview recently. I'm doing a vi that can connect to the oscilloscope, make measurements and save the data in a database.

    I have a VI in which the user can choose to activate up to 3 litters. Once it allows him, after you have entered the name of resource of Visa and scope model, I have a "sonnections chk" button which in effect 'ping' the instrument. For this I use the self test drivers found on ni.com/idnet. As far I could make out, self test drivers send the * tst? query.

    At the moment I am providing 2 varieties of scope and the agilant 34401 tektronix 1k2k series. the driver of the respective self-test according to which of the 2 user selects from a drop down list that I provided, is launched.

    Since I want to expand and include more extensive in the future, I thought universal way to check the connection. I read on the * idn? Query in the programmer of tek manual. I think that it is compatible with many instruments. I wasn't able to find any resource bad for the same thing and so I have a few questions.

    (1) what tools all support this request?

    (2) right now I use usb to connect, but it will make a difference if I use rs232 or gpib and then run the same query?

    (3) even if it is unrelated, the drivers scopes to ask for the run configuration. AFAIK in usb, which is fixed to the right connections?

    Thank you.

    The run configuration will get used only if the name of resource VISA points to a resource series.

  • Check the disk continues to run when I turn on my computer

    Whenever I turn on my computer. Check the disc is still running. I have let it run before and I restart my computer and it works again. When I let the program run, he never finds anything and it's getting boring. Can anyone?

    Whenever I turn on my computer. Check the disc is still running. I have let it run before and I restart my computer and it works again. When I let the program run, he never finds anything and it's getting boring. Can anyone?

    1. click on the start menu and open the Run dialog box.

    2. Type "cmd" and back (Note: don't enter quotation marks)

    3. then type "fsutil dirty query c:."

    4. If the returned message indicates that the volume is dirty, proceed to step 5

    5. then type "chkdsk c:/f/x.

    6. after that finshes repeat step 3.

    7. If it is no longer dirty then reboot and the problem should be solved.

    If you continue to receive the drive guest check after completing the above steps follow the instructions HERE

  • Check the disc 'coherence' at startup about 3 times now (no more)

    Hello, I had a strange thing that I don't understand occur several times (3) start-up called "checking disk consistency." I am a moderately (or less) located user. I have windows XP: (, IE8, 32 - bit, SP3, hmm, that's all I think.) I would just know what that means and if there is anything I can do to fix (prefferably for free). Thank you very much!

    If you want to see if your volume/drive is 'dirty', why not just do this:

    Click Start, run and enter in the box:

    cmd

    Click OK to open the command prompt window.

    For example, to query the bit of impurity on drive C, type:

    fsutil dirty query C:

    The sample output:
    Volume c is dirty
    Volume C: is dirty

    Is your disc dirty or it is not dirty?

    Type "exit" to close the command prompt window.

    The reason is to try to understand why it comes randomly as chkdsk runs only if the disc dirty but the oringal title is: check the disc 'coherence' at startup about 3 times now (no more)

    I want to know why it happens sometimes and not
  • Does anyone know how to get rid of the calendar in the window Live on XP? I do not use it, and whenever I check my e-mail, it checks the calendar, slows things down to the top.

    Does anyone know how to get rid of the calendar in the window Live on XP? I do not use it, and whenever I check my e-mail, it checks the calendar, slows things down to the top.

    Thank you!
    Debnfurkids
    original title: get rid of the calendar in live mail

    Hi Debnfurkids,

    I recommend you post your query in Live Mail Forums for assistance on this issue.

  • Microsoft fix Setup error + check the internet connection?

    I try to install the microsoft fix it and when the installation starts there was a mistake that check the internet connection

    Hello

    ·         What fixit you try to install on the system and why?

    ·         You are able to access other Internet sites without any problem?

    ·         What is the exact error that you are experiencing?

    I suggest you to check if you have turned on the proxy server. Follow the steps mentioned below.

    1. in the Internet Explorer Tools menu, click Internet Options, click the connections tab and then click LAN settings.

    2. in according to groups of servers Proxy, click to select the use a proxy server for your LAN check box.

    3 address , enter the IP address of the proxy server. (Note: Please try the same content with your "work PC' type)

    I suggest post you your query in the Fixit support forum to get help.

    Microsoft Fix it Center - NOT for general support questions

    http://social.Microsoft.com/forums/en-NZ/fixitcenter/

    Also, I suggest you to refer the links below.

    http://social.Microsoft.com/forums/en-NZ/fixitcenter/thread/0c5b0e4e-341F-468d-B2E4-6709c5df0198

    http://social.Microsoft.com/forums/EU/fixitcenter/thread/6278e447-a2aa-4380-9467-5e331d0723cf

  • Deleting a folder gives this message: check the location of the elements, and then try again

    I would like to help to get rid of a file. The folder used to hold pictures, but is now empty. I tried the normal removal methods. I also tried to remove prompt all to nothing does not. I tried to use Fileassassin, but it will not work with a folder and also Fileboss time to rename it to 8.3 and remove it but neither work. He will agree to be cut and pasted from images of office etc but will not delete in these two places. Similarly, it can be placed in another folder but still will not remove. Move a file inside does not either.

    Suggestions welcomed!

    Check if you have full permissions in the folder and also owner if necessary. Move the folder to your desktop.  Right-click on the folder, and then click Properties, click the Security tab.  Add your username in their own right.  Click Advanced and add your username in its own right to the section of special permissions.  And then click the property tab and make you the owner.  In all three cases, remember to check the box to apply it to all files and subdirectories.  That should give you the permission to delete the file.  If this is not the case, check all the tabs property, including safety to check that nothing is checked to refuse the removal.  The following should help you with this:

    To view your permissions, right-click on the file/folder, click Properties, and check the Security tab.  Check the permissions you have by clicking on your user name (or group of users).  Here are the types of permissions, you may have:http://windows.microsoft.com/en-US/windows-vista/What-are-permissions.  You must be an administrator or owner to change the permissions (and sometimes, being an administrator or even an owner is not sufficient - there are ways to block access (even if a smart administrator knows these ways and can move them - but usually should not because they did not have access, usually for a very good reason).)  Here's how to change the permissions of folder under Vista:http://www.online-tech-tips.com/windows-vista/set-file-folder-permissions-vista/. To add take and the issuance of right of permissions and ownership in the right click menu (which will make it faster to get once it is configured), see the following article:http://www.mydigitallife.info/2009/05/21/take-and-grant-full-control-permissions-and-ownership-in-windows-7-or-vista-right-click-menu/.

    To solve this problem with folders, folders takeownership or the reader (as an administrator) and give you all the rights.  Right-click on the folder/drive, click Properties, click the Security tab and click on advanced and then click the owner tab.  Click on edit, and then click the name of the person you want to give to the property (you may need to add if it is not there--or maybe yourself). If you want that it applies to subfolders and files in this folder/drive, then check the box to replace the owner of subcontainers and objects, and click OK.  Back and now there is a new owner for files and folders/player who can change the required permissions.  Here is more information on the ownership of a file or a folder:http://www.vistax64.com/tutorials/67717-take-ownership-file.html. To add take ownership in the menu of the right click (which will make it faster to get once it is configured), see the following article:http://www.howtogeek.com/howto/windows-vista/add-take-ownership-to-explorer-right-click-menu-in-vista/.

    If this does not work, tryUnlocker to: http://www.softpedia.com/get/System/System-Miscellaneous/Unlocker.shtml that removes folders and files and can work where other programs have not.

    I hope this helps.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

Maybe you are looking for

  • Stop playback of mp3 files in a new tab

    I want to open mp3 files in my player of choice. Firefox opens a new tab and play instead.Made things "always ask" and it does not work as explained in other threads.Tried to change the 'media.windows' etc. in the subject: config to false.Did not hel

  • How to reset the password forgotten on external HARD drive

    Hello I forgot the password of my external hard drive.How can I reset this? It has all my photos out there I want to come back.

  • iMAC, slow, gel Applications, beachball

    iMAC just 3 years (decent specifications) Applications of gel even with just the browser in use.  8 GB of RAM seem to be enough...  Even CleanMyMac3 does not solve the problem... Thank you in advance for your help, I don't know what causes this. Etre

  • Compaq mini 700: compaq mini 700 bios reset

    BIOS of Compaq mini 700 reset password please CNU92382JN

  • IPhone 5s on BELL Canada

    like many, I have also screwed on a purchase of the iphone, but of course I started to read about it later... I bought an iPhone 5 used from someone on Usedregina.com They mentioned in their announcement that the phone is with BELL and it can be unlo