query to retrieve a next valid record

Hi all

I have a strange obligation to write a query/logic to achieve the following objectives. I have a table that has a column of date and a field that indicates whether it is a valid date or not

Valid date
01/11/2010 Y
01/12/2010 N
N 13/01/2010
2010-02-17 Y
2010-03-15 N
04/11/2010 Y
21/06/2010 Y
2010-08-18 N
2010-09-14 N
2010-10-17 Y

If a specific date is not valid, I need to go out the next valid date. So, something like

Valid date of valid date
01/11/2010 Y 01/11/2010
01/12/2010 N 17/02/2010
13/01/2010 N 17/02/2010
17/02/2010 2010-02-17 Y
15/03/2010 N 04/11/2010
04/11/2010 04/11/2010 Y
21/06/2010 Y 21/06/2010
18/08/2010 N 17/10/2010
14/09/2010 N 17/10/2010
17/10/2010 Y 10/17/2010

Is it possible in a single query?


Thank you

Birdy
with t as (
           select to_date('11/01/2010','dd/mm/yyyy') dt,'Y' valid from dual union all
           select to_date('12/01/2010','dd/mm/yyyy'),'N' from dual union all
           select to_date('13/01/2010','dd/mm/yyyy'),'N' from dual union all
           select to_date('17/02/2010','dd/mm/yyyy'),'Y' from dual union all
           select to_date('15/03/2010','dd/mm/yyyy'),'N' from dual union all
           select to_date('11/04/2010','dd/mm/yyyy'),'Y' from dual union all
           select to_date('21/06/2010','dd/mm/yyyy'),'Y' from dual union all
           select to_date('18/08/2010','dd/mm/yyyy'),'N' from dual union all
           select to_date('14/09/2010','dd/mm/yyyy'),'N' from dual union all
           select to_date('17/10/2010','dd/mm/yyyy'),'Y' from dual
          )
select  dt,
        valid,
        min(
            case valid
              when 'Y' then dt
            end
           ) over(order by dt rows between current row and unbounded following) valid_dt
  from  t
  order by dt
/

DT         V VALID_DT
---------- - ----------
11/01/2010 Y 11/01/2010
12/01/2010 N 17/02/2010
13/01/2010 N 17/02/2010
17/02/2010 Y 17/02/2010
15/03/2010 N 11/04/2010
11/04/2010 Y 11/04/2010
21/06/2010 Y 21/06/2010
18/08/2010 N 17/10/2010
14/09/2010 N 17/10/2010
17/10/2010 Y 17/10/2010

10 rows selected.

SQL> 

SY.

Tags: Database

