I wanted to insert the month name of the current date into a table using a SQL query.
I first thought that I could achieve this by simply using the monthname function. But when I typed that in the SQL Query analyser, the error made me realise that it is not that easy to get the result I want.
So in the end here is what I came up with:
select datename(month, getdate())+'-'+ convert(varchar,year(getdate())) as Month_
Subscribe to:
Post Comments (Atom)
OneLake: The Heart of Your Data Universe in Microsoft Fabric
Imagine a single, unified data lake for your entire organization, accessible to every workload, without data duplication. That's the pow...
-
From the past 3 days I have been working on resolving merged and hidden cells issues when an SSRS reports is exported to excel. ...
-
When I tried to access the report manager after a fresh installation of Sql Server Reporting Serivces 2016 using the url http://localhost/R...
-
I was trying to build an SSIS package that one of my colleagues has created. The first error that was thrown was as below: Exception des...
No comments:
Post a Comment