|
|
-
Madhivanan Liked 15 Hours ago through Blogs
Modulus operator is used to find the remainder after the division. All programming languages have specific operators to find a remainder like mod, rem, etc. In SQL Server, we can use modulus operator %. However we can also use general approach to find a...
|
-
Madhivanan Liked 15 Hours ago through Blogs
In Part I of this series SQL Server's equivalent of MS Access functions, I have posted some direct equivalents. In this post, I post other functions that dont have direct equivalent
Choose : Returns a value from the list based on a given position
decl...
|
-
Madhivanan Liked 15 Hours ago through Blogs
Sometimes when you want to migrate from MS Accesss to SQL Server, you need to rewrite the queries compatible to SQL Server. As you know the basic systax is same but the functions used in Access should be replaced with their equivalent in SQL Server.
H...
|
-
Madhivanan Liked 15 Hours ago through Blogs
A Leap year contains an extra day so there are 366 days. There are many ways to find out whether the year is a Leap year. If the value of is_leap_year is 1 it is a Leap year otherwise it is not a Leap year.
Method 1 : General method
declare @year int
...
|
-
Madhivanan Commented 1 Days ago through Blogs
Thank you so much all of you for your valuable feedbacks...
|
|
|
-
Madhivanan Liked 2 Days ago through Blogs
Changing database options to make it read-only, or taking a database offline? If you are using sp_dboption, your code will not work with SQL Server 2012. Use ALTER DATABASE...SET statement instead....
|
|
|
-
Madhivanan Posted 2 Days ago through Blogs
declare @str varchar(200) = '[p]a]a]s]s][p'
set @str=replace(replace(replace(@str,'][',''')+upper('''),'[','+upper('''),']',''')+lower(''')
select @str='select '+right(@str,len(@str)-1)+''')'
exec(@str)
...
|
-
Madhivanan Liked 5 Days ago through Blogs
This procedure will generate the script of a table
Create Procedure GenerateScript
(
@tableName varchar(100)
)
as
If exists (Select * from Information_Schema.COLUMNS where Table_Name= @tableName)
...
|