How should I delete a row using a java variable in SQL table? I am trying to delete a record from table member (with two columns, name and year) using what the user has input (variable newName and …
SQL Query to return records with certain conditions in several columns, and where only one record with a certain value exists
First, the SQL Server query I’m using: SELECT InfoSource FROM dbo.orders WHERE Price IS NULL AND Date IS NULL AND Expiry IS NULL GROUP BY InfoSource HAVING COUNT(InfoSource) = 1 Many records can …
SQL Query: How to send MIN value from one table to another based off ID
Looking for help with SQL query! I have 2 tables, A and B. Both tables have the column ‘student_id’ and ‘created_date’. For table A, ‘created_date’ is null but I wish to populate it with data from …
SQL View order of execution
I need some clarification around how the execution of a where clause works around a view. My view calls for functions for each Item and have a where clause within it for only active Items. If I have …
How to join values from one column to another
I have two tables Notification and Worker Notifications. On those tables there are two similar columns called Time. My worker class inherits Notification and I would like to join all preexisting times …
How to exclude entire Customer ID data based on a condition
I need to exclude all data relating to Customer ID’s that have at least one instance where a condition applies. For instance: This is all my data with conditions +————-+—————-+ | …
Flatten nested data in Big Query to a single row
This is what the data looks like This is what I am trying to achieve I just need the flattened data to show destination 1 and destination 2 as well as duration 1 and duration 2. I have used the …
Finding double-byte white spaces in SQL table
I have some rows in my SQL table that contain single byte space characters, and some that contain double byte space characters. I need to identify rows with double byte characters to fix them in the …
Is it possible to have a table function return null rows?
I currently have a table function that returns a table of data. This data is retrieved by 7 functions within and are all called as values in a row, which is then repeated I number of times to create a …
Adding a computed column that uses MAX
I need to create a sequential number column for record number proposes I am OK with losing sequence if I delete a row from the middle of the table For example 1 2 3 If I delete 2, I am ok with new …