Skip to content

Tag: postgresql

Migrate data from SQL Server to PostgreSQL

I have a stored procedure function as well as table in the SQL Server enterprise 2014. I also have data in the table. Now I need same table and data in PostgreSql(pgAdmin4). Can anyone suggest to me the idea to migrate data to POSTGRESQL or any idea on creating the SQL script so that I can use psql to run

Extract values from JSON with nesting

I have a problem with taking all values under the “id_ref_directory” keys. I have a temp table: CREATE LOCAL TEMP TABLE parsed_json( var_key text, var_value text NOT NULL) ON COMMIT DROP; …

How extract jsonb column in fields by key

I’m using postgresql and postgis plugin. I have stored data with this scheme: table_id is primary key, properties is a jsonb and geom as geometry(GeometryZ,4326); If I make this request: select table_id, properties, geom from nametable return all info with table_id as integer, properties as jsonb and ge…

SQL for 2 tables

I have these 2 tables: Table A Country State —————– US OH US FL US WA Table B State LastVisitDate City ———————————- OH …

Trying to update column on postgresql

I am trying to update my table from another tmp table called fake_email but when I ran the following: update users SET email = fake_email2.email FROM fake_email2 where users.id = fake_email2.id I …