Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

sql get highest date from 3 tabels

SELECT MAX(MaxDate) FROM (SELECT MAX(TradeDate) AS MaxDate FROM Office.Transactions WHERE BrokerID = 1 AND TradeDate IS NOT NULLUNIONSELECT MAX(EntryDate) AS MaxDate FROM Office.IOI WHERE BrokerID = 1UNIONSELECT MAX(EntryDate) AS MaxDate FROM Office.TradeNotes WHERE BrokerID = 1) AS X
Source by icetips.zendesk.com #
 
PREVIOUS NEXT
Tagged: #sql #highest #date #tabels
ADD COMMENT
Topic
Name
7+3 =