It shows it in very bad way but I need to be Hour:Minutes. SELECT DepName, ARRSTATIONNAME, VEHICLENUMBER, ARRVTIME – DEPTIME FROM VEHICLENUMBER… ARRVTIME – DEPTIME is where I need to do …
Tag: oracle
Need help eliminating Null data and retrieving last months records
SELECT CLIENTS.LAST_NAME, CLIENTS.FIRST_NAME, CLIENTS.DOB, CLIENTS.ALT_ID, CLIENT_SCREENING_TOOLS.SCREEN_DATE, CASE WHEN CLIENT_SCREENING_TOOLS.TEST_NAME = ‘Patient …
Force timeout SQL Oracle on users response
I have a PL/SQL procedure which has a couple prompts which require the user to enter some information for processing. For example, item numbers, business units & so on. This as well prompts confirmation at the end of the script. This allows several users to rely on the same script to massively setup data …
Oracle SQL UNION alternative
I’m using ORACLE SQL (11g), lets assume we have a table named TRANSMISSIONS which has field that holds file sizes I want to perform various aggregate functions on various partitions let’s say for different file sizes. However I want the partitions to be cumulative. So a 10 KB file will be both in …
Handle a very large string in pl/sql script
I am trying to run below code which reads the index definition for table A so that it can be created again after I delete/create that in this script. This script runs fine when the returned value(ddl) …
Unique value Constraint with multiple columns across the table, not the combination in Oracle
In oracle is there a way to enforce uniqueness among two columns? Its not the uniqueness among combination of two columns, but values across table among two columns. References: Unique value constraint across multiple columns Example data, which should not be allowed: Unique constraint on combination of two c…
How to use case statement and min() with group by?
The following query when I that execute It seems error ORA-00934: group function is not allowed here I guess , there is error min() in group by. How can I solve this problem? Answer You have to use analytical MIN() function like the below without group by
Query to get the previous value for a group of numbers
I have a table Metadata with columns code,revno and idno. revno will be unique. Same idno may exist for multiple revisions. Now my requirement is, For a set of given revno, I need to query the …
Joining table get the first data on first table if duplicate
Hi i have table1 and table2. table1 is the logtime table of employees and table2 is the groupcode of the employee. On table1 some employees has duplicate time in because they time in multiple time …
How to extract text between two words in Oracle
This is the source string: random foobar “name” : “Jack Ryan”, other random stuff In Oracle query, how do I extract Jack Ryan from it? I guess I am looking for whatever is between “name” : ” and “,…