Skip to content

Tag: oracle

subquery calculate days between dates

Sub query, SQL, Oracle I’m new to sub queries and hoping to get some assistance. My thought was the sub query would run first and then the outer query would execute based on the sub query filter of trans_code = ‘ABC’. The query works but it pulls all dates from all transaction codes, trans_c…

Missing expression inside sub-query statement?

I am using the infamous “CityJail” schema to answer a question “List the names of all criminals who have committed more than average number of crimes and aren’t listed as violent offenders.” Here is my code: but I get an error: ORA-00936: missing expression 00936. 00000 – “…

Convert month and year as last day of the month in oracle sql

I have two column – Month and Year in a table. Need to concatenate these to get the last day of the month in date format. For example, if Month =5 and Year =2020, the output needs to 31-May-20. Similarly if Month =4 and Year=19, the output needs to be 30-APR-20. Any idea how this can be done, is there

Reading BLOB column in oracle table

I have a table tbl which has below columns: When I run below query it works fine: But when I run below it throws error: I mean to say, if I select only 1 blob column to read , then date filter works fine. But when I select both BLOB columns with date filter in where clause, it throws below

what this sign mean in sql query

i have the following code : What is /*_archive*/ mean ? in my database we have : Answer From a /* sequence to the following */ sequence, as in the C programming language. This syntax enables a comment to extend over multiple lines because the beginning and closing sequences need not be on the same line. MySQL…