Subtracting SYSDATE

Hi all

By the query below, I would like to ONLY output results of the previous months entries (in this case, it's July) based on SYSDATE.

I think I need a statement 'WHERE' that returns only the previous month. That said, I'll have one heck of a time to make it work.

I'm using ORACLE 11 g Express and SQL * more.

Any help would be greatly appreciated.

QUERY:

SELECT reportnum ' REPORT # ","ISSUED,"datechecked

faultreport.licenseno '# the PLATE', make, model,

Vehicle.Year, lname | ', ' || FName "EMPLOYEE of DELIVERANCE"

OF faultreport

JOIN employee ON employee.empno = faultreport.empno

JOIN vehicle ON vehicle.licenseno = faultreport.licenseno

ORDER BY reportnum;

OUTPUT CURRENT:

REPORT # PLATE # MAKE MODEL YEAR ISSUED ISSUING EMPLOYEE

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

1000000001 3 July 13 BH05J9U 2013 Smith, Sandy Ford Escape

1000000002 4 July 13 GI0UJD7 2012 Smith, Sandy Ford Fusion

1000000003 July 5, 13 5HDI9TG Ford Fiesta 2013 Miller, Harry

1000000005 8 June 13 A12F8GH Chevrolet Cruze 2013 Weaver, Brendan

DESIRED OUTPUT:

REPORT # PLATE # MAKE MODEL YEAR ISSUED ISSUING EMPLOYEE

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

1000000001 3 July 13 BH05J9U Ford Escape 2013 Smith, Sandy

1000000002 4 July 13 GI0UJD7 Ford Fusion 2012 Smith, Sandy

1000000003 5 July 13 5HDI9TG Ford Fiesta 2013 Miller, Harry


SAMPLE DATA:

CREATE TABLE EMPLOYEE

(EmpNo NUMBER (6) PRIMARY KEY,)

Title VARCHAR2 (30),

Fname VARCHAR2 (10) NOT NULL,

Lname VARCHAR2 (10) NOT NULL,

OutNo number 4,

SupervisorNo NUMBER (6));

CREATE TABLE VEHICLE

(LicenseNo VARCHAR2 (7) PRIMARY KEY,)

Do VARCHAR2 (12),

Model VARCHAR2 (15).

Color VARCHAR2 (15).

Year number 4.

NoDoors NUMBER (2),

Capacity NUMBER (2),

Rate number 4,

outNo NUMBER (4));

CREATE TABLE FAULTREPORT

(ReportNum NUMBER (10) PRIMARY KEY,)

DateChecked DATE,

EmpNo NUMBER (6).

LicenseNo VARCHAR2 (7).

RentalNo NUMBER (10),

Comments VARCHAR2 (200));

INSERT INTO EMPLOYEE VALUES ('100001 ', 'Associate', 'Jenny', 'Smith', ' 1001', '100007');

INSERT INTO EMPLOYEE VALUES ('100002 ', 'Associate', 'Fred', 'Frapples', ' 1001', '100007');

INSERT INTO EMPLOYEE VALUES ('100006 ', 'Associate', 'Bruce', 'Peer', ' 1002', '100009');

INSERT INTO EMPLOYEE VALUES ('100007', 'Manager', 'Sandy', 'Smith', '1001', '100003');

INSERT INTO EMPLOYEE VALUES ('100008 ', 'Associate', 'Julie', 'Walker', ' 1003', '100010');

INSERT INTO EMPLOYEE VALUES ('100009', 'Manager', 'Brendan', 'Weaver', '1002', '100003');

INSERT INTO EMPLOYEE VALUES ('100010 ', 'Manager', 'Wendy', 'Hill', ' 1003', '100003');

