skip to Main Content

Inner Join Help on PostgreSQL

I have the following database relationship and query for PostgreSQL below: create table gender( gender_id int primary key, gender char(10)) create table student( student_id int primary key, first_name char(50) not null, last_name char(50) not null, gender_id int not null, constraint…

VIEW QUESTION

SQL Server: Transform arrays of JSON objects into table format

Following is the given JSON data: DECLARE @Jdata NVARCHAR(MAX) = '{ "EmployeeDetails": { "BusinessEntityID": 3, "NationalIDNumber": 509647174, "JobTitle": "Engineering Manager", "BirthDate": "1974-11-12", "MaritalStatus": "M", "Gender": "M", "StoreDetail": { "Store": [ { "AnnualSales": 800000, "AnnualRevenue": 80000, "BankName": "Guardian Bank", "BusinessType": "BM",…

VIEW QUESTION

Postgresql – Postgres `anyelement` function variable gives error: could not determine polymorphic type because input has type unknown

I have the following function which I want to pass anyelement and it should return whether it is a valid URL by matching the regex: CREATE OR REPLACE FUNCTION isURL(data anyelement) RETURNS BOOLEAN AS $$ BEGIN RETURN data::text ~ '^https?://[-a-zA-Z0-9@:%._+~#=]{2,255}.[a-z]{2,6}(/[-a-zA-Z0-9@:%._+~#=]*)*(?[-a-zA-Z0-9@:%_+.~#()?&//=]*)?$';…

VIEW QUESTION
Back To Top
Search