Code help: query based cfloop with StartRowOptional and EndRowOptional in cfscript

It is probably a fairly simple thing - but I'm trying to learn as much cfscript possible by converting my CFC cfscript. I found examples of loops in cfscript based on a query, but I don't know where the StartRowOptional and EndRowOptional would fit in.

< cfloop query = StartRowOptional "qQuery" = "start #" EndRowOptional = "#end #" >

< cfset var = var1 >

< cfset var2 = var2 >

< / cfloop >

Thanks a bunch for advice.

~ Ben

You should be able to use a 'for' with indexes and keys. Something like (where 'start' and 'end' is your values):

Loop over the query.

for (intCurrentRow = start; end LTE intCurrentRow; intCurrentRow = (intCurrentRow + 1))

{

access the query as if it were a structure of arrays with the index of the current line:

stcSongs.songID = qSongs ["songID'] [intCurrentRow];

stcSongs.songName = qSongs ['songName'] [intCurrentRow];

etc...

}

Hope that helps.

Tags: ColdFusion

Similar Questions

  • Help build control PWM with Accelerator and arduino

    Hello

    Good night

    I'm new to labview
    pls help me to build a project, or give the design, because im confused how connect accelertor to PMW with arduino.

    This regulation:

    Create a program using LabView configuration between sensor
    Accelerometer in the current motor speed continuous is used. Where motor speed
    DC will change according to the level of the accelerometer tilt sensor.

    IM waiting for your happy,

    Please share .vi

    Thank & regards,.

    Kidz stew

    Hello

    TRY this and enjoy ;-)

  • BlackBerry smartphones HELP! Green bubble with icon and star

    My blackberry recently ran batterery and when I got round to load once again, he had an icon that looks like a green bubble with a white phone inside and a red star and a number 1 next to it. I guess it was a voice message, but my voicemail box is empty. Anyone know whatthis means? Any help much appreciated!

    If I were you I would check this statement

    homescreen > options > applications > third party

    I bet that's where.

  • With the help of a PC with PS5 and need to open BMP files. Everything speaks of a format ad on. Where it is located or is - it possible.

    Using a PC with Windows 7 and 64-Bit Photoshop CS5 Extended. I work with the old digital files saved in BMP format and unable to open. Help talk an ad - for various formats, where do you find such an animal, it is still possible.

    You shouldn't have any add-on to open an image file in BMP format. Photoshop.exe a BMP file format support open and save images in BMP format should not be a problem. You can use BMP files you can't open it in Photoshop with other programs like the viewers the Image and paint programs that support the *.bmp files? Your file is possibly corrupted.

    Supported in Photoshop file formats

  • Tax code failed iExpenses based on the location and type of expenditure

    Hi all

    I have a requirement in Internet Expenses (11.5.10) by default the code based on taxes
    the type of expenditure and the location. I store the mappings between the expense type + location-> tax code
    in a database table custom.

    I decided I need to extend the page controller
    / Oracle/Apps/AP/GOOSE/Entry/Lines/WebUI/DetailsPG which is DetailsPageGlueCO.java.

    My plan is to expand the page controller...

    (1) intercept the PPR events on the type of expenditure and the location LOV
    (2) to obtain the values of expense type and location using calls to row.getattribute
    (3) create a VO customized on the fly to search the tax code by default for this type of expense and the location
    (4) use row.setattribute to update the tax code

    I have extended the controller and am running in debug mode in Jdeveloper and I can confirm that
    the custom controller is running.

    First, I hit, it's that I can't get a handle on the view for the page object.
    The code I use is...

    ' Public Sub processFormRequest (pageContext OAPageContext, OAWebBean webBean)
    {

    super.processFormRequest (pageContext, webBean);

    Am = (OAApplicationModule) pageContext.getApplicationModule (webBean) OAApplicationModule;
    OAViewObject expVO = (OAViewObject) am.findViewObject ("ExpenseReportLinesVO");

    After these expVO lines have run is null
    I tried to change the reference to ExpenseReportLinesVO1 VO, but the original Version is still missing.

    Please can you point me in the right direction?

    Also please comment on my proposed approach to this customization.


    Thank you very much
    Andy

    Hi Andy,.

    (1) you weren't able to get the reference am as controller "DetailsPageGlueCO" is set to "pageLayout" region for OAWebBean object is reference to "pageLayout" region. Now using the line of code
    Am = (OAApplicationModule) pageContext.getApplicationModule (webBean) OAApplicationModule;
    We will go am region reference "pageLayout' which is 'WebExpensesAM '.

    Since we need to reference "OIECommonAM" we need to get the OAWebBean of the StackLayout region object. That's why we need to use
    OAWebBean oawebbean1 = oapagecontext.getPageLayoutBean () .findChildRecursive ("StackLayout");

    (2) to get the value of ExpTypeChoice use code below: (not tried your approach)

    OAMessageChoiceBean oamessagechoicebean = (OAMessageChoiceBean) oawebbean.findChildRecursive ("ExpTypeChoice");
    If (oamessagechoicebean! = null & oamessagechoicebean.getSelectionValue (oapagecontext)! = null)
    ExpTypeVal = oamessagechoicebean.getSelectionValue (oapagecontext);

    (3) TaxCodeId use code below:

    ExpenseReportLinesVOImpl reportlinesvo = (ExpenseReportLinesVOImpl) am.findViewObject ("ExpenseReportLinesVO");
    If (reportlinesvo! = null)
    {
    ExpenseReportLinesVORowImpl reportlinesrow = (ExpenseReportLinesVORowImpl) reportlinesvo.getCurrentRow ();
    If (reportlinesrow! = null)
    {
    reportlinesrow.setTaxCodeId (); We must move the Number data type for this method
    }
    }

    Kind regards
    Anand

  • HELP Please: compare timestamps with excel and make the corresponding value in the next column

    Hello

    I have attached the program I did up to now and the txt file required by the program.

    I want to compare the timestamp given by me at the beginning of the program, and when it is true, I want to take the corresponding value of nearby and use for the calculation.

    I am able to compare the time but I do not know how to take the corresponding '0' or '1' value of the file.

    I'm a beginner to labview. It can be simple, but I couldn't understand it

    Kindly help.

    Thanks in advance

    Arun

    This?  If you get a match, find a true Boolean 1 d array and use the index of the element to get the data of the next column.

  • With the help of vector graphics with fxml and JavaFX

    HY

    I wonder about the use of vector graphics scalable, svg, files in my project JFX.
    I know how to display the png with an imageview images and who can handle via CSS style (like fx-background-image)
    But for now, I want to add a vector graphic to my scene.
    I'm not shure if I use .ai, .svg or other file formats and how to load that.

    I read on SVGGraph but failed to get the idea behind it
    (and think that's not for files)

    So please can someone tell me how single charge and show a graphic vector and formaterait which should take?

    Ah: A way to make this replaceable graph via CSS style would be nice too ;)

    Thank you

    BR

    This .fx file is probably the old 1.x JavaFX, which is no longer supported for JavaFX 2.x and to my knowledge there is also no converter for this.

  • With the help of a DBENV with DB_LOG_IN_MEMORY and DB_TXN_NOSYNC

    A BDB running as transaction data store. I have create a DB_ENV and before opening it, set the log configuration to use DB_LOG_IN_MEMORY, send me of ACI (without the D). What changes (if any) on the definition of the DB_TXN_NOSYNC on DB_ENV open?

    Thanks, k

    Hi Kedar,

    The Berkeley DB log files do overwrite not several times the same file system blocks as Berkeley DB log files are not implemented as a circular buffer, and the log files are not reused. For this reason, the Berkeley DB log files should not pose difficulties for configurations of memory Flash.

    However, as Berkeley DB does not log records to write in pieces the size of block file system, it is likely that postings of sequential transactions (which each empty the log file on the backup file system), will write twice, a block of Flash memory as the last record in the first validation log will write the same Flash memory block as the first record in the second validation log. Applications requiring no not of absolute longevity must specify the DB_TXN_WRITE_NOSYNC or DB_TXN_NOSYNC flags to the DB_ENV-> set_flags() method to avoid this replacement of a block of Flash memory.

    For more details, please see [configurations only memory or Flash | http://www.oracle.com/technology/documentation/berkeley-db/db/programmer_reference/program_ram.html]

    Bogdan Coman

  • With the help of NOR-5641R with FPGA and the instrument driver


    Hi Ran,

    I don't think what you describe is possible for two reasons.

    1. You cannot run the pilot bitfile instrument at the same time as a user defined FPGA bit file

    2. AO ports are AC coupled, so you will not be able to generate a DC bias on them.

  • Query based ViewObject does pull not all attributes, when the query has 'WITH' clause

    Hello

    12.1.2 and 12.1.3 JDeveloper

    When we try to create a custom query based ViewObject, and the query clause of "with."

    So not all the columns selected in the query are appearing as attributes of the View object in the wizard.

    This is the query. And it performs very well in Toad.

    WITH dept_count AS)

    SELECT department_id, COUNT (*) AS dept_count

    Employees

    GROUP BY department_id)

    SELECT e.first_name AS employee_name,

    DC1.dept_count AS emp_dept_count,

    m.first_name AS manager_name,

    DC2.dept_count AS mgr_dept_count

    E employees,

    dept_count dc1,

    m employees,

    dept_count dc2

    WHERE e.department_id = dc1.department_id

    AND e.manager_id = m.employee_id

    AND m.department_id = dc2.department_id;

    Only the EmployeeName attribute is extracted from the query. It does not show the rest of the attributes in the VO Wizard.

    VO.png

    (I also tried to create a VO from the EntityObject class and make it editable as false, even in this case all attributes are not displayed.)

    I was wondering if something changed in 12 c?

    It works in 11.1.1.7

    (A friend of mine just asked me this).

    Thanks for any help.

    Sameer

    Jdev dislikes the syntax

    You can rewrite as

    SELECT e.first_name AS employee_name,

    DC1.dept_count AS emp_dept_count,

    m.first_name AS manager_name,

    DC2.dept_count AS mgr_dept_count

    E employees,

    (

    SELECT department_id, COUNT (*) AS dept_count

    Employees

    GROUP BY department_id) dc1,.

    m employees,

    (

    SELECT department_id, COUNT (*) AS dept_count

    Employees

    GROUP BY department_id) dc2

    WHERE e.department_id = dc1.department_id

    AND e.manager_id = m.employee_id

    AND m.department_id = dc2.department_id

    who must work and give you the same result.

    Timo

  • Report with the query with union and parameters

    Hello

    We have an obligation to create a report with the request, which is the union and parameters.

    I intend to create a database for the report based on a query. But the problem here is that the way to pass parameters in the query.

    Request is something like that

    Select x.a, x.b, x.c
    x
    where x.year =: para1
    and x.status = 'A '.
    Union of all the
    Select x.a, x.b, x.c
    x
    where x.year =: para1 - 1
    and (x.status = 'c' and x.date =: para2 or x.status = 'I' and x.date < =: para2)

    Here x.year in the first select statement must be equal to: para1 and second select statement, it should be: para - 1.

    How this requirement can be achieved?

    Client don't want to separate worksheet, a parameter and another for the actual data that I tried with sys_context and it worked. But the client wants the result in a single sheet only... So I need to change their approach.

    Help, please.

    Thank you

    Hello
    Another option is to convert the request so that you will have the items from the selection
    for example on the query you provided that you can use:

    Select 'Curr' rec_type, x.a, x.b, x.c, x.year, x.date, x.status
    x
    where x.status = "A".
    Union of all the
    Select 'Prev' rec_type, x.a, x.b, x.c, x.year, x.date, x.status
    x
    where x.status in ('c', 'I')

    then, in the workbook, you will be able to create conditions such as:
    rec_type = 'Curr' and year =: para1

    rec_type = 'Prev' and year =: para1-1
    rec_type = 'Prev' and (status = 'c' and date =: para2 or status = 'I' and date)<=>

    Tamir

  • How can I select the files in a folder with the help of a list with the files you want and after that rename only the files using another list with desired new names?

    How can I select the files in a folder with the help of a list with the files you want and after that rename only the files using another list with desired new names?

    I have only:
    D: / images (where are necessary + not need files)
    -a list with only the necessary files
    -a list with new names for the files needed
    Thank you.

    Hi Pustiu,

    Thanks for posting in the Microsoft Community.

    You want to know how to select the files in a folder using a list with the files you want and after that rename only the files using another list with desired new names.

    I would have you post your query in the TechNet forums because it caters to an audience of it professionals.

    Your query will be better addressed there.

    Check out the link-

    http://social.technet.Microsoft.com/forums/en-us/w7itprogeneral/threads

    We know if you need help. We will be happy to help you. We, at tender Microsoft to excellence.

    Thank you.

  • SQL query to find the total number of source based nonsource passangersbetween source and destination station and passenger station on the same chekindate

    Hello

    SQL query to find the total number of source based nonsource passangersbetween source and destination station and passenger station on the same chekindate.

    Please help on this script and let me know if you need more details.

    ---

    You use a SELECT statement.  Let me know if you need more details.

  • More than 1 SQL query with checkbox and error invalid number report

    Hi all

    I have two SQL query reports that each has an apex_item.checkbox and two processes for each report.  A report/process works very well.  It gives me an error of invalid number.

    In addition, another query SQL (editable report) gives me the following error when using the Multi line process, delete.

    ORA-06502: PL/SQL: digital or value error: character number conversion
    error ORA-06502: PL/SQL: digital or value error: character number conversion
    error
    Ok

    When I got a report from SQL query (with box and a process) and the query SQL (editable report) everything worked.  It stopped working when I added another SQL query report (with box and a process).

    A SQL query has the following in my query: apex_item.checkbox(3,email_id,'UNCHECKED') ""

    The other SQL query has the following: apex_item.checkbox(2,b.file_id,'UNCHECKED') ""

    Any help will be greatly appreciated,

    Sylvia

    Hi Reema,

    I've recreated the region and now it works!

    Thank you for this, looking at

    Sylvia

  • Kindly help for mentioning out with an SQL query, thanks

    Hello

    Please find below the input grid and help me get the result. Thanks in advance.  [Seeks assistance of query tunned]

    with the temp as

    (select alert_id 100, 111 double branch_code)

    Union of all the

    Select double 100 111

    Union of all the

    Select double 100 222

    Union of all the

    Select double 101 333

    Union of all the

    Select double 101 444

    Union of all the

    Select double 101 555

    Union of all the

    Select double 102 666

    Union of all the

    Select double 102 666

    Union of all the

    Select 102 666 double)

    Select * Temp;

    Entry
    Alert_IDBranch_code
    100111
    100111
    100222
    101333
    101444
    101555
    102666
    102666
    102666

    Output
    Alert_idBranch_code
    100111 222
    101333,444,555
    102666

    Thanks a ton

    Arpit

    Oracle 11 g 2, with analysis of the table only once. .. Here's how:

    WITH temp1

    AS (SELECT alert_id,

    branch_code,

    ROW_NUMBER)

    COURSES (PARTITION BY alert_id ORDER BY branch_code)

    DSB

    TEMP

    GROUP BY alert_id, branch_code)

    SELECT alert_id,

    LISTAGG (branch_code, ",") WITHIN GROUP (ORDER BY DSB) branch_code

    OF temp1

    GROUP BY alert_id;

    ALERT_ID BRANCH_CODE

    100 111 222

    101 333,444,555

    102 666

    See you soon,.

    Manik.

Maybe you are looking for

  • How to disable the connection passes by Satellite C55D-B5308

    Hi all I need help for Toshiba Satellite C55D-B5301 with window 8 , how to turn off the sign - in password everytime I turn on my laptop. Doing research on the web, but so far find any results. The top of the tower for use domestic only. I thank once

  • How to close headers and footers on a printed page

    How to close headers and footers on a printed page

  • How to upgrade to 8.1 windows

    How upgrading to windows 8.1? in a win pc 8

  • How to use ANSI. SYS in Windows-7

    I wrote and still uses a number of spans BACK (DOS32) programs, some use the ANSI standard. SYS.Although Windows 7 has ANSI. SYS, use the way classic by a command Device =\ansi.sys in the CONFIG. SYS does not help. A file that replaces the CONFIG. SY

  • Approval released

    Hi all I have problem about the released Application that has been approved, but the State in the 'Managed product' page is still "awaiting review 1 open VC (s)" and I can't find it in the app world. By this post, I fix the screen image, help me to s