Similar Questions

  • SQL query to retrieve a single record for each employee of the following table?

    Hi all

    Help me on the writing of SQL query to retrieve a single record for each employee of the following table? preferably a standard SQL.

    CREATE TABLE xxc_contact)

    empnum NUMBER,

    alternatecontact VARCHAR2 (100),

    relationship VARCHAR2 (10),

    phtype VARCHAR2 (10),

    Phone NUMBER

    );

    insert into xxc_contact values (123456, 'Rick Grimes', 'SP', 'Cell', 9999999999)

    insert into xxc_contact values (123456, 'Rick Grimes', 'SP', 'Work', 8888888888)

    insert into xxc_contact values (123457, 'Daryl Dixon', 'EN', 'Work', 7777777777)

    insert into xxc_contact values (123457, 'Daryl Dixon', 'EN', 'Home', 3333333333)

    insert into xxc_contact values (123456, 'Maggie Greene', 'CH', 'Cell', 9999999999)

    insert into xxc_contact values (123456, 'Maggie Greene', 'CH', 'Home', 9999999999)

    expected result:

    EmpNum AlternateContact Relationship PhType Phone       

    123456 rick Grimes SP cell 9999999999

    Daryl Dixon EN work 7777777777 123457

    Home 123458 Maggie Greene CH 6666666666

    Thanks in advance.

    994122 wrote:

    Thank you all, that I got a result

    http://www.orafaq.com/Forum/m/620305/#msg_620305

    By Lalit Kumar B...

    Specifically, the two simple solutions provided were:

    1 using the row_number, entitled Oracle ranking based on descending order of the inside telephone each empnum group. And finally selects the lines which has least rank (of least since that order is descending for phone).

    SQL > column alternatecontact format A20;

    SQL >

    SQL > SELECT empnum, alternatecontact, relationship, phtype, phone

    2 from (SELECT a.*, row_number() over r (PARTITION BY empnum ORDER BY phone / / DESC))

    3 FROM xxc_contact one)

    4. WHEN r = 1

    /

    EMPNUM ALTERNATECONTACT RELATIONSHIP PHTYPE PHONE

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

    123456 rick Grimes SP cell 9999999999

    Daryl Dixon EN work 7777777777 123457

    Home 123458 Maggie Greene CH 6666666666

    2. with the help of MAX, Oracle automatically assigns the maximum phone for all the rows in each group of empnum. And finally selects the rows with the maximum phone. Order by clause is omitted here intentionally. You can find out why.

    SQL > SELECT empnum, alternatecontact, relationship, phtype, phone

    2 (SELECT a.*, MAX (phone) over (PARTITION BY empnum) rn FROM xxc_contact one)

    3 WHERE phone = rn

    4.

    EMPNUM ALTERNATECONTACT RELATIONSHIP PHTYPE PHONE

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

    123456 rick Grimes SP cell 9999999999

    Daryl Dixon EN work 7777777777 123457

    Home 123458 Maggie Greene CH 6666666666

    Kind regards

    Lalit

  • Query to retrieve the level 2 supervisors

    Hi all

    I use the following query to retrieve the people which is under the supervision of a given person_id... Is it possible to modify this query (see below) in order to get two levels of employees? something like:

    Supervisor 1
    Employee 1
    Employee 2
    Employee 3
    Supervisor 2
    Employee 4
    Employee 5
    Employee 6

    The query works if I pass the person_id 1 for example supervisor that I would get used 1 2 and 3. But if I pass an id of the person who, of higher hierarchy, I will just get supervisor 1 supervisor 2... And I need all the people (just two levels down)

    Select distinct *)
    Select distinct ppf.first_name |' '|| PPF.last_name
    ppf.last_name
    fu.user_name
    fu.user_id
    ppf.person_id
    papf.person_id Manager
    pi.image_id
    initcap (hla.description) LOCATION
    pb.NAME pay_basis_name
    pax.grade_id
    haou.name
    employment_category
    ppos.date_start
    of per_assignments_x pax
    per_grade_definitions pgd
    per_people_x WP
    fnd_user fu
    per_all_people_f women's wear
    per_images pi
    hr_locations_all hla
    per_pay_bases pb
    hr_all_organization_units haou
    per_periods_of_service OPP
    where ppf.person_id = pax.person_id
    and trunc (sysdate) between papf.effective_start_date and papf.effective_end_date
    and fu.person_party_id = papf.party_id
    and pax.supervisor_id = papf.person_id
    and pi.parent_id (+) = ppf.person_id
    and pi.table_name (+) = "PER_PEOPLE_F".
    and pax.person_id = ppf.person_id
    and hla.location_id (+) = pax.location_id
    AND ppf.current_employee_flag = 'Y '.
    AND pb.pay_basis_id = pax.pay_basis_id
    AND haou.organization_id = pax.organization_id
    AND ppos.person_id = ppf.person_id
    AND pax.grade_id = pgd.grade_definition_id
    AND papf.person_id =: inPersonId
    UNION ALL
    Select ppf.first_name |' '|| PPF.last_name
    ppf.last_name
    fu.user_name
    fu.user_id
    ppf.person_id
    papf.person_id Manager
    pi.image_id
    initcap (hla.description) LOCATION
    pb.NAME pay_basis_name
    pax.grade_id
    haou.name
    employment_category
    ppos.date_start
    of per_people_x WP
    per_grade_definitions pgd
    fnd_user fu
    per_all_people_f women's wear
    HR_WORKING_PERSON_LISTS HWPL
    per_images pi
    per_assignments_x pax
    hr_locations_all hla
    per_pay_bases pb
    hr_all_organization_units haou
    per_periods_of_service OPP
    where
    trunc (sysdate) between papf.effective_start_date and papf.effective_end_date
    and fu.person_party_id = papf.party_id
    AND HWPL.owning_person_id = papf.person_id
    and hwpl.selected_person_id = ppf.person_id
    AND pi.parent_id (+) = ppf.person_id
    and ppf.current_employee_flag = 'Y '.
    and pax.person_id = ppf.person_id
    AND hla.location_id (+) = pax.location_id
    AND pb.pay_basis_id = pax.pay_basis_id
    AND haou.organization_id = pax.organization_id
    AND ppos.person_id = ppf.person_id
    AND pax.grade_id = pgd.grade_definition_id
    AND papf.person_id =: inPersonId
    ) order of last_name

    Hello Alejandro,

    You can play a little bit with one below with what you find most comfortable.

    / * multi level * /.
    Select the level
    assignment_number
    assignment_id
    Manager
    , (select full_name from per_people_x where person_id = pax.person_id)
    , sys_connect_by_path ((sélectionnez employee_number dans per_people_x où person_id = pax.person_id), '-->')
    of per_assignments_x pax
    where primary_flag = 'Y '.
    connect by prior person_id = Manager
    Start by person_id = 1523

    / * level 2 only * /.
    Select (select full_name from per_people_x where person_id = pax1.person_id)
    , (select full_name from per_people_x where person_id = pax2.person_id)
    of per_assignments_x pax1
    per_assignments_x pax2
    where pax1.supervisor_id = 1523
    and pax1.primary_flag = 'Y '.
    and pax1.person_id = pax2.supervisor_id
    and pax2.primary_flag = 'Y '.

  • I need a query that selects the amount of records for each day of a table.

    I need a query that selects the amount of records for each day of a table.
    For example, the result would be:

    1 14 date
    Date 2-3

    etc.

    Any ideas?

    Sort:

    SELECT count ([IDCommentaire]), convert (varchar, dateAdded, 112)

    OF COMMENTSgroup by convert (varchar, dateAdded, 112)

  • Query to retrieve the latest version

    Hello
    I am trying to create a query that retrieves the latetst of a product version. There are 2 tables I have mark from, we have the product number and we got the version - a varchar2 data type (60). Are versions A, B, c... etc. So, I want to give me a line for each product with its latest version of the application. It's the query I have so far


    SELECT A0. Prod_num, A0.version
    FROM (SELECT A0B. Prod_num, A0.version
    Of tb_1 A0, tb_2 A0B
    WHERE (A0.tb_1pk = A0B.tb_2pk)) A0
    ranking by A0. Prod_num

    Returns duplicate versions and product lines.

    Thank you.

    Without seeing sample data...

    SELECT A0B. Prod_num,
    Max (a0.version)
    Of tb_1 A0, tb_2 A0B
    WHERE (A0.tb_1pk = A0B.tb_2pk)
    AO8.prod_num GROUP;

  • Query to retrieve the number of transactions in every 1 hour for the end

    Hello

    Could someone help to write a query to retrieve the number of transactions in every hour for the last month.

    Case:
    I / P

    If Timestamp1
    1 01/01/2008 00:00:01
    CAS2 01/01/2008 00:01:01
    case3 01/01/2008 01:00:01
    1 01/01/2008 01:02:01
    case4 01/01/2008 01:10:01
    Service5 01/02/2008 02:00:01
    Case6 01/02/2008 02:10:01
    case7 2008-02-01 23:00:01
    .............................

    .............................
    case... 2008-01-31 00:24:00


    O/P
    cases of to_time of time
    2008-01-01 00:00:00 01/01/2008 01:00 2
    2008-01-01 01:00:01 01/01/2008 02:00 3

    .........................
    .........................

    etc.

    Any help really appreciated

    We can do this by using analytic functions

    Here's what I did:

    create table timestamp1 (date of ts)

    Select * from timestamp1
    2008-10-30 15:41:13
    2008-10-30 15:41:05
    2008-10-30 15:40:03
    2008-10-30 14:58:26
    2008-10-30 14:29:45
    2008-10-30 13:17:48
    2008-10-30 08:29:50
    2008-10-30 06:05:51
    2008-10-30 03:41:52
    2008-10-30 02:29:54

    Select distinct to_char (ts, 'hh24') frmhrs,
    TO_CHAR (ts, 'hh24') + 1 tohrs, count (ts) OVER (order by to_number (to_char (ts, 'hh24')) RANK BEFORE (1/24))
    of timestamp1
    When trunc (ts) = trunc (sysdate) - I added this just to make sure that I get for data of today
    order of frmhrs

    FRMHRS TOHRS CNT
    1-3-02
    03-4-1
    06 7 1
    1-9-08
    13 14 1
    14 15 2
    15 16 3

    You can customizeas by your need.

  • analytical query to select the next record

    Hi all
    I would like to ask the two table below correspond to the output.
    1.dev_wt 2.dev_map 3. output result

    To help more clearance, please see this image link: http://lh6.ggpht.com/_xL6eBqjW6Yo/TEqnSvlF_FI/AAAAAAAAB0U/i2sclnnaj6g/Untitled-3.jpg

    1 dev_wt
    PMS_COMP     PMS_I       PMS_PERF_D   PMS_WT   PMS_CREATION_D
    BBOARD     GICEQGROSS    04/01/2001     30     04/05/2001
    BBOARD     GICST_B       04/01/2001     5      04/05/2001
    BBOARD     SBGS_B        04/01/2001     65     04/05/2001
    
    BBOARD     GICEQGROSS    04/11/2001     30     04/15/2001
    BBOARD     GICST_B       04/11/2001     5      04/15/2001
    BBOARD     SBGS_B        04/11/2001     65     04/15/2001
    2 dev_map
    GS_CODE     GS_I_CODE    GS_I_ID  MD_ID   GS_START_DT    GS_END_DT
    GICEQGROSS   CIWL        304       15     01/04/1998     31/03/2004
    GICEQGROSS   CIWL        304       2     01/04/2004      31/03/9998
    GICST_B      GICST_B     3707      15     01/04/2000     31/12/9998
    SBGS_B       SBGS_B      2231      15     01/04/1992     30/09/2003
    SBGS_B       SBGS_B      564       15     01/10/2003     31/12/9998
    I would like to match PMS_I = GS_CODE to retrieve the GS_I_CODE and analytical assistance

    query to search for the next record.
    Because I need to select record GICEQGROSS PMS_PERF_D date and following
    GICEQGROSS save PMS_PERF_D of dev_wt table and put the result GS_WT_FR and GS_WT_TO output.

    The date is in the format YYYYMMDD
    PMS_WT is divided by 100

    * 3. Output result *.
    GS_I_ID    PMS_COMP     GS_I_CODE     GS_WT_FR     GS_WT_TO     GS_I_CALC
    304       BBOARD        CIWL          20010401     20010410     0.3
    3707      BBOARD        GICST_B       20010401     20010410     0.05
    5209      BBOARD        SBGS_B        20010401     20010410     0.65
    PMS_COMP is of dev_wt table
    GS_I_CODE is dev_map join of tables with dev_wt
    GS_WT_FR is dev_wt GS_START_DT table
    GS_WT_TO's dev_wt record table according GS_START_DT where PMS_I = 'GICEQGROSS. '

    Now my challenge is to select the next record in PMS_PERF_D using the query analysis. Below
    is my query...
    SELECT GS_I_ID, PMS_COMP, GS_I_CODE, GS_WT_FR, GS_WT_TO, GS_I_CALC
    FROM dev_wt (
     SELECT lead(PMS_PERF_D) over(partition by PMS_I order by PMS_PERF_D) as GS_WT_TO        
     FROM dev_wt where PMS_I ='GICEQGROSS')
    left join dev_map on PMS_I = GS_CODE ;
    Thank you

    Edited by: WinZone 24 July 2010 16:46

    Edited by: WinZone 24 July 2010 16:50

    Hello

    This should be good:

    SELECT DISTINCT t2.gs_i_id, pms_comp, t2.gs_i_code,
                    TO_CHAR
                       (MIN (pms_perf_d) OVER (PARTITION BY pms_comp, pms_i),
                        'yyyymmdd'
                       ) gs_wt_fr,
                    TO_CHAR
                       (MAX (pms_perf_d) OVER (PARTITION BY pms_comp, pms_i) - 1,
                        'yyyymmdd'
                       ) gs_wt_to,
                    pms_wt / 100 gs_i_calc
               FROM dev_wt t1, dev_map t2
              WHERE t2.gs_code = t1.pms_i
    

    REM note even as odie: should be "2231" instead...

  • SQL query to retrieve the same record because no. boxes

    Hi all

    I have a table of Bill XXINV.

    the columns are

    INVH_NO INVH_ITEM_CODE INVH_QTY INVH_BOXES

    1122                XXITEM1                    1                    5

    1123                XXITEM2                     2                   6

    I can do a sql query so that I can retrieve the same records repeated as number INVH_BOXES.

    Select * from XXINV

    where invh_no = 1122

    output:

    INVH_NO INVH_ITEM_CODE INVH_QTY INVH_BOXES

    1122                XXITEM1                    1                    5

    Desired output:

    INVH_NO INVH_ITEM_CODE INVH_QTY INVH_BOXES

    1122                XXITEM1                    1                    5

    1122                XXITEM1                    1                    5

    1122                XXITEM1                    1                    5

    1122                XXITEM1                    1                    5

    1122                XXITEM1                    1                    5

    or

    INVH_NO INVH_ITEM_CODE INVH_QTY INVH_BOXES

    1122 XXITEM1 1 1 of 5

    1122 XXITEM1 1 2 of 5

    1122 1 3 5 XXITEM1

    1122 XXITEM1 1 4 of 5

    1122 XXITEM1 1 5 of 5

    Please suggest. Like I need to print each line in a single page to stick them on boxes so that packaging.

    Kind regards

    Afzal.

    Just add INVH_ITEM_CODE to the connection by the clause.

    Select invh_no

    invh_item_code

    invh_qty

    to_char (, 'fm99') | 'from ' | TO_CHAR (invh_boxes, 'fm99') invh_boxes

    of xxinv

    where invh_no = 1122

    connect

    by level<=>

    and prior invh_item_code = invh_item_code

    and prior sys_guid() is not null

  • SQL Query to retrieve records for all after the Max Dates.

    Hello everyone,

    I am trying to retrieve the record more recent, based on the date field ( nextDate ).

    Currently, there are only 4 records in the MC_Maintenance table and two in the Machine table.

    Machine table

    MC_id             EquipID          

    1                      0227

    MC_id EquipID

    2                     0228

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

    MC_Maintenance table

    Maint_id MC_id Next_maint

    1                      2                      08/25/2010     

    2                      2                      07/01/2010

    3                      1                      2010-11-06

    4                      1                      07/11/2010

    I have am trying to accomplish is,.

    the list of the two machines of the table of the Machine with the MAX (Next_maint) control the list of MC_Maintenance results

    These are the records I want to display.

    Maint_id MC_id Next_maint

    1                      2                      08/25/2010

    4                      1                      07/11/2010                 

    Here is the SQL query

    SELECT

           MC. MC_ID as ID,

    MC.complete_Date completed.

    MC.next_maint as nextDate,.

    MC.maint_notes as noted,.

    MC.facility Facility.

    M.EquipId,.

    $m.name as the name.

    M.SerialNumber SN.

    M.dept as dept.

    M.Freq as freq

    Of MC_Maintenance MC, Machine M

            where  MC. MC_ID = M.MC_ID

    '           Using MAX (nextDate)

    Any ideas would be useful.

    TJ

    I thought it was a simple group of problem?

    SELECT M.EquipID, MC.MC_ID, Max(MC.next_maint)
    FROM MC_Maintenance MC INNER JOIN Machine M ON MC.MC_ID = M.MC_ID
    GROUP BY M.EquipID, MC.MC_ID
    
  • Query to retrieve records that have more than one assignment_id

    Hello

    I'm writing a query to extract all records in the table per_all_assignments_f that has more than one different assignment_id for each person_id. Here's the query I wrote, it retrieves the records, even if a person_id assignment_id duplicate, but I need records that have more than one assignement_id without duplicate for each person_id

    Select assignment_id, person_id, assignment_id
    Of per_all_assignments_f
    Having count (assignment_id) > 1
    Person_id group, assignment_id

    Thank you.
    PK

    Maybe something like that?

    select *
    From   per_all_assignments_f f1
    where  exists (select 1
                   from   per_all_assignments_f f2
                   where  f2.person_id = f1.person_id
                   and    f2.assignment_id != f1.assignment_id
                  );
    

    Published by: SomeoneElse on May 7, 2010 14:23

    (you can add a SEPARATE from the outer query if you wish)

  • SQL Query to retrieve records in a table with the same records or only one record in a table

    Hello

    Got a curious requirment to extract the Non-distincts records in a table

    Example of

    Account number Type of account
    12345SB
    12345

    SB

    12346CR
    12346SB
    12347SB
    12348CR
    12349SB

    Requrirement is to retrieve the records as follows

    Result must be

    Account number Type of account
    12345SB
    12345

    SB

    12347SB
    12348CR
    12349SB

    You will notice that 12346 which has two separate lines have been eliminated in the result. I tried several qeries to achieve this result, one or the other had a few mismatch. Can someone give me a request for it.

    Thanks in advance.

    SELECT ACCOUNT_NUMBER,

    ACCOUNT_TYPE

    DE)

    SELECT ACCOUNT_NUMBER,

    ACCOUNT_TYPE,

    COUNT (*) ON CNT_ACC (ACCOUNT_NUMBER PARTITION).

    COUNT (*) ON CNT_NUM_TYP (PARTITION ACCOUNT_NUMBER, ACCOUNT_TYPE)

    FROM T1)

    WHERE CNT_ACC = CNT_NUM_TYP;

    exit;

    12345 SB
    12345 SB
    12347 SB
    12348 CR
    12349 SB
  • Query to retrieve 10 records of specimen of each type

    Hello
    I have a table that has a column named TYPE. This can have values such as B, F, I, U, etc. (may be more). I need a query that returns me records of 40 10 for each sample. the cases in the sample can be all lines at random.

    right now, I have 4 request for each TYPE and I do a UNION ALL operation for all queries. I get the result I need, but it will scan the 4 times table and does not have good performance wise.
    Select .match_type as move_type, na.new_address_flag as is_new_address, na
    na.address_line_1_orig, na.new_street_address, na.address_line_2_orig,
    na.new_address_line2, na.apt_nbr_orig, na.new_apt_nbr, na.city_orig,
    na.new_city, na.state_orig, na.new_state, na.zip_code_orig, na.new_postal_code,
    na.zip_plus_4_orig, na.new_postal_plus_cd
    of ncoa_audit na
    When type = "B".
    and rownum < 11

    Can anyone please help on this.

    Thank you

    WITH is just one of the ways that we can generate sample data. I did it to illustrate that the query works as expected. This is known as "Subquery Factoring." See the documentation for more information.

    If you want specimen for all types of remove the list, in the WHERE clause. The query will then return for all types.

    HTH!

  • Need to retrieve the last line/record in a table

    Hello

    I have a requirement like getting the ending balance of the last record in the table and the same insertion in the opening balance of the immediatetly created the next record.

    In simple terms, I need to extract a value from the last line of the recording.

    For example, I use the query below

    Select rownum emp, empno, ename
    where rownum = (select count (rownum) from emp);

    But, the above query does not return all of the recording.

    Therefore, need help on this.

    Kind regards
    Shivakumar has

    Published by: shiva March 27, 2011 22:14

    Hello
    Strictly speaking there is no such LAST or FIRST folder until that order you them.
    But check the following:

    SELECT * FROM emp MINUS
    SELECT * FROM emp WHERE rownum<=(SELECT count(empno)-1 FROM emp);
    

    Kind regards
    Lakshmi.

  • Query to retrieve lines from database

    Hello

    I have a strange question "my oracle database contains approximately 4000 records. As it is not desirable to extract all lines at once. Is it possible for me to recover the 100 lines in a page and then the next hundred, and then the next... Not sure if we can write a PL/SQL command for this or we need to change the database to display these options. Can anyone suggest on this please?

    Hello

    This is called a Query of paging , and here's a way to do it:

    WITH     got_r_num     AS
    (
         SELECT     x.*     -- or whatever columns you need
         ,     ROW_NUMBER () OVER (ORDER BY u_key)     AS r_num
         FROM     table_x
    --     WHERE     ...     -- If you need any filtering, put it here
    )
    SELECT       *     -- or list all columns except r_num
    FROM       got_r_num
    WHERE       TRUNC (r_num / 100)     = :page_number
    ORDER BY  r_num
    ;
    

    U_key, that's what unique key determines the order. It can be a single column, or a list separated by commas of phrases, as in an ORDER BY clause. For EXAMPLE:

    ...     ,     ROW_NUMBER () OVER ( ORDER BY       UPPER (last_name)
                             ,          UPPER (first_name)
                             ,          created_date     DESC
                           )     AS r_num
    
  • next n records interfaces

    am having a problem with my records next_n interface.

    I have a request for my index page when you click on a letter appropriate artists are displayed...
    See here

    http://www.musicexplained.co.uk/index.cfm

    the query depends on an url variable.

    < name cfquery = 'results' datasource = '#APPLICATION. DataSource #">"
    SELECT *.
    Of artist_art
    WHERE the bandname_art as '#url.firstletter#% '.
    < / cfquery >

    I am now creating a UI records next, so you can easily navigate through the artists that begin with one example, this interface is also dependent on a variable to URL... < cfset startrownext >
    However, when I click on the next button, see here
    http://www.musicexplained.co.UK/index_list_1.cfm?FirstLetter=a
    I lose the variable that feeds the index in the first place...

    is it all still around that?

    concerning


    Put the top of index_list_1.cfm:



    Then all your pagination links, also include the parameter firstletter again:


    First
    Next
    etc, etc.

