long story short, I need to identify an email that may have 2 different endings: “HREmail@companyabc.com” “HREmail@company.com” I need to replace instances of the two above …
Tag: oracle
Oracle SQL Developer limit number of character of datatype char(5)
I was tasked to implement a table with a variable groupcode. There are several requirements. char(5) 2 or 4 uppercase letters plus 1 digit whose value is between 1 and 4 (e.g., AA1, AABB1) Any input other violating point 1 and 2 should be banned The only thing I can come up with is regexp_like but my efforts are in
Oracle SQL Join an ID on a field with a list of IDs some with ranges
First of all, its not my database and I cannot change it:) This is an oracle database I have a table with 2 ID fields code and subcode: Table1 ID Code Subcode 1 300 010 2 400 050 3 300 060 I …
Combine two table with different column name using Union all
I have two tables T1 and T2 with column name proj in T1 and projectID in T2. I have to combine these two tables using Union all. As both column has similar kind of information. How it can done so that it is visible under one column name Answer if the datatype are same ,the column names for a UNION
In Oracle SQL is there a way to join on a value twice?
Lets say I have two tables, with the following columns: cars fuel_types In this case fuel_id and secondary fuel_id both refer to the fuel_types table. Is it possible to include both labels in an inner join? I want to join on the fuel_id but I want to be able to have the fuel label twice as a new column. So
List of Record type matching issue Oracle
I want to check if a workspace is not available in all_workspace table then create new workspace. My requirement is if p_workspace is not matching the list of value of v_workspace then it should create new one. It gives me error after creation. If I run that workspace individually then its working. but when I am passing through block with
Oracle SQL Developer flag my working views as broken
Can anyone share me some light on why my Oracle SQL Developer flagged my view as broken while it is actually working? It is not just 1 view, but 10 views have the same problem, they are all created in a different time, with subquery or joining to multiple tables and is always working fine. Thanks in advance! Answer Probably
Executing view within a stored procedure
Is it possible to execute a view with a stored procedure? My procedure should first run the views (I have 2 in total) and then am combining these 2 views data into a different table for applying transformations. Something like this: Answer What do you call “execute a view with stored procedure”? How are views “triggered”? If you meant to
coalesce, nvl and CASE not working for count(*) in the subquery
I have a query with CTE and I want 0 for the NULL rows. I want to why COALESCE(tsting), NVL(tsting2) and CASE(rw_cnt) is not working? Am i missing anything? And I get data like below: Any suggestion for the query optimization is welcome… 🙂 Answer You are doing a LEFT join of dte to tmp, so you get nulls for
How to search for a month that is input by the user
I am working on some homework and have been stuck on this for a week. I have tried using TO_CHAR, MONTH(search), and EXTRACT(MONTH from…) and they all end up with either identifier ‘JAN'(the month I am searching for) is not declared, or expression is of the wrong type. This assignment is to display all the rows for pledges made in