I am using SQL Server 2012, i have a script by which i am inserting values to a table, in that script i have to convert the format of some DateTime
variables on the basis of two parameters.
I can do it using CASE
or if
condition in sql
. I am not allowed to make any Function
or procedure
in the database to which i can refer.
Is there any other way like creating a temporary function
or temporary procedure
within the script to apply condition alter the format for Datetime
values?