{"id":62,"date":"2018-07-21T18:00:28","date_gmt":"2018-07-21T18:00:28","guid":{"rendered":"https:\/\/datablog.roman-halliday.com\/?p=62"},"modified":"2024-10-08T08:28:25","modified_gmt":"2024-10-08T08:28:25","slug":"dates-in-oracle-ranges-manipulation-loops","status":"publish","type":"post","link":"https:\/\/datablog.roman-halliday.com\/index.php\/2018\/07\/21\/dates-in-oracle-ranges-manipulation-loops\/","title":{"rendered":"Dates In Oracle: Ranges, Manipulation &#038; Loops"},"content":{"rendered":"<p>Having spent a lot of time looking at dates in SQL Server, I thought I&#8217;d take some time to publish some notes on dates in Oracle. Most of the ideas are the same, but there are some subtleties.<\/p>\n<p>After my SQL Server articles:<\/p>\n<ul>\n<li><a href=\"https:\/\/datablog.roman-halliday.com\/index.php\/2018\/05\/01\/dates-in-sql-server-managing-manipulating-dates\/\">Dates In SQL Server: Managing &amp; Manipulating Dates<\/a><\/li>\n<li><a href=\"https:\/\/datablog.roman-halliday.com\/index.php\/2018\/06\/01\/dates-in-sql-server-create-sample-date-ranges\/\">Dates In SQL Server: Create Sample Date Ranges<\/a><\/li>\n<li><a href=\"https:\/\/datablog.roman-halliday.com\/index.php\/2018\/06\/09\/dates-in-sql-server-iteration-of-date-ranges\/\">Dates In SQL Server: Iteration of Date Ranges<\/a><\/li>\n<\/ul>\n<h1>Creating date ranges<\/h1>\n<p>As with SQL Server, a quick way to create dates is to use a large table, or virtual table and do a calculation from the rows, it&#8217;s worth reading about <a href=\"http:\/\/www.orafaq.com\/wiki\/Oracle_Row_Generator_Techniques\">Oracle Row Generator Techniques<\/a>. However, the most common and simple methods use one of:<\/p>\n<ol>\n<li>A number sequence.<\/li>\n<li>CONNECT BY and dual.<\/li>\n<\/ol>\n<p>I&#8217;ve already covered using a number sequence in detail (see <a href=\"https:\/\/datablog.roman-halliday.com\/index.php\/2018\/06\/09\/dates-in-sql-server-iteration-of-date-ranges\/\">Dates In SQL Server: Iteration of Date Ranges<\/a>), so I&#8217;ll just link to the example:\u00a0<a href=\"http:\/\/rextester.com\/SMF10985\">Create Date list &#8211; Oracle<\/a><\/p>\n<p>The other method, using dual and CONNECT BY creates a virtual dataset with a variable number of rows.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\">WITH date_list AS (\r\nSELECT TRUNC(SYSDATE) - rownum date_val -- Calculation of start date and variance\r\n  FROM dual\r\n    CONNECT BY LEVEL &lt;= 366             -- How many rows to create in the dataset\r\n)\r\nSELECT date_val\r\n  FROM date_list\r\n WHERE date_val BETWEEN SYSDATE - 100   -- Put our required date range here\r\n                    AND SYSDATE         -- Put our required date range here\r\n ORDER BY date_val\r\n;<\/pre>\n<h1>Formatting dates<\/h1>\n<p>Some things I wish were in SQL Server which are in oracle:<\/p>\n<ul>\n<li><code>TO_DATE()<\/code><\/li>\n<li><code>TO_CHAR()<\/code><\/li>\n<li><code>TRUNC()<\/code><\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\">SELECT SYSDATE,\r\n       TO_CHAR(SYSDATE, 'yyyy-mm-dd')      AS sysdate_format_1, -- ISO short format\r\n       TO_CHAR(SYSDATE, 'mon-dd-yy')       AS sysdate_format_2, -- Crazy format not in SQL Server\r\n       TO_DATE('2018-03-17', 'yyyy-mm-dd') AS to_date_format_1, -- ISO short format\r\n       TO_DATE('jan-17-18',  'mon-dd-yy')  AS to_date_format_2, -- Crazy format not in SQL Server\r\n     --Round to start of day, month or year:\r\n       TRUNC(SYSDATE)                      AS sysdate_day,\r\n       TRUNC(SYSDATE, 'MM')                AS sysdate_month,\r\n       TRUNC(SYSDATE, 'YY')                AS sysdate_year\r\n FROM dual\r\n;<\/pre>\n<h1>Looping over dates<\/h1>\n<h2>Date Incrementing<\/h2>\n<p>This is the basic method of iterating from a start date to an end date, without having to create a dataset. This is quick and easy to do, and the code is easy to read. I use these techniques for ad-hoc processing.<\/p>\n<p>These templates allow you to copy\/paste them. Change the dates at the top, and the contents between &#8220;Start Work&#8221; and &#8220;End Work&#8221;.<\/p>\n<h3>V1 WHILE Loop<\/h3>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\">SET SERVEROUTPUT ON;\r\n\r\n--------------------------------------------------------------------------------\r\n-- Loop\r\n--------------------------------------------------------------------------------\r\nDECLARE\r\n  start_date  DATE := TO_DATE('2015-12-08', 'yyyy-mm-dd');\r\n  end_date    DATE := TO_DATE('2016-01-01', 'yyyy-mm-dd') - 1;\r\n  active_date DATE;\r\nBEGIN\r\n  dbms_output.put_line('Date Start: ' || TO_CHAR(start_date, 'YYYY-MM-DD'));\r\n  dbms_output.put_line('  Date End: ' || TO_CHAR(end_date,   'YYYY-MM-DD'));\r\n  \r\n  ------------------------------------------------------------------------------\r\n  -- Check Date Range\r\n  ------------------------------------------------------------------------------\r\n  IF start_date &gt; end_date THEN\r\n  BEGIN\r\n    RAISE_APPLICATION_ERROR(-20999, 'Invalid Date Range: start_date AFTER end_date');\r\n  END;\r\n  END IF;\r\n  \r\n  ------------------------------------------------------------------------------\r\n  -- Loop Days \r\n  ------------------------------------------------------------------------------\r\n  active_date := start_date;\r\n  WHILE active_date &lt;= end_date\r\n  LOOP\r\n    dbms_output.put_line('Date Is: ' || TO_CHAR(active_date, 'YYYY-MM-DD'));\r\n    ----------------------------------------------------------------------------\r\n    -- Start Work\r\n    ----------------------------------------------------------------------------\r\n    \r\n    \/*\r\n    schema_name.proc_name(active_date);\r\n    *\/\r\n    \r\n    ----------------------------------------------------------------------------\r\n    -- End Work \/ Increment Date\r\n    ----------------------------------------------------------------------------\r\n    active_date := TRUNC(active_date) + 1;\r\n  END LOOP;\r\nEND;<\/pre>\n<p>See example in action: <a href=\"http:\/\/rextester.com\/VJOLH32315\">Oracle &#8211; Date Loop Sample (incrementing V1)<\/a><\/p>\n<h3>V2 FOR Loop<\/h3>\n<p>This takes advantage of converting the date to a straight number using\u00a0<strong>Julian day <\/strong>(the number of days since January 1, 4712 BC). It has the advantage of not having to worry about incrementing the date.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\">SET SERVEROUTPUT ON;\r\n\r\n--------------------------------------------------------------------------------\r\n-- Loop\r\n--------------------------------------------------------------------------------\r\nDECLARE\r\n  start_date  DATE := TO_DATE('2015-12-08', 'yyyy-mm-dd');\r\n  end_date    DATE := TO_DATE('2016-01-01', 'yyyy-mm-dd') - 1;\r\n  active_date DATE;\r\n  \r\n  start_number NUMBER;\r\n  end_number   NUMBER;\r\nBEGIN\r\n  dbms_output.put_line('Date Start: ' || TO_CHAR(start_date, 'YYYY-MM-DD'));\r\n  dbms_output.put_line('  Date End: ' || TO_CHAR(end_date,   'YYYY-MM-DD'));\r\n  \r\n  ------------------------------------------------------------------------------\r\n  -- Check Date Range\r\n  ------------------------------------------------------------------------------\r\n  IF start_date &gt; end_date THEN\r\n  BEGIN\r\n    RAISE_APPLICATION_ERROR(-20999, 'Invalid Date Range: start_date AFTER end_date');\r\n  END;\r\n  END IF;\r\n  \r\n  ------------------------------------------------------------------------------\r\n  -- Loop Days \r\n  ------------------------------------------------------------------------------\r\n  start_number := TO_NUMBER(TO_CHAR(start_date, 'j'));\r\n  end_number   := TO_NUMBER(TO_CHAR(end_date,   'j'));\r\n  \r\n  FOR cur_r IN start_number..end_number\r\n  LOOP\r\n  --dbms_output.put_line('Cur Is: ' || TO_CHAR(cur_r));\r\n    active_date := TO_DATE(cur_r, 'j');\r\n    \r\n    dbms_output.put_line('Date Is: ' || TO_CHAR(active_date, 'YYYY-MM-DD'));\r\n    ----------------------------------------------------------------------------\r\n    -- Start Work\r\n    ----------------------------------------------------------------------------\r\n    \r\n    \/*\r\n    schema_name.proc_name(active_date);\r\n    *\/\r\n    \r\n    ----------------------------------------------------------------------------\r\n    -- End Work\r\n    ----------------------------------------------------------------------------\r\n  END LOOP;\r\nEND;<\/pre>\n<p>See example in action:\u00a0<a href=\"http:\/\/rextester.com\/DDZD17160\">Oracle &#8211; Date Loop Sample (incrementing V2)<\/a><\/p>\n<h2>Cursor<\/h2>\n<p>The more oracle pure way of iterating dates is using a cursor, for straight date ranges this will have little advantage over the iteration techniques. This method comes into its own if the dates require some logic (skipping weekends, dates already in another list).<\/p>\n<p>This method is also easy to apply for iterating over any data set of any datatype (a collection of VARCHAR2 values can&#8217;t be incremented).<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\">-- On by default at http:\/\/rextester.com\/\r\n--SET SERVEROUTPUT ON;\r\n\r\n--------------------------------------------------------------------------------\r\n-- Loop\r\n--------------------------------------------------------------------------------\r\nDECLARE\r\n  active_date DATE;\r\n  \r\n  CURSOR date_cursor1\r\n  IS\r\n  WITH date_list AS (\r\n  SELECT TRUNC(SYSDATE) - rownum date_val -- Calculation of start date and variance\r\n    FROM dual\r\n      CONNECT BY LEVEL &lt;= 1000            -- How many rows to create in the dataset\r\n  )\r\n  SELECT date_val\r\n    FROM date_list\r\n   WHERE date_val BETWEEN TO_DATE('2015-12-08', 'yyyy-mm-dd')     -- Put our required date range here\r\n                      AND TO_DATE('2016-01-01', 'yyyy-mm-dd') - 1 -- Put our required date range here\r\n   ORDER BY date_val\r\n  ;\r\n\r\nBEGIN\r\n  ------------------------------------------------------------------------------\r\n  -- Loop Days \r\n  ------------------------------------------------------------------------------\r\n  OPEN date_cursor1;\r\n  LOOP\r\n    FETCH date_cursor1 INTO active_date;\r\n    EXIT WHEN date_cursor1%NOTFOUND;\r\n    \r\n    dbms_output.put_line('Date Is: ' || TO_CHAR(active_date,   'YYYY-MM-DD'));\r\n    ----------------------------------------------------------------------------\r\n    -- Do Work\r\n    ----------------------------------------------------------------------------\r\n    \r\n    \/*\r\n    schema_name.proc_name(active_date);\r\n    *\/\r\n    \r\n    ----------------------------------------------------------------------------\r\n    -- End Work\r\n    ----------------------------------------------------------------------------\r\n  END LOOP;\r\n  CLOSE date_cursor1;\r\nEND;<\/pre>\n<p>See example in action: <a href=\"http:\/\/rextester.com\/SUCD49061\">Oracle &#8211; Date Loop Sample (cursor)<\/a><\/p>\n<p><strong>Note:<\/strong> For some processes, one can use a SYS_REFCURSOR as part of the loop. This allows one function to return the cursor values so they don&#8217;t have to be available at runtime of the procedure which eventually calls\/iterates the cursor.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Having spent a lot of time looking at dates in SQL Server, I thought I&#8217;d take some time to publish some notes on dates in Oracle. Most of the ideas are the same, but there are some subtleties. After my SQL Server articles: Dates In SQL Server: Managing &amp; Manipulating Dates Dates In SQL Server:&hellip;<\/p>\n<p class=\"read-more\"><a class=\"readmore-btn\" href=\"https:\/\/datablog.roman-halliday.com\/index.php\/2018\/07\/21\/dates-in-oracle-ranges-manipulation-loops\/\">Read More<span class=\"screen-reader-text\">  Read More<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,6],"tags":[12],"class_list":["post-62","post","type-post","status-publish","format-standard","hentry","category-databases","category-oracle","tag-date"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Dates In Oracle: Ranges, Manipulation &amp; Loops - Rows Across The Lake<\/title>\n<meta name=\"description\" content=\"Having spent a lot of time looking at dates in SQL Server, I thought I&#039;d take some time to publish some notes on dates in Oracle.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/datablog.roman-halliday.com\/index.php\/2018\/07\/21\/dates-in-oracle-ranges-manipulation-loops\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Dates In Oracle: Ranges, Manipulation &amp; Loops - Rows Across The Lake\" \/>\n<meta property=\"og:description\" content=\"Having spent a lot of time looking at dates in SQL Server, I thought I&#039;d take some time to publish some notes on dates in Oracle.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/datablog.roman-halliday.com\/index.php\/2018\/07\/21\/dates-in-oracle-ranges-manipulation-loops\/\" \/>\n<meta property=\"og:site_name\" content=\"Rows Across The Lake\" \/>\n<meta property=\"article:published_time\" content=\"2018-07-21T18:00:28+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-10-08T08:28:25+00:00\" \/>\n<meta name=\"author\" content=\"david\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@d_roman_h\" \/>\n<meta name=\"twitter:site\" content=\"@d_roman_h\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"david\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/datablog.roman-halliday.com\\\/index.php\\\/2018\\\/07\\\/21\\\/dates-in-oracle-ranges-manipulation-loops\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/datablog.roman-halliday.com\\\/index.php\\\/2018\\\/07\\\/21\\\/dates-in-oracle-ranges-manipulation-loops\\\/\"},\"author\":{\"name\":\"david\",\"@id\":\"https:\\\/\\\/datablog.roman-halliday.com\\\/#\\\/schema\\\/person\\\/575f96d2590c3085923ff9e1b565748b\"},\"headline\":\"Dates In Oracle: Ranges, Manipulation &#038; Loops\",\"datePublished\":\"2018-07-21T18:00:28+00:00\",\"dateModified\":\"2024-10-08T08:28:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/datablog.roman-halliday.com\\\/index.php\\\/2018\\\/07\\\/21\\\/dates-in-oracle-ranges-manipulation-loops\\\/\"},\"wordCount\":450,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/datablog.roman-halliday.com\\\/#\\\/schema\\\/person\\\/575f96d2590c3085923ff9e1b565748b\"},\"keywords\":[\"date\"],\"articleSection\":[\"Databases\",\"Oracle\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/datablog.roman-halliday.com\\\/index.php\\\/2018\\\/07\\\/21\\\/dates-in-oracle-ranges-manipulation-loops\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/datablog.roman-halliday.com\\\/index.php\\\/2018\\\/07\\\/21\\\/dates-in-oracle-ranges-manipulation-loops\\\/\",\"url\":\"https:\\\/\\\/datablog.roman-halliday.com\\\/index.php\\\/2018\\\/07\\\/21\\\/dates-in-oracle-ranges-manipulation-loops\\\/\",\"name\":\"Dates In Oracle: Ranges, Manipulation & Loops - Rows Across The Lake\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/datablog.roman-halliday.com\\\/#website\"},\"datePublished\":\"2018-07-21T18:00:28+00:00\",\"dateModified\":\"2024-10-08T08:28:25+00:00\",\"description\":\"Having spent a lot of time looking at dates in SQL Server, I thought I'd take some time to publish some notes on dates in Oracle.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/datablog.roman-halliday.com\\\/index.php\\\/2018\\\/07\\\/21\\\/dates-in-oracle-ranges-manipulation-loops\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/datablog.roman-halliday.com\\\/index.php\\\/2018\\\/07\\\/21\\\/dates-in-oracle-ranges-manipulation-loops\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/datablog.roman-halliday.com\\\/index.php\\\/2018\\\/07\\\/21\\\/dates-in-oracle-ranges-manipulation-loops\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/datablog.roman-halliday.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Dates In Oracle: Ranges, Manipulation &#038; Loops\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/datablog.roman-halliday.com\\\/#website\",\"url\":\"https:\\\/\\\/datablog.roman-halliday.com\\\/\",\"name\":\"Rows Across The Lake\",\"description\":\"Data &amp; Databases\",\"publisher\":{\"@id\":\"https:\\\/\\\/datablog.roman-halliday.com\\\/#\\\/schema\\\/person\\\/575f96d2590c3085923ff9e1b565748b\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/datablog.roman-halliday.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/datablog.roman-halliday.com\\\/#\\\/schema\\\/person\\\/575f96d2590c3085923ff9e1b565748b\",\"name\":\"david\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/acddbc676a1d5c73795edcf0627ee39e5aa947da9033b58373e03d93122cb3b7?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/acddbc676a1d5c73795edcf0627ee39e5aa947da9033b58373e03d93122cb3b7?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/acddbc676a1d5c73795edcf0627ee39e5aa947da9033b58373e03d93122cb3b7?s=96&d=mm&r=g\",\"caption\":\"david\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/acddbc676a1d5c73795edcf0627ee39e5aa947da9033b58373e03d93122cb3b7?s=96&d=mm&r=g\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Dates In Oracle: Ranges, Manipulation & Loops - Rows Across The Lake","description":"Having spent a lot of time looking at dates in SQL Server, I thought I'd take some time to publish some notes on dates in Oracle.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/datablog.roman-halliday.com\/index.php\/2018\/07\/21\/dates-in-oracle-ranges-manipulation-loops\/","og_locale":"en_GB","og_type":"article","og_title":"Dates In Oracle: Ranges, Manipulation & Loops - Rows Across The Lake","og_description":"Having spent a lot of time looking at dates in SQL Server, I thought I'd take some time to publish some notes on dates in Oracle.","og_url":"https:\/\/datablog.roman-halliday.com\/index.php\/2018\/07\/21\/dates-in-oracle-ranges-manipulation-loops\/","og_site_name":"Rows Across The Lake","article_published_time":"2018-07-21T18:00:28+00:00","article_modified_time":"2024-10-08T08:28:25+00:00","author":"david","twitter_card":"summary_large_image","twitter_creator":"@d_roman_h","twitter_site":"@d_roman_h","twitter_misc":{"Written by":"david","Estimated reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/datablog.roman-halliday.com\/index.php\/2018\/07\/21\/dates-in-oracle-ranges-manipulation-loops\/#article","isPartOf":{"@id":"https:\/\/datablog.roman-halliday.com\/index.php\/2018\/07\/21\/dates-in-oracle-ranges-manipulation-loops\/"},"author":{"name":"david","@id":"https:\/\/datablog.roman-halliday.com\/#\/schema\/person\/575f96d2590c3085923ff9e1b565748b"},"headline":"Dates In Oracle: Ranges, Manipulation &#038; Loops","datePublished":"2018-07-21T18:00:28+00:00","dateModified":"2024-10-08T08:28:25+00:00","mainEntityOfPage":{"@id":"https:\/\/datablog.roman-halliday.com\/index.php\/2018\/07\/21\/dates-in-oracle-ranges-manipulation-loops\/"},"wordCount":450,"commentCount":0,"publisher":{"@id":"https:\/\/datablog.roman-halliday.com\/#\/schema\/person\/575f96d2590c3085923ff9e1b565748b"},"keywords":["date"],"articleSection":["Databases","Oracle"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/datablog.roman-halliday.com\/index.php\/2018\/07\/21\/dates-in-oracle-ranges-manipulation-loops\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/datablog.roman-halliday.com\/index.php\/2018\/07\/21\/dates-in-oracle-ranges-manipulation-loops\/","url":"https:\/\/datablog.roman-halliday.com\/index.php\/2018\/07\/21\/dates-in-oracle-ranges-manipulation-loops\/","name":"Dates In Oracle: Ranges, Manipulation & Loops - Rows Across The Lake","isPartOf":{"@id":"https:\/\/datablog.roman-halliday.com\/#website"},"datePublished":"2018-07-21T18:00:28+00:00","dateModified":"2024-10-08T08:28:25+00:00","description":"Having spent a lot of time looking at dates in SQL Server, I thought I'd take some time to publish some notes on dates in Oracle.","breadcrumb":{"@id":"https:\/\/datablog.roman-halliday.com\/index.php\/2018\/07\/21\/dates-in-oracle-ranges-manipulation-loops\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/datablog.roman-halliday.com\/index.php\/2018\/07\/21\/dates-in-oracle-ranges-manipulation-loops\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/datablog.roman-halliday.com\/index.php\/2018\/07\/21\/dates-in-oracle-ranges-manipulation-loops\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/datablog.roman-halliday.com\/"},{"@type":"ListItem","position":2,"name":"Dates In Oracle: Ranges, Manipulation &#038; Loops"}]},{"@type":"WebSite","@id":"https:\/\/datablog.roman-halliday.com\/#website","url":"https:\/\/datablog.roman-halliday.com\/","name":"Rows Across The Lake","description":"Data &amp; Databases","publisher":{"@id":"https:\/\/datablog.roman-halliday.com\/#\/schema\/person\/575f96d2590c3085923ff9e1b565748b"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/datablog.roman-halliday.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":["Person","Organization"],"@id":"https:\/\/datablog.roman-halliday.com\/#\/schema\/person\/575f96d2590c3085923ff9e1b565748b","name":"david","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/acddbc676a1d5c73795edcf0627ee39e5aa947da9033b58373e03d93122cb3b7?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/acddbc676a1d5c73795edcf0627ee39e5aa947da9033b58373e03d93122cb3b7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/acddbc676a1d5c73795edcf0627ee39e5aa947da9033b58373e03d93122cb3b7?s=96&d=mm&r=g","caption":"david"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/acddbc676a1d5c73795edcf0627ee39e5aa947da9033b58373e03d93122cb3b7?s=96&d=mm&r=g"}}]}},"_links":{"self":[{"href":"https:\/\/datablog.roman-halliday.com\/index.php\/wp-json\/wp\/v2\/posts\/62","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/datablog.roman-halliday.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/datablog.roman-halliday.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/datablog.roman-halliday.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/datablog.roman-halliday.com\/index.php\/wp-json\/wp\/v2\/comments?post=62"}],"version-history":[{"count":10,"href":"https:\/\/datablog.roman-halliday.com\/index.php\/wp-json\/wp\/v2\/posts\/62\/revisions"}],"predecessor-version":[{"id":162,"href":"https:\/\/datablog.roman-halliday.com\/index.php\/wp-json\/wp\/v2\/posts\/62\/revisions\/162"}],"wp:attachment":[{"href":"https:\/\/datablog.roman-halliday.com\/index.php\/wp-json\/wp\/v2\/media?parent=62"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/datablog.roman-halliday.com\/index.php\/wp-json\/wp\/v2\/categories?post=62"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/datablog.roman-halliday.com\/index.php\/wp-json\/wp\/v2\/tags?post=62"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}