Need to instead 2020 put DateTime.Now.Year
My part query:
'RN '+ CAST(FORMAT(@maxRB,'000') AS VARCHAR(MAX)) + ' 2020 ' + CAST(@maxRN AS VARCHAR(MAX))
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Jenith ThakkarRank #789 · 2.9K reputationPosted Jul 9, 2020, 7:46 PM EDT
'RN '+ CAST(FORMAT(@maxRB,'000') AS VARCHAR(MAX)) + Datetime.Now.ToString('yyyy') + CAST(@maxRN AS VARCHAR(MAX))
Try this
Accept this answer if it's helpful for you
Laxmidhar SahooRank #383 · 6.6K reputationPosted Jul 10, 2020, 3:51 AM EDT