Strings from date values with the TO_CHAR() function in PostgreSQL.

Oftentimes, you may need to convert a date value or one of its parts to a string representation. Be it reporting, visualization for ad-hoc querying, or a myriad of other things; this functionality is handy at the least. Among other numeric types, the to_char function accepts date/time values with an additional parameter of the desired string character value from said type. Let’s learn together with some simple examples below…

[Head this way for great PostgresSQL blogging >>>]
Advertisements

LAG() Window Function – with examples in PostgreSQL.

Having recently covered the LEAD() Window Function here on Digital Owl’s Prose, it only makes sense to follow-up with a post on its counterpart: LAG(). By all means, don’t lag behind. Read on and learn something with me…

[Head this way for great PostgresSQL blogging >>>]

LEAD() Window Function – with examples in PostgreSQL

Having been forewarned in several of my previous blog posts that I am on a SQL Window Function kick, it should be no surprise that here I am again; sharing what I am studying and learning. I continue to find these powerful constructs highly interesting, to say the least. In this post, I visit the LEAD() Window Function with examples in PostgreSQL. Read on and let’s learn something together…

[Head this way for great PostgresSQL blogging >>>]

Window Function windowing options – with examples in PostgreSQL

More window functions here on the blog? What can I say? The deeper I get into them, the more I realize their power. Yet, I have not covered any of the Windowing options available in the OVER() clause so far and that ends with this post. I will share what I have learned, and what I am still learning. Join me and we can learn together…

[Head this way for great PostgresSQL blogging >>>]

Date and Time calculations using INTERVAL – with examples in PostgreSQL.

Saying time is important is to state the obvious. Our lives are built on time. We only have so much of it and once it is gone, there is no getting it back. While not as important as that time, date and time data values are integral pieces in most –if not all– database infrastructure and design. At some point or another, date and time values must be considered. PostgreSQL has many functions and options for date and time value manipulation. In this post, I look at the INTERVAL type for date and time calculations….

[Head this way for great PostgresSQL blogging >>>]