set-returning-functions Questions

2

Solved

I have a table which stores account changes over time. I need to join that up with two other tables to create some records for a particular day, if those records don't already exist. To make thing...
Higgins asked 19/8, 2014 at 20:24

1

Solved

I'm new to Postgres and have a database with multiple tables of the same structure. I need to select data from each table that matches certain criteria. I could do this with a bunch of UNION queri...

2

Solved

I understand that using SELECT unnest(ARRAY[5,3,9]) as id without an ORDER BY clause, the order of the result set is not guaranteed. I could for example get: id -- 3 5 9 But what about the fo...

1

Solved

I was implementing a Query system. I implemented unnest function. Now user was asking about using multiple unnest in a single select statement. I was using PostgreSQL as kind of guideline since mos...
Sollars asked 11/4, 2014 at 4:37

1

Solved

I'm trying to obtain a list of dates within range, similar to the command NOW() in PostgreSQL, with the only difference that now(), returns only the current date. If I execute it as follows I obta...
Conwell asked 27/9, 2013 at 20:35

1

Solved

I stumbled upon very odd behavior with unnest(), when casting after expanding an array. Introduction There are three basic syntax variants to use unnest(): 1) SELECT unnest('{1,NULL,4}'::int[]) ...

2

Solved

I have 2 tables - course that contains id and name of the courses and tagCourse that contains tags for each course. course tagcourse ------------ ---------------- PK id_course PK tag name PK, FK ...
Geomorphic asked 27/3, 2013 at 16:40

1

Solved

Problem This code: select x::text from regexp_matches( 'i1 into o2, and g1 into o17', '[gio][0-9]{1,}', 'g' ) as x; Returns these results: {i1} {o2} {g1} {o17} Rather than the following re...
Seriocomic asked 15/5, 2012 at 2:17

© 2022 - 2024 — McMap. All rights reserved.