Skip to content

Handle pg_error on generated columns

I have a table that consists of some PostGIS related data. These data are generated automatically on INSERT or UPDATE. Sometimes the data provided on the polygon column might not fit the generation function and cause an error. I wanted to handle this error and set a default value when it fail. — Last re…

MySQL self join but in the same row

I have this table: date sku note 11/12 123 note 11/13 123 note 11/12 456 note 11/13 456 note 11/12 789 note 11/13 789 note (Note is random) And I want the result to return this: date sku note sku note sku note 11/12 123 note 456 note 789 note 11/13 123 note 456 note 789 note I tried self

MySQL substring to self join

I’m defining the relationship between the two tables using a join table. I want to arrange them in the order of many overlapping things. Currently, we are using subquery, is there a way to get the …

postgresql combine 2 select from 2 different tables

Hello i need to run a query with 2 select statements, one with an avg calculation and grouped by name and the other select, looking for that name in other table, and get some columns and do a JOIN to merge both and only left one column “name” on it. The first table its this: The second table its l…