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 …
Tag: oracle
Find date difference in Oracle SQL based on condition
I have a table: table1 tran_id user_id start_date end_date 1 100 01-06-2018 18-06-2018 2 100 14-06-2018 14-06-2018 4 100 19-07-2018 …
How to build a query that pulls in a listing of employee ids for employees that have a value that occurred on a range of dates unique to employee?
I need to pull in the distinct employee IDs for any employee who had a corrective action with a list of corrective action type IDs within 180 days of their corrective action date. so if I have …
NULL fields using PIVOT
I request your collaboration because pivot on a table and separating the records by null, but still leave the fields at 0 with NVL Table product | value ———-+——- Shirts | 1200 Caps …
Need to filter data
I have a table ldgr with following fields Vchrno date debit credit amount JV1 01-mar-19 BA11 0 100 JV1 01-mar-19 0 PE113 100 JV1 01-mar-19 BA33 0 …
How to get rid of many placeholders (question marks) in java sql statements
I want to insert a row to table using JDBC. But table has a big number of columns, so I don’t want to specify all of them into a statement. Is there another way of specifying column values? INSERT …
Trying to loop a query to get monthly counts
I need to get the number of employees who had active coverage for each package, per month. Looking at a span of 50 months, so don’t want to run it 50 times. I need the number of people with each …
how remove special character and digits from a string but ignore white spaces
i tried to remove special characters and numeric number from string of sentence but it should ignore white spaces if there is a more than one it should replace with one SQL developer,oracle 11g …
ORA-00936: missing expression (sql-oracle)
I want to add 100 dollars to the old money, But tell me ORA-00936: missing expression create table sala( salary char(4)); insert into sala values(300); create or replace trigger update_sal …
Fetch data from one table columns whose names are value of another table
I need to fetch columns from a master table and the list of columns that i need to get will be in a metadata table for different users.This would need to be dynamic as each user might not have the …