Maybe you are looking for

  • No download for this session. How to remove this message

    want to download movies with download helper, but all I get is this message "no download for this session.

  • Satelite C850 - cannot boot from Win7 disc - "No Bootable Device"

    Hello- I'm trying to downgrade my copy of Windows 8 for Windows 7. When I try to boot from Windows 7 all that I get is a message telling me that "no boot device - press a key to continue." I went into Bios and disabled security boot and changed the b

  • Can I mix 6 Gbps and 12 Gbps SAS HDD?

    Hi all I use R350 server. As data are growing rapidly and my storage server is almost full. Therefore, I intend to buy more disk. Unfortunately, 6 Gb/s SAS HDD is end of line. Thus,. 1. can I mix 6 Gbps and 12 Gbps SAS HDD in my R350 Server? 2. If it

  • With genuine Windows 7 Ultimate

    Hello world I discovered that my version of the above is not authentic someone knows I can buy a valid copy that does not need a bootable usb or dvd IE totally down-loadable. I'm not an expert in computer so need in the best way possible. If someone

  • How to change rootIndexPath with javascript

    I wish I could change the value of rootIndexPath with javascript. Is this possible? I can see the value of rootIndexPath with {Label text: "" root path Index: "+ listview.rootIndexPath ;}" but I can't change the value. Here's the code I'm trying to f