Quantcast
Channel: LessthanDot » sql server 2005
Browsing latest articles
Browse All 10 View Live

Column name or number of supplied values does not match table definition when...

The other day I was doing some testing and then from the same connection I executed a stored procedure only to be greeted with the following message Msg 213, Level 16, State 1, Procedure prTestTemp,...

View Article



Giving only insert permissions to a table for a new login

There was a requirement to create a new user who would have only insert permissions to one table, this user would also have insert and select permissions to another table. This is pretty simple to...

View Article

Image may be NSFW.
Clik here to view.

Messing with your friendly DBA on April Fools’ Day

April Fools’ Day is a day when people play practical jokes and hoaxes on each other. Why not trying to play some practical jokes on your friendly DBA The first thing we are going to do is to spoof the...

View Article

Where to find the xtype info for SQL Server in a table

If you look at the sys.sysobjects view, you will see a xtype column listed Object type. Can be one of the following object types: AF = Aggregate function (CLR) C = CHECK constraint D = Default or...

View Article

Image may be NSFW.
Clik here to view.

Fixing a SQL Server could not spawn FRunCM thread error

I had to change the domain account on some SQL Server boxes that we have. After I changed the account on one machine from DomainNameUser to DomainNameNewUser SQL Server wouldn’t start up In the error...

View Article


SQL Server Database owner ~~UNKNOWN~~

Today I was checking an older server and decided to run sp_helpdb. On a bunch of databases I noticed that the owner was ~~UNKNOWN~~. The only reason I noticed this was when I tried to look at a...

View Article

SQL Puzzle: RIGHT without using the RIGHT function

I haven’t done a puzzle for a long time so I figured let’s do a simple one. Return the right 6 characters of the column but without using the RIGHT function. Here is what the table looks like CREATE...

View Article

SQL Puzzle…how many even numbers are there in a row

In last week’s puzzle SQL Puzzle: RIGHT without using the RIGHT function we looked at how to do a RIGHT function without using the RIGHT function. Today we are going to find out how many columns are...

View Article


SQL Puzzle.. Sorting results without using ORDER BY

Time for this week’s puzzle/teaser. I want to return the results in ascending order but without using ORDER BY If you run this code CREATE TABLE Puzzle (Col1 varchar(20) NOT NULL PRIMARY KEY CLUSTERED,...

View Article


SQL Puzzle.. How many uppercase and lowercase characters in a column

In this week’s puzzle we are going to try to figure out how many uppercase, how many lowercase characters are in a column, we are also interested in how many are neither uppercase or lowercase Here is...

View Article
Browsing latest articles
Browse All 10 View Live


Latest Images