You have a local variable you want to use outside of your function. Say, this variable is called v. Declare “global v” before v. Now you can use v object anywhere you want. 279 more words
Tags » SQL

Week 12, Capstone Finished
I know I’ve slacked the last couple of weeks on my two posts a week, but it was capstone time! Any time spent on my computer was time spent working on that. 897 more words

The Hearst Foundation
Projects
- Journalism Awards Program
Journalism Awards Program
528 more wordsProject Summary
To take their national journalism awards competition online instead of having to do everything by mail…
Convert date using varchar in ms sql
Here we converting date into different date formats, example as below…
select getdate() -- Result >> 2019-12-12 00:09:13.437 select convert(varchar,getdate(),100) -- Result >> Dec 12 2019 12:09AM select convert(varchar,getdate(),101) -- Result >> 12/12/2019 select convert(varchar,getdate(),102) -- Result >> 2019.12.12 select convert(varchar,getdate(),103) -- Result >> 12/12/2019 select convert(varchar,getdate(),104) -- Result >> 12.12.2019 select convert(varchar,getdate(),105) -- Result >> 12-12-2019 select convert(varchar,getdate(),106) -- Result >> 12 Dec 2019 select convert(varchar,getdate(),107) -- Result >> Dec 12, 2019 select convert(varchar,getdate(),108) -- Result >> 00:09:13 select convert(varchar,getdate(),109) -- Result >> Dec 12 2019 12:09:13:437AM select convert(varchar,getdate(),110) -- Result >> 12-12-2019 select convert(varchar,getdate(),111) -- Result >> 2019/12/12 select CONVERT(VARCHAR,GETDATE(),112) -- Result >> 20191212 select convert(varchar,getdate(),113) -- Result >> 12 Dec 2019 00:09:13:437 select convert(varchar,getdate(),114) -- Result >> 00:09:13:437

Different methods to identify the SQL Server version number
Different methods to identify the SQL Server version number
In this article, I am going to show different methods to identify the SQL Server version number and its edition. 1,022 more words

Why did my Microsoft SQL Transaction log grow so big and how do I shrink it and reclaim the space?
Background
Working primarily on support for Microsoft Dynamics ERP systems I often see tickets logged where the SQL transaction log has grown uncontrollably and is filling (or almost filling) the drive where its located. 1,505 more words
SQL Tip: FOR XML (Create a comma separated list of values)
This was originally posted to my internal (to Microsoft) blog on October 7, 2013 as part of a series I called ‘SQL Tips’ for coworkers and an email distribution list people could sign up to. 2,373 more words