I have a SQL Table that I need to update with a BATCHID based upon data from the table.
The Table has a Posting Date Column with Dates formatted (example) 2024-01-30
I need to update the Batchid based upon a string plus the date (formatted without hyphens)
Something like Update Batchid = CONCAT('YAYPAY_'+PostingDate)
So if posting date in table is 2021-01-30 then BatchID (has to be 15 chars max) should be: 'YayPay_20240130'
How do I strip out the hyphens and format the date so it fits 15 characters?
Thanks in advance