I have a table called mov_entrys and they have multiple historic records, in other words, duplicated records this is my main SQL statement SELECT me.mov_entry_id, me.mov_entry_ean13, me.plate, mv….
Comparing comma separated values from two columns of two different tables
I want to compare the values of two columns (diff table) having comma separated values of two different Oracle tables. I want to find rows that match with all values (NAME1 all values should match …
PostgreSQL missing FROM-CLAUSE entry
I have the following query: It tells me: ERROR: missing FROM-clause entry for table “sb.bookings” LINE 2: SELECT “shiftId”, “sb.bookings”.”state”, “visibleAt” FRO… I wrote it as “sb.bookings”.”state” because state is in …
Provide the values for a ‘like’ function from a specific column in a Table?
I am using SQL Server 2014 and I need a T-SQL query which uses the like function to run on a specific column (c1) of a Table (t1) to find out if it contains one of the codes from a list of codes found …
How do i crack this SQL Soccer Matches assignment?
I came across this problem recently, i’m a sql newbie preparing for an interview and i need some help understanding how to connect the tables without using joins (since there is no common column)to …
Unknown column in field list when use join MySQL
I have 2 tables like this: product_master: campaign_product: This tables link with foreign key product_id I want to get all product data with campaign_code column. I don’t want to get 2 campaign_product row with same product_id. So I use this query: It got error when I run: Error in query (1054): Unknow…
How to SUM columns in the same row?
I have a table like below: id pymt_no1 pymt_no2 pymt_no3 pymt_no4 pymt_amt1 pymt_amt2 pymt_amt3 pymt_amt4 25 100 5 150 50 …
Reverse order of every other character in a string
I’m currently working on a project where the data I’m receiving is being given to me in a messed up order. I need every 2 characters to switch places in a string. Currently I have the below code, but it is ungodly slow in a function or stored procedure. Any help would be appreciated. Ex: FK741 OCE…
Regex in SQL query – REMOVE AFTER
GOAL I want to remove with regex in SQL query everything after the colon, can someone help me to mount this query? I made several attempts but without success … Normal query Remove with Regex …
“Missing columns in relationship” when creating table
I have tried to create three tables(CUSTOMERS, VEHICLES and RENTALS), the third table (RENTALS) has foreign keys referring to the two primary keys of the first two tables (CUSTOMERS and RENTALS). When …