Viewing 15 posts - 316 through 330 (of 424 total)
The number one rule of a primary key is that it must be "meaningless" yet unique. To be meaningless it must not be one of your four columns that...
April 30, 2014 at 12:49 pm
DECLARE @t TABLE (line varchar(100));
INSERT into @t VALUES ('ELA-DUPLECHEIN, KELLIE-13-14-2(A-B)');
INSERT INTO @t VALUES ('READING -LANDRY, MICHELE B-13-14-2(A)');
SELECT
CASE WHEN a > 0 AND b> 0 THEN SUBSTRING(line, a+1, b-1) ELSE line...
March 7, 2014 at 12:45 pm
Customers generally don't remember how their own backup scheme is set up. Jumping into the history files has helped me know the chain of full and log backups and...
February 27, 2014 at 7:13 am
I've used tables containing base data for calculating TimeZones and Daylight Savings Times for any year. But, let me tell you they were a royal mess to deal with....
February 14, 2014 at 5:51 am
I've used calendar tables for all manufacturing sites; they always contained one row per day.
In my opinion the very biggest reason to create a calendar table is to know the...
February 14, 2014 at 5:44 am
I'd probably insert the thousand rows into a table variable first. Then, insert the set in one shot. In either case it should take less than a second...
February 12, 2014 at 8:53 am
You may create constraints and indexes on temporary tables. I think you would benefit by having a regular table; that way you could depend on constraints and indexes and...
February 6, 2014 at 6:01 am
My preference is also for UDTTs. Unfortunately, I think Microsoft faked the implementation by creating a temp table in tempdb and passing that to the stored procedure resulting in...
February 6, 2014 at 5:14 am
Your easiest solution might be to do this simple change. If a parameter is given a value, then a subset of rows will be returned. If the parameter...
February 5, 2014 at 6:39 am
Two more questions I've had for some time.
Are table and column check constraints actually different or is it just a semantic difference? And do they fire differently?
Do FOREIGN KEYS...
January 27, 2014 at 6:34 am
Thanks for doing so much work figuring out the order of constraints. I looked last week and could not find Microsoft documentation on it.
The problem is bigger....
January 27, 2014 at 6:25 am
This reminds me of the Chinese food menu with 200+ numbered items. If you look at just the headings you can see all items are repeated for beef, pork,...
January 23, 2014 at 12:53 pm
I'm currently reading a book that beautifully covers the ideas expressed in this editorial.
Better: A Surgeon's Notes on Performance
by Atul Gawande
Link: http://amzn.com/0805082115
From my perspective, a programmer better meet the...
January 15, 2014 at 11:02 am
declare @t table ( birthdate date, age as datediff(year,birthdate,getdate()) ) ;
insert into @t (birthdate) values ('20000101')
select * from @t
October 24, 2013 at 12:20 pm
I can't say for sure without a query plan although I virtually always get much better results breaking a monolithic query into several separate queries and using "procedural" step logic...
October 24, 2013 at 12:13 pm
Viewing 15 posts - 316 through 330 (of 424 total)