|
|
Browse by Tags
All Tags » SQL » SQL Server
Showing page 1 of 3 (22 total posts)
-
Ok I admit - I use it. Pretty much everyone I know uses it and yet I feel dirty when I do.
Why? Well it's not portable SQL and most certainly not ANSI standard. I need to get the datetime I hear you say. How do I do this without getdate()?
There is a perfectly good substitute in the form of CURRENT_TIMESTAMP that is ...
-
A colleague of mine asked for a simple example to get him up and running with the basics of bitmasking. Since I had gone to the effort to create the example I thought I might as well blog it :o).
This example uses the logical AND operator &.
First of all you need to define your table.. create table BitmaskDemo
(ID int Primary ...
-
The MERGE syntax I used here has changed. In 2008 RC0 the ''WHEN SOURCE NOT MATCHED'' clause is replaced with ''WHEN NOT MATCHED BY SOURCE'' which is supposed to make the meaning clearer.
Although MERGE is part of standard SQL 2003 it's worth noting that the SOURCE NOT MATCHED / NOT MATCHED BY SOURCE clause is not part of the standard. ...
-
MERGE is a new DML statement in SQL Server 2008. Microsoft have implemented the ISO SQL 2003 and 2007 standard MERGE statement (as seen in Oracle and DB2) and added some extensions of their own.
In a nutshell, MERGE allows you to perform simultaneous UPDATE, INSERT and/or DELETE operations on one table. There are new physical operators that ...
-
Following a few requests, here are some sites you may find useful for supporting your SQL learning:
General
http://www.stickyminds.com/
http://www.thefreecountry.com/documentation/onlinesql.shtml (free online tutorials)
T-SQL
http://sqlcourse.com/ (free online tutorial)
http://www.w3schools.com/sql/default.asp (free online ...
-
If you are making changes to a linked object measure group after you have created the initial link, such as adding a new measure, you can come across the following error when you next deploy the solution.
"Errors in the OLAP storage engine: The metadata for the statically linked measure group, with the name of XXX, cannot be verified against ...
-
On the off chance you haven't come across this one before:
If you get the following error 'No mapping between account names and security IDs was done' when trying to deploy a cube project then check the membership of all the roles on your cube.
Chances are one of the users listed has actually been removed from the Domain.
Simply ...
-
One of my regular gripes about SQL Server concerns the number of Transact SQL features that give nondeterministic results. Unfortunately SQL Server 2005 added to the list of those. One of the new ones is ROW_NUMBER(), which is strictly due to ANSI/ISO rather than Microsoft. ROW_NUMBER() is inherently non-deterministic unless the PARTITION / ORDER ...
-
Today I ran into a blocker when trying to do this. Having spent a reasonable amount of time taking all of my sql statements out of the OPENQUERY argument and putting them into a string variable I then found it didn't work. The reason (from BOL) it turns out is that, and I quote; "OPENQUERY does not accept variables for its ...
-
ANSI/ISO SQL defines CHECK constraints very simply as:
<check constraint definition> ::= CHECK <left paren> <search condition> <right paren>
where <search condition> is a boolean expression, including query expressions.
In SQL Server, Oracle and many other DBMSs, queries aren't permitted in constraints. CHECK ...
1
|
|
|