I have two tables. GL period table contains entries like 2018-01, 2018-02, etc. GL Account table has a column GlPeriod. What I am trying to do in one SQl statement is to insert any missing GL Periods into the GL Account table. i.e. if account 1234 only has records thru 2012-11 then I want to add 2012-12 thru 2018-02 for account 1234. But I want to do this for all accounts and I don't want to insert any duplicate GL periods for any one account. I seems as though a left outer join should do the trick to get he required records, but I can't seem to get it to work. Can somebody point me in the right direction?
Red Flag Submitted
Thank you for helping keep Tek-Tips Forums free from inappropriate posts. The Tek-Tips staff will check this out and take appropriate action.
Reply To This Thread
Posting in the Tek-Tips forums is a member-only feature.