I want all my dates in my database in the following yyyy-mm-dd date format. For example, ‘2020-05-28’. But this doesn’t seem to work as I thought it would when I insert a date into my User table which …
Tag: oracle-sqldeveloper
How do I fix this error: ORA-00933: SQL command not properly ended
Got this error while trying to enter values for 2 different tables on Oracle APEX and need help figuring out where I went wrong. I’m not sure if it’s because I made a typo somewhere or it’s because I’…
Count of Value column with case when and group by
Table: Date Id Value 2019-02-09 a1 ab 2019-01-12 a2 cd 2019-12-12 a1 ab 2017-07-23 a1 ab 2018-12-09 …
SQL query execution plan and optimization (index)
I have to get the execution plan of a query, i did this: Then, the plan is obtained: Now, regarding the last points on predicate information, I have to optimize the execution plan using something like: create index… to solve the three last points. How could I do it? I have no idea about that! Thanks in advance! Answer Yes,
SQLDeveloper – Check for a column within another column
I am currently trying to query if a Last_Name column has the suffix added to the end of a Last_Name. I have a Suffix Table(SUFFIX) which stores the available suffixes (I, II, III, IV, V, Jr., Sr.) however I am running into trouble when I have performed the below query as it shows all the last names even if it
Unable to MAX(COUNT) and have multiple columns
I have 4 tables, EMPLOYEE, DRIVER, TRIP and TRIPLEG EMPLOYEE table has Name which I want to extract and show with MAX count, has E# which is shared with DRIVER DRIVER table has L#(licence number) which is common with TRIP TRIP table has T#(trip number) which is common with TRIPLEG I’m trying to find the max number of tripleg a
Simple join query giving ORA 00933 on Oracle8i Release 8.1.7.0.1
Environment used – Following simple query is giving me an error : ORA-00933:SQL command not properly ended On SQL Developer 1.5.1 – Answer Oracle did not support the ANSI join syntax until version 9i. Also, Huy Ngo is correct that Oracle does not allow AS for table aliases. Try this code instead:
CONNECT BY PRIOR and concatenation of parent – child hierarchy
I have this table: img Desired result: img What i’m trying: select SEG from my_table CONNECT BY PRIOR PARENT_SEG_ID = SEG_ID; So, in the column LEVEL_LOCATOR we can see f.e. that the LEVEL 5.9 has 6 childs, and 5.9.4 has 2 childs. And, f.e., the parent of the child 5.9.1 is Postpaid that has the SEG_ID = 361978 and it’s
I’m trying to know the country that pays the highest salary from
select last_name, country_name, SUM(salary) from employees e JOIN departments d ON (e.department_id= d.department_id) JOIN locations L ON (d.location_id = L.location_id) JOIN Countries Cc ON (L….
SELECT list is not in GROUP BY error but I got a result cleary
here is a code that I made. SELECT substr(to_char(birthday, ‘YYYY’), 1, 3) || ‘0’, emp_type, AVG(pay) FROM emp2 WHERE substr(to_char(birthday, ‘YYYY’), 1, 3) IN ( ‘196’, …