Query performance issue when adding UNION to CTE/Query
I have the below CTE/Query running on Oracle database.
Best type of join to use
I’m having an issue with the below query with either filtering out rows that are needed, or including extra rows that aren’t desired (Depending on whether or not I use the OR
condition below). I am LEFT OUTER JOIN
ing PO_ATTRIBUTE_VALUES
as their are some cases where there are some rows in PO_ATTRIBUTE_VALUES
that are not in PO_LINES_ARCHIVE_ALL
. The issue is in the final WHERE
clause where I only return rows from PO_LINES_ARCHIVE_ALL LN
with a LAST_UPDATE_DATE
within the last two days, OR where the LAST_UPDATE_DATE
from PO_ATTRIBUTE_VALUES
is within the last two days. If I don’t use the ‘OR` condition then I am filtering out rows that are needed that are in the Outer joined table.
Improve performance on query with many OR operations
I have the below query where I need to Select the MAX(COST_DATE)
per C.SUBINVENTORY_CODE
, but I don’t want to Group On A.REC_TRXN_ID, B.TRANSACTION_ID, A.QUANTITY_ONHAND
, or B.TRANSACTION_COST
.
Capitalize first and last name in email address field
I am looking to standardize email addresses by formatting them as [email protected] in a Select statement.