Viewing 15 posts - 14,896 through 14,910 (of 14,952 total)
Based on your original question, the indexes I'd probably use are:
empid (clustered)
deptid (nonclustered)
Then look at a few execution plans for a few of the common queries that use those columns....
January 4, 2008 at 7:13 am
Some of your questions aren't technical in nature. For example, what to do about data already in the "master table". That depends on what data is in it...
January 4, 2008 at 6:59 am
Never mind on the repeating hierarchy. I figured it out. (I think.)
January 3, 2008 at 11:39 am
Just tested a CTE with 101 levels of hierarchy, and it worked. No error.
January 3, 2008 at 11:19 am
The place I've had to use iterative code in T-SQL is hierarchies. (I tend to use While instead of cursors, because I can have some set-based operations mixed in...
January 3, 2008 at 11:05 am
My first guess, based on the data given, is that "400" is a table name (or table alias). In that case, what you need is "[400].[PatientAge]", instead of "[400.PatientAge]"....
January 3, 2008 at 9:49 am
One way to do it would be an outer join on the existing data vs the incoming data. That would give you rows that have been changed or are...
January 2, 2008 at 3:07 pm
I'd seriously consider using SSIS for this, if you're using SQL 2005. It can be set up to read various input file formats, variations in column names, etc. ...
January 2, 2008 at 2:54 pm
Yes, it is possible to create a "system" stored procedure, and yes, it's almost always a bad idea.
What problem are you trying to solve by creating one? Most unusual...
December 31, 2007 at 7:32 am
Yes, you could write this as a single query. It would take a Case statement in the Group By clause. But, I'm with Gail on this one: You're...
December 31, 2007 at 7:28 am
A trigger can be necessary for checking data validity if the validity is dependent on data in other tables or other rows of the same table, and can't be satisfied...
December 28, 2007 at 12:38 pm
set nocount on
declare @customers table (
Row int identity primary key,
ID int NOT NULL,
Number [smallint] NULL ,
starting_point [varchar] (5) NULL ,
ending_point [varchar] (5) NULL
)
insert into @customers values (888,1, 'abc', 'def')
insert into...
December 28, 2007 at 11:33 am
Robert, I like your solution of casting dates as integers (I'd cast the datetime as float, but integer works too). Is there any reason not to use an isnull...
December 28, 2007 at 11:03 am
I'm not sure of a good beginning article on the subject. Basically, it's just a way to express boolean checks on data. Articles on that subject tend to...
December 28, 2007 at 8:04 am
I tend to use defaults for a couple of reasons.
On a column like "DateCreated", use a default and use "default" in insert statements. Having "default" in there helps document...
December 28, 2007 at 7:24 am
Viewing 15 posts - 14,896 through 14,910 (of 14,952 total)