I have a MERGE/UPDATE statement. I want to add exception handling such that if the update fails for any reason, write to DBMS_output and job log. I’ve come up with something – it compiles OK, but …
what is difference between ceiling and roundup server in sql server
What is difference between the Ceiling and Round functions in in SQL Server? I have some query and I get a totally different value in Round and Ceiling function.
How to perform following query in LINQ?
I have a SQL query need to do in LINQ. Can anyone helps in converting? SELECT * FROM profile WHERE ProfileId 1221 AND IsActive = 1 AND ProfileId NOT IN (SELECT ReportingPerson …
Loading data from CSV file to oracle table using sql loader
i want to load the data from CSV file to oracle table with this below condition. if the table is empty then only the data should be loaded into table otherwise data should not be loaded. is this …
Is there a way to change this BigQuery self-join to use a window function?
Let’s say I have a BigQuery table “events” (in reality this is a slow sub-query) that stores the count of events per day, by event type. There are many types of events and most of them don’t occur on …
Dynamic Pivot of Email Addresses
I have tried to research this, and I am unable to find something quite like it. I have a table that may have entries added many times over as well as deleted. I have no idea how many columns I will …
Oracle SQL – create string by concatenating rows but does not exceed X number of characters
First I am trying to concatenate rows into string separated by comma. Second I do not want the string to be exceeded X number of character. If going to exceed then create another string from next row …
Count city and State from 2 different tables
I need to count the number of cities occurrences on 2 different tables. One Table is the Supplier table which has supplier_id, City and State. The second table is consumer with consumer id , City and …
group by with multiple columns and with condition
My query used to be SELECT PROVIDER, LEFT([START_TIME],13) as [HOUR], DEVICE_ID as BIKEID FROM table1 GROUP BY PROVIDER_NAME, DEVICE_ID, LEFT([START_TIME],13) and it was …
SQL REPLACE value based on position in string
I have a column where the values are all in this format ‘###-##-#-##-##-###-##-#’ I need to format all of the values to where the 2nd to last hyphen is replaced with a period ‘###-##-#-##-##-###.##-#’ …