Login or Sign Up to become a member!
LessThanDot Site Logo

LessThanDot

A Technical Community for IT Professionals

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.

Browsing "gotcha"

1

Unique index difference between Oracle and SQL Server

When working with different database systems you have to be aware that some things work differently from one system to another. I already blogged a couple of times about differences between SQl Server and Oracle, those post are the following
Truncate r…

Read More...
8

Column name or number of supplied values does not match table definition when dealing with temp tables

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, Line 5
Column name or number of supplied values do…

Read More...
0

An Oracle NULL/Blank gotcha when coming from SQL Server

In my Differences between Oracle and SQL Server when working with NULL and blank values post I already showed you how blanks and NULLS are handled differently between Oracle and SQL Server. Today I found another interesting tidbit.

I you have a varc…

Read More...
0

Truncate rollback differences between SQL Server and Oracle

I wrote a blogpost about the fact that there is a common myth that you can’t rollback a truncate statement in SQL this post was written on June 13, 2007 and it showed you that you could rollback a truncate. Here is some code that shows that.

CREATE…

Read More...
1

What is the Dual table in Oracle and why do I need it?

When coming from SQL Server, you might find it weird that you don’t see code that looks like this

select 2

That code won’t run in Oracle, unlike SQL Server, Oracle requires the use of the FROM clause in its syntax. This is why Oracle has DUAL

Read More...
1

Differences between Oracle and SQL Server when working with NULL and blank values

If you ever have to start working with Oracle you have to keep in mind that NULLs and blank values don’t work exactly the same as in SQL Server. Let’s take a look at some examples

Create this table and insert some rows
create table TestNull(Col2 var…

Read More...
0

How to call a user defined function with a default parameter

Someone had some trouble earlier today with calling a user defined function that has a default value for a parameter

When you have a stored procedure with default values for parameters, you can omit those when calling the proc. With user defined func…

Read More...
4

SQL Advent 2011 Day 1: Date and time

In my Are you ready for SQL Server 2012 or are you still partying like it is 1999? post, I wrote about how you should start using SQL Server 2005 and SQL Server 2008 functionality now in order to prepare for SQL Server 2012. I still see tons of code tha…

Read More...
6

When changing column data types use ALTER TABLE TableName ALTER Column syntax, don’t drop and recreate column

Someone asked how to change the data type from datetime to datetime2

Someone else answered the following

You could add the new column.

UPDATE Table SET NewColumn = OldColumn

delete the old column

then rename the new column.

This of cou…

Read More...
1

Be careful when passing around parameters, make sure they are the same size and type

Someone tried to figure out why his data was showing the next day when he passed in today’s date. If you are not careful to use the same data type and this includes scale and precision as well, you can get some strange results. In this post I will take…

Read More...
Next Page »