The query gives the result 3 as expected but the query: gives 003 I need the result to be as the first query (‘3’) but I also need the ‘TO_CHAR’ (I’m using it to create a virtual column from a NUMBER column). I can not figure why and how to fix it. Also, I can not use regex_replace instead. Answer
Tag: oracle11g
Populating rows in table with previous row value oracle sql
Here above the data is grouped by person then their duties are listed : I need a way to get the data to look like this using oracle sql : having a bit of trouble iterating over every row… dont mind if its plsql – sql prefered tho Tried a few things… but it goes back to null after the
How to Return paper title and number of authors for each paper using sql
I try to return paper title and number of authors for each paper,names of authors who have at least two papers and List names of authors who have co-authored with Dr. Chen. but i don’t find any way. Author Editor Paper Paper_author ) paper_review Reviewer Sample Inputs Author Editor Paper paper_author paper_review Reviewer Answer What I understood is you are
Oracle DB sql group the table_names patterns into a group
I am trying to classify certain patterns of tables in individual groups and display the results this is fine i included a case statements and classified it but how to group the counts , let provide the sql logic and existing results and expected results so that it will be understood. database is Oracle 11g SQL Query EXISTING RESULTS EXPECTED
I am dropping the with check option constraint from view but it is not being enforced
So I am stuck in a problem. I defined a view with the WITH CHECK OPTION constraint, now i wish to delete it, but even after dropping the constraint i get the error :=ora-01402: view WITH CHECK OPTION where- clause violation. this is the sequence of SQL commands i am executing – I cant figure why this is the case
Using rownum in sub query on oracle 11
I have query like this.It is working properly on oracle 12. But I am using oracle 11.That query is not working on oracle 11.Therefore I changed my query like that It gives missing right paranthesis How can I solve this problem.Do you have any idea?Actually I use a variable instead on 10 number. Answer Syntax is a bit different –
joining same table multiple times in Oracle
Hi I am tuning one legacy code. we have below 2 tables in a big query. I have seen in from clause first table has been used thrice and it has been outer joined with same column with same table. Can above 3 lines be handled using fnd_currencies table only once. is there any smarter way to do that? Answer
Select a column from table return by function in Oracle
I have a function that returns a table of custom objects. I wish to select a certain column by name from the returned result. The table of objects The function When I call the function this way, I get a result with a single column called SERIAL_NUMBER However, I can’t do something like this Is there a way to select
Generating dynamic data using join select query in Oracle
We have a select query containing around 10 tables. using that query we are getting just 50 record. We need to get 50k record. actually we dont have functional understanding to generate data into these tables. Is there any possibility, we can create insert query to insert data into these 10 table using that select query even if there is
SQL Plus Columns getting overflowed to next row
The DeptNo column when using SQLPlus in Oracle 11g XE is getting pushed down to the next row, despite having sufficient space in the window in Ubuntu 20.04 Terminal.