Skip to content

Tag: sql

Work Around for PL/SQL to do column validation

I need to create a procedure to validate number of digits between 2 columns. I have some reason that this handling won’t do in Java so it needs to be a stored procedure. It first will get the template(result_format) from one of my table and itself contain data like then the argument P_RESULT will have i…

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 …