I am trying to construct a trigger that will update Table B with Max value end_date column when the corresponding end_date of table A is updated. This is so I can calculated and save the date …
Number Type from Oracle to Teradata
I need to replicate some tables of Oracle in Teradata. I have a script that create the sql for the Teradata’s table, so far everything worked fine but I have a small problem. I look the information …
Check if repeated row has value in one attribute in any of the rows
I have a table that looks like this: ID | Position ————– 1 | 0 1 | 3 1 | 5 2 | 1 2 | 2 3 | 1 3 | 5 I would like to extract for each ID if it contains a …
How to cut a table?
How can I reduce that table in Oracle’s SQL: PersonNr TestID Date resultTestA resultTestB Person1 1 01.01.19 pos Person1 1 01.01.19 …
all values not displaying from SQL data table in PHP
I am trying to display all my data from MySQL to PHP like the following, but only 1 data is being displayed
How to get counts + sum of counts in MS Access?
I have a table ‘workers’ which contains data like name | category ———————- Steve | A Anne | B Linda | A … etc I want to get an overview of categories (counts of …
find all entities by nested list that don’t have some value
I have tables NighClub, Visitor and Visitors_NighClub (many to many). I need to get all night clubs which DONT HAVE certain Visitor. To get NightClubs which HAVE certain Visitor I do like this: SELECT …
What’s the point of BEGIN TRANSACTION; … ROLLBACK;
I understand that a transaction will automatically roll back whenever an error occurs. I read up on this for T-SQL from Microsoft and I found this syntax: BEGIN TRANSACTION; STATEMENT1; …
Format Phone Numbers With Characters
I need to format the existing phone numbers saved in my database. First, I need to clean the phone numbers with character. 801-113-1521 801.456.7891 1213-345-6789 ext 219 (323)567=2251 should be: …
How to join max/min date column on select with last date where data on it
I have to join one table with 2 parameters to show last update status of detail to check finish/ongoing with MAX(…)/MIN(…). What can i do for this? I have tried LEFT JOIN but it return to null …