Skip to content
Advertisement

Tag: difference

Count total day difference in a Pivot SQL

I have data in two tables with dates PAL date and HUB date. I’m looking to show the number of day difference in a table with 6 columns: Client 1day 2days 3days 4days 5days Client will display the clients grouped, 1 Day will display the count of how many datediff of 1. 2 Days will display the count of how

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_code ‘ABC’ and ‘DEF’ ect. The end

How to return the difference between 2 strings using Oracle SQL only

I have 2 strings for example: ‘Source:Siebel; Name:Mary Jane; Gender:F; Age:24; N;’ ‘Source:Siebel; Name:Marie; Gender:F; Age:24; N;’ The result I need is: Name:Mary Jane; Name:Marie; Most likely I need to reverse below code from Oracle Function to return similarity between strings as the result was the similarities [QueryResult] of the 2 strings I cannot use the procedure as I need

Advertisement