INSERT INTO EMPLOYEE VALUES (' 100011', 'Associate', 'Ocean', 'peer', '1004',' 100012' ");

INSERT INTO EMPLOYEE VALUES ('100012 ', 'Manager', 'Eric', 'green', '1004',' 100003');


INSERT INTO FAULTREPORT VALUES (' '1000000001', ' 3 July 13', '100007', ' BH05J9U', '3000000001', ");

INSERT INTO FAULTREPORT VALUES (' '1000000002', ' 4 July 13', '100007', ' GI0UJD7', '3000000004', ");

INSERT INTO FAULTREPORT VALUES (' '1000000003', ' 5 July 13', '100004', ' 5HDI9TG', '3000000003', ");

INSERT INTO FAULTREPORT VALUES (' '1000000004', ' 7 June 13', '100003', ' GI0UJD7', '3000000004', ");

INSERT INTO FAULTREPORT VALUES (' '1000000005', ' 8 June 13', '100009', ' A12F8GH', '3000000005', ");

INSERT INTO FAULTREPORT VALUES (' '1000000006', ' 4 May 13', '100009', ' S5BNP2S', '3000000006', ");

INSERT INTO FAULTREPORT VALUES (' '1000000007', ' 5 May 13', '100003', ' XCH4Y23', '3000000007', ");

INSERT INTO FAULTREPORT VALUES (' '1000000008', ' 6 May 13', '100010', ' A12F8GH', '3000000005', ");

INSERT INTO FAULTREPORT VALUES (' '1000000009', ' April 2 13', '100003', ' A12F8GH', '3000000005', ");

INSERT INTO FAULTREPORT VALUES (' '1000000010', ' 3 April 13', '100003', ' 634HV2E', '3000000010', ");


INSERT IN VEHICLE VALUES ('BH05J9U', 'Ford', 'Escape', 'White', '2013', '4', '5', '120',' 1001');

INSERT INTO VEHICLE of VALUES ('H4L0DH8', 'Ford', 'Edge', 'Blue', ' 2012', '4 ', '5', '120','1001 ');

INSERT INTO VEHICLE VALUES ('5HDI9TG', 'Ford', 'Fiesta', 'Green', '2013', '4', '5',' 90 ', ' 1002');

INSERT INTO VEHICLE of VALUES ('GI0UJD7', 'Ford', 'Fusion', 'Yellow', ' 2012', '4', '5',' 90 ', ' 1002');

INSERT IN VEHICLE VALUES ('GJU4Y7D', 'Nissian","Versa", 'Teal", ' 2012', '4', '5',' 90 ', ' 1001');

INSERT INTO VALUES ('S5BNP2S', 'Nissian', 'Altima', 'Blue', '2013', '4', '5', '120','1003 ');

INSERT IN VEHICLE VALUES ('XCH4Y23', 'Nissian', 'Maxima', 'Black' ', ' 2012 ', '4 ', '5', '120',' 1002');

INSERT IN VEHICLE VALUES ('A12F8GH', 'Chevrolet', 'Cruze', 'Black', '2013', '4', '5',' 90 ', ' 1003');

INSERT IN VEHICLE VALUES ("C4YUTSA", "Chevrolet", "Malibu", 'White', ' 2012', '4 ', '5', '120',' 1004');

INSERT INTO VEHICLE VALUES ('634HV2E', 'Chevrolet', 'Impala', 'Orange', '2013', '4', '5',' 120 ', ' 1004');

where some_date > = add_months (trunc (sysdate, 'MM'), - 1).

and some_date<>

Tags: Database

Similar Questions

  • Simple subtraction of Dates

    Hello, GUI, I'm new here. I am a student certification iz0-051 exam and I would be really grateful if you can help me with this doubt I have...

    I know that a character literal can be implicitly converted to a date if she follows the mask "[dd, DD] separator [mm, MM, Lun] separator [yy, rr, YYYY] etc...". etc...
    then... Why this simple subtraction will not through (the number of days between a given date and the current sysdate)?

    Select sysdate - ' double' 01-jan-2012.

    It gives the error 'ora-01722 invalid number', should - not implicitly convert the literal date and then subtracting sysdate? what I am doing wrong?

    Thanks for your help,

    Paolo

    955202 wrote:
    Still in doubt, I hate the implicit conversion...
    Well, let's see, following your suggestions, sysdate-"2" should not work too, but it does.
    My nls_date_fornat is dd-MON-rr, but even if I try to replace the literal with 1 January 12 ' it stil does not work, why?

    When two possibilities are there, ORACLE will make implicit conevrsion to the default NUMBER. That's why '2' sysdate - works. SYSDATE-'01-Jan-12' does not work for the same reason.

    But him below will work (based on nls_date_format), coz ORACLE knows, the string should be converted to DATE for sure.

    select  add_months('01-Jan-12',3) tst
    from dual;
    
  • SYSTIMESTAMP, sysdate and subtraction

    Hello Experts!

    Everything that happens is really me stumping

    Version database - Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production

    Select sessiontimezone dbtimezone, systimestamp, double sysdate

    SessionTimeZone DBTIMEZONE SYSTIMESTAMP SYSDATE
    America/Phoenix-04:0017 MARCH 15 04.09.27.894994000 PM - 04:0017 MARCH 15

    the column of sample_table

    updated_ts timestamp (6)

    When I run the following question

    Select sysdate - updated_ts,.

    SYSTIMESTAMP - updated_ts SUB_SYSTIMESTAMP,

    updated_ts,

    SYSDATE,

    SYSTIMESTAMP

    of sample_table

    I try very hard get any explanation on this.

    Thank you in advance!

    Everything that happens is really me stumping

    Probably because it lacks you some basics on arithmetic datetime and time zones.

    See the first row of data:

    (1) SYSDATE = 17 March 15 16:37:16 (Yes, SYSDATE there part of the time but your just sample does not display it)

    (2) UPDATED_TS = 17 MARCH 15 16:37:15.863983

    Thus (1) - (2) 0.136017 = (second)

    OK so far?

    (1) SYSTIMESTAMP = 17 March 15 16:37:16.516080 -04:00 = 17 March 15 20:37:16.516080 UTC

    (2) UPDATED_TS = 17 March 15 16:37:15.863983 America/Phoenix = 17 March 15 23:37:15.863983 UTC

    Since there is a time zone, the two operands are compared to UTC format.

    This column UPDATED_TS (which holds no information TZ) is first converted to the TIMESTAMP WITH time ZONE SCHEDULE using the session TZ "America/Phoenix" (= UTC - 07:00).

    So (1)-(2) = - 2:59:59.347903 (h: min: sec)

  • How to calculate the date from sysdate


    I try to get 12/09/2009-12:51:30 by subtracting the current date to sysdate.

    I can get with this year, but I don't know how I can get to the date and the month preceding.

    () Choose add_months (sysdate-36() of double) = 12/09/2010

    Planned result 12/09/2010 13:23:30

    Thank you for the help

    I'm assuming that time is fixed if it is to see the example below.

    SQL > select add_months (to_date (to_char(sysdate,'dd-mon-yyy') |)) (("" 12:51:30 ',' dd-MON-yyy hh: mi: ss AM "), - 36) prior_date
    2 double;

    PRIOR_DATE
    -----------------------
    12 - Oct - 2010 12:51:30

    SQL >

  • subtracting hours to date

    Hello

    I have the date format mm:dd:yyyy hh: mi: ss am .
    I have to subtract 10 for hh this format field. I mean that I have to convert as
    09/mm/yyyy hh24 - 10:mi: ss in oracle by Toad

    PL tell me how...


    waiting for m?

    regarding
    Vishal amine

    Hello

    Remove an hour:

    Select sysdate, sysdate-(1/24) from dual;
    

    François

  • How to get the time in hours minutes and seconds subtraction between two varchar t

    Hi all

    I have two variable varchar that has a value like this

    v_outpunch1: = 17: 50:00'
    and v_Shifttime: = 18:00:00 '


    This time I'm subtracting here and in another varchar variable
    who's like that.



    v_EarlyLeaverstimeformat: = ((extrait extrait de (heure de TO_TIMESTAMP (v_ShiftTime, 'HH24:mi:ss'))-(heure de TO_TIMESTAMP (v_OutPunch1, 'HH24:mi:ss') LPAD)), 2, '0'): ': ' |)) LPAD ((extrait (minute de TO_TIMESTAMP (v_ShiftTime, 'HH24:mi:ss'))-extrait (minute de TO_TIMESTAMP (v_OutPunch1, 'HH24:mi:ss'))), 2, '0'): ': ' |)) LPAD ((extrait (seconde de TO_TIMESTAMP (v_ShiftTime, 'HH24:mi:ss'))-extrait (seconde de TO_TIMESTAMP (v_OutPunch1, 'HH24:mi:ss'))), 2, '0');))



    It is not properly subtracting value.

    Thank you

    This works for me...

    SQL> ed
    Wrote file afiedt.buf
    
      1  with t as(select to_date('17:50:00','HH24:MI:SS') as out, to_date('18:00:00','HH24:MI:SS') as shft from dual)
      2  --
      3  select to_char(trunc(sysdate)+(shft-out),'HH24:MI:SS') as diff
      4* from t
    SQL> /
    
    DIFF
    --------
    00:10:00
    

    If you want something different, please report the details according to the FAQ: {message identifier: = 9360002}

  • Helps the subtraction of two different lines

    Hi all... Beginner here... :)
    I have a table in which I have to subtract two different dates for the idle time.
    I need to subtract the evnt_end to evnt_start to get the difference concerning the duration of inactivity...
    Thanks for your help...

    Here is an example of the table:

    EVNT_ID... * EVNT_START *... * EVNT_END *.
    ..... 12:34:30 1...6/22/2010... 2010-06-22 18:36:06
    ..... 21:58:38 2...6/22/2010... 2010-06-23 04:02:11
    ..... 05:10:43 3...6/23/2010... 2010-06-23 11:08:13
    ..... 4...6/23/2010 12:22:24... 2010-06-23 18:21:17
    ..... 22:29:03 5...6/23/2010... 2010-06-24 04:28:11

    I have another question, is there a function that can still give me the result in which it is in the format hh: mm:?

    select
    evt_id, evt_start, evt_end,
    to_char( trunc(sysdate) + (evt_start - lag(evt_end) over (order by evt_id)),'HH24:MI:SS') idle_time
    from yourtable
    order by evt_id;
    
  • Subtracting Dates

    Hello

    I'm subtracting two dates for the number of days in the service:

    trunc(((86400*(SYSDATE-p.effective_start_date))/60)/60)/24) "none of the days of Service."

    I would do the same and to calculate the number of years more?

    Can anyone help with SQL?

    Thank you

    Hello

    For years, MONTHS_BETWEEN is simpler than the arithmetic mean of the dates

    MONTHS_BETWEEN (SYSDATE, p.effective_start_date)
            / 12        AS years_in_service
    

    Furthermore, simply subtracting one date from another gives you the number of days between them.

    SYSDATE - p.effective_start_date
    

    There is no need to convert this number of seconds and then back to days.

    SELECT     ename
    ,     hiredate
    ,     TRUNC (SYSDATE - hiredate)     AS days_in_service
    ,     TRUNC ( MONTHS_BETWEEN (SYSDATE, hiredate)
               / 12
               )                    AS years_in_service
    FROM     scott.emp;
    

    Released (October 1, 2010):

    ENAME      HIREDATE    DAYS_IN_SERVICE YEARS_IN_SERVICE
    ---------- ----------- --------------- ----------------
    SMITH      17-Dec-1980           10880               29
    ALLEN      20-Feb-1981           10815               29
    WARD       22-Feb-1981           10813               29
    JONES      02-Apr-1981           10774               29
    MARTIN     28-Sep-1981           10595               29
    BLAKE      01-May-1981           10745               29
    CLARK      09-Jun-1981           10706               29
    SCOTT      19-Apr-1987            8566               23
    KING       17-Nov-1981           10545               28
    TURNER     08-Sep-1981           10615               29
    ADAMS      23-May-1987            8532               23
    JAMES      03-Dec-1981           10529               28
    FORD       03-Dec-1981           10529               28
    MILLER     23-Jan-1982           10478               28
    
  • Subtracting two timestamps

    Hi all

    Thanks for looking

    I'm subtracting (systimestamp - "TIME_IN") as "HOURS_WORKED".
    (30/08/2010 16:42-30/08/2010 04:00) = "HOURS_WORKED".

    the column called hours, the columns hours 'worked' shows '000000000 12:42:58.9881'

    I understand that the hours are 12 hours and 42 minutes and 58 seconds.

    is it possible that I can format this column to just show me hours and minutes?

    of '000000000 12:42:58.9881' 12:42?

    is there an easier way?

    Thanks in advance

    Published by: jo3y2 on August 30, 2010 17:19

    Select double to_char(sysdate,'hh24:mi:ss')

    or

    SELECT TO_CHAR(date1,'MMDDYYYY:HH24:MI:SS') date1,
    To_char(date2,'MMDDYYYY:HH24:mi:SS') date2,
    trunc (86400 *(date2-date1))-60 * (trunc ((86400 *(date2-date1)) / 60)) seconds.
    trunc ((86400 *(date2-date1)) / 60)-60 * (trunc (((86400 *(date2-date1)) / 60) / 60)) minutes,.
    trunc (((86400 *(date2-date1)) / 60) / 60)-24 * (trunc (((86400 *(date2-date1)) / 60) / 60) / 24)) hours.
    trunc (((86400 *(date2-date1)) / 60) / 60) / 24) days.
    trunc (((86400 *(date2-date1)) / 60) / 60) / 24) / 7) weeks
    OF date_table

    See this post
    http://www.databasejournal.com/features/Oracle/article.php/2234501/A-comparison-of-oracles-date-and-timestamp-datatypes.htm

  • I get a null on the subtraction of 2 dates...

    I'm trying to subtract 2 dates
    by using the following query

    Select
    To_date (TO_CHAR (TRUNC(SYSDATE-1), ' mm/dd/yyyy') |) (' 07:35:33 ',' DD/MM/YYYY HH: MI: SS AM') + 10/1440
    -
    (TO_DATE (TO_CHAR (TRUNC(SYSDATE-1), ' mm/dd/yyyy') |)) ((' 08:35:33 ',' DD/MM/YYYY HH: MI: SS AM') + 10/1440)
    of the double


    but the result is null.
    Why?


    I want to get the subtraction of the 2. how to get it?

    I copied and pasted your code... not NULL values for me.

    select
    TO_DATE( TO_CHAR(TRUNC(SYSDATE-1),'mm/dd/yyyy')||' 07:35:33 AM','MM/DD/YYYY HH:MI:SS AM')+10/1440
    -
    (TO_DATE( TO_CHAR(TRUNC(SYSDATE-1),'mm/dd/yyyy')||' 08:35:33 AM', 'MM/DD/YYYY HH:MI:SS AM')+10/1440)
      5  from dual;
    
    TO_DATE(TO_CHAR(TRUNC(SYSDATE-1),'MM/DD/YYYY')||'07:35:33AM','MM/DD/YYYYHH:MI:SSAM')+10/1440-(TO_DATE(TO_CHAR(TRUNC(SYSDATE-1),'MM/DD/YYYY')||'08:35:33AM','MM/DD/YYYYHH:MI:SSAM')+10/1440)
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                                                                                                                                                                             -.0416666666666667
    
    1 row selected.
    
    Elapsed: 00:00:00.03
    TUBBY_TUBBZ?
    
    TUBBY_TUBBZ?select * from v$version;
    
    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE     11.2.0.1.0     Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    
    5 rows selected.
    
    Elapsed: 00:00:00.02
    TUBBY_TUBBZ?
    
  • Cannot add or subtract from the choice of backup discs

    I can't find how to add or subtract from the disks to use for storing upOne of my disks (3) is complete and I want to use new selecta. the preferences window is not resized

    IN aid, he said:
    «If you already set up Time Machine, your backup disks are listed, and information on each disc of the backup is displayed.» To select, add, or remove backup disks, click Select Disk or add or remove the backup disc. »

    I don't see this option in preferences:

    Simon,

    Scroll down in the window pane to display the add/remove disk backup option:

  • With the help of check box in number to add/subtract a value of 0.5

    Hello

    I use a formula that calculates working hours daily and then subtract a half hour for lunch if a check box is selected. The formula applies with the exception of the time 0.5 being added or subtracted. Any ideas? The box strives to subtract the Boolean value (0 or 1), I just need this value to be represented as 0.5 If you get my drift...

    Thanks in advance!

    Tender Hello,

    Formula in D2 (fill down)

    = B2−a2−if(C2,"0.5H","0h")

    Kind regards

    Ian.

  • Hi, I recently bought numbers in order to create a commercial newspaper. I'm the pen and paper. I need help to create a formula. A purchase column determines if the entry price column is subtracted from the price of output column or output subtracted

    Hi, I recently bought numbers in order to create a commercial newspaper. I'm the pen and paper. I need help to create a formula. A purchase column; Determines if the entry price column is subtracted from the price of output column (buy) or subtracted from (Sell) entry exit. Thank you for your help

    Hi B',.

    Buying and selling in column B

    Price of entry in column c.

    Exit in column D price

    Formula (and outcome) in column E

    If the column will B always contained 'Buy' or 'Sell', it works. It is default to a calculation of 'sell' if sale or has been specified.

    E2: = IF (B = "Buy", D - C, C - D)

    If you want to delay the calculation until the amounts entered in C and D, use this version:

    E2: = IF (OR (LEN (C) < 1, LEN (D) < 1,"", IF (B = "Buy", D - C, C - D) ")

    If you want to delay the calculation until all three ducks are on a line (B contains buy or sell, C and D contain both data), use this version:

    E2: = IF (OR (LEN (C) < 1, LEN (D) < 1,"", IF (B = "Buy", D - C, IF(B="Sell",C-D,) "" ")))

    Third version used in this table.

    Kind regards

    Barry

  • The computer crashes: something to do with the minidump and sysdata.xml?

    My computer broke down twice now and restart an error message pops up saying "your computer has recovered from a serious error". It is said that two files in the error report will be sent to microsoft. the first complete mini103106 - 01.dmp and the second sysdata.xml

    I could find these files and delete them but have no idea if this would solve the problem and do not want to do the wrong thing...

    Hello

    Not easy to say why this is happening, but for me it s definitely something wrong with the software.
    Well, in this case we can only speculate. You know, it s Microsoft Windows and sometimes things happens without any reason :(

    I have heard from probably the system restore function could be corrupted and no have deleted the folder with the minidump and disabled the system restore feature in the control panel-> system.

    But in my opinion, the system restore function is important and necessary if you want to restore the operating system to the beginning.
    That's why I put t recommend disabling this feature.

  • Why numbers cannot subtract correctly?

    I put together a spreadsheet earlier with a very simple formula and I got a very unexpected result. I tried the same calculation in many ways on several computers and short to force the precision (in the formatting of the cell resulting as currency or by setting turn instead of hundredths), I have the unexpected answer. The formula is simply '= 5.52 to 5.49' which for some reason in the response results "0.0299999999999994". "» Initially I was referencing more than one cell, but I boiled in as simple an equation as possible for discussion. Please do not hesitate to try and let me know if your results vary.

    Hi TheTubbyOne,

    Welcome to the communities of Apple Support!

    Welcome also to the way computers operate floating arithmetic. This isn't a bug in numbers, just a fact of life. This is how computers convert 'human' (decimal characters) to binary and back to decimal.

    A screenshot of a decimal subtraction and subtraction of integers:

    Use the ROUND in the final formula function (don't keep 'rounding' at each stage). Let the numbers to deal with arithmetic in the Middle rounds.

    Compare that to the subtraction of whole number in row 3.

    Tested in numbers 3 and with a pencil and paper.

    Kind regards

    Ian.

Maybe you are looking for

  • Should I upgrade my MacBook Pro 17 "2011 at El Capitan?

    Unfortunately, I was one of those who have upgraded to Yosemite when it came out. It affected my logic board and is part of this recall, apple does a year since last February. All has been well. I was wondering if there was some known issues with one

  • transfer files to another user of the account of the same computer__

    How can I transfer files / folders from another user, but the same computer account.

  • BlackBerry Smartphones Bring inbox to display on the Bold 9900

    Hello My BB bold 9900 is showing all emails at the office, to access the Inbox I have to go to the display folder and select the Inbox. I wonder if I can create a shortcut to the Inbox on my bb desktop? Thank you Bezi

  • Windows updates will not download/install

    I have an Asus laptop that is about 2 years old.  I am running Windows 8 on a 64 bit system.  The laptop only periodically adjusts and downloads from previous update failed.  Now, when I start it tells me that there are 115 updates to download.  Afte

  • JS watch a refresh of the apex

    Apex Version 4.2.6I'm adding some dynamic classes and removing some DOMs with JS on my report.HPbear when I use the pagination, it refreshes my DOM at this point, I need to raise my initial JS once more to do its magic, but I am struggling to find th