I get the error: 'duplicate key value violates unique constraint' even when checking if the primary key is already in the table in which I want to insert. I ha
I am new to PostgreSQL and am struggling with the creation of a procedure to save the data in a new table. This is how the empty table is created CREATE TABLE e
Posting here in case it helps someone. TLDR: ${database.defaultSchemaName} within sqlCheck to access default schema name I wanted my database changeset to firs
I'm running below code and getting below results but I want to remove ,, and after ,, texts from email address and that email address should show in UPPER(PT_PA
I have a PostgreSQL table where there is column which has array of strings. The row have some unique array strings or some have duplicate strings also. I want t
So I do have following SQL select SELECT FOO.*, ROW_NUMBER() OVER (ORDER BY KEY ASC) AS ROW_NUMBER FROM FOO Key is of the type VARCHAR(12). I wonder why the h
I'm working on a project that uses voice assistant to query information stored in my sql database but I keep getting this error. The voice assistant is able to
I have table which has productId and productVariantId columns. |id |userId|productId|productVariantId| ---------------------------------------- |1 |1
First time posting here, normally I am able to find an answer to my questions by searching but not this time... I have a table T1 with 2 sets of coordinates (st
I am querying metadata on Snowflake which contains a column of queries: select query_name from metadata query_name SELECT * FROM SYSIBM.SQLCOLUMNS SELECT * FR
This is just a dummy example. In reality I have a foreign key which references a lot of more columns. That why I'm trying replace the normal join with a "natura
Getting the following output when i use the below query SELECT P.RefNum ,Ian.ID ,Ian.Date ,Igl.Name ,Ian.Comments ,ROW_NUMBER() OVER (
Question: Is there a postgres query to add a new column to an existing table and to automatically populate that column for all rows of the table with a certain
I got this message when I try to run query on XAMPP in macOS #1558 - Column count of mysql.proc is wrong. Expected 21, found 20. Created with MariaDB 100108, n
I had a SQL SELECT dtl.ACCT_YM AS ACCT_YM, src.SRC_NAME AS SRC_NAME, ptnr.PTNR_NAME AS PTNR_NAME, info.P
I want to create UserRole table, but mariaDB complains with the following error: Error Code: 1005. Can't create table `testdb`.`userrole` (errno: 150 "Foreign k
I have a database that will count daily total amount of customer that does or doesn't have a transactions. Customer Column is a varchar data type Here is how
I'm using DB2 to develop an app, I have the tables products, price and cost, these tables store products data at this way: As you can see, for this example
I have a process using the following select statement in sql server SELECT HASHBYTES('SHA1', CAST('4100119300' AS NVARCHAR(100))) AS StringConverted This give
Query: this.dslContext.select( ROLE.asterisk(), multiset( select(PERMISSION.asterisk()) .from(ROLE_P