I need to build funciton SQL code follow this format: [date - A/B/QD-CC]
where: date is date
A is numercial order
B is year
QD is a policy or a decision
CC : code
How can I wrire a function for that format?
Can I try this:
CREATE function takecode
DECLARE @ddmm Date @STT INT @Year INT @AA varchar(50) @BBB varchar(50)
Return data_tyoe as text
Begin
Return [ddmm-STT/YYYY/AA-BB]
End;
**Thank u for your concerning. I need to quickly anwser. Thank everyone
**