Viewing 15 posts - 76 through 90 (of 117 total)
Yes, using a table level constraint:
-- With this table:
create table test2 (
YesNo char(1) check (YesNo in ( 'Y', 'N')),
otherStuff char(10) null,
constraint nullSometimes check ( ( YesNo = 'Y' and not(otherStuff...
August 24, 2005 at 4:16 pm
I think you need to use the Case method to make a cross-tab sum. Check out
August 24, 2005 at 3:49 pm
Colin - also note that indexes don't speed everything up -- they actually can slow inserts and updates, as the content in each index needs to be brought in line...
August 24, 2005 at 2:19 pm
Shooting in the dark here, but is it necessary to process the entire table, or when you "load new users" can you just run this update for those records that...
August 24, 2005 at 1:09 pm
In addition to what's been suggested, some structural changes might help:
1. You could move phone numbers into another, related table. This has the advantage of allowing many or few phone...
August 24, 2005 at 11:06 am
what about
alter database yourdatabase set read_only
?
August 24, 2005 at 10:59 am
Are there any nulls hiding in the columns you are adding up?
e.g. select * from or51import where grosswgt is null?
August 24, 2005 at 10:54 am
The max is somewhere around 254, I think. If you even approach that, it seems like it might indicate a problem with your design, though...
August 22, 2005 at 11:58 am
It's a little more involved than that. If you did a back-up and restore, then
a. It was not necessary to create the DB beforehand (but no harm done 🙂
b....
August 19, 2005 at 3:09 pm
Always a dilemma :-). Back in the day I was a 3D graphics and CAD/modelling guy, and there was one piece of software I liked above all others, which will...
August 18, 2005 at 11:39 am
Lee - in spite of Celko's ... er ... single-mindedness about certain things (or because of it? 🙂 he has published some very good books that are definitely worth studying,...
August 18, 2005 at 10:23 am
Here's a query that will show the CPU utilisation, if that helps (adjust for your hardware):
/* This query will measure SQL server CPU utilization over a brief timespan. */
declare @timespan...
August 18, 2005 at 9:39 am
Yes, put a TOP clause in the query to limit the number of rows.
Also, we use Idera SQL Diagnostic Manager, and like it a lot. It's great for monitoring, and...
August 18, 2005 at 9:34 am
OK, I'll bite. Learn one of the .NET languages, VB.NET or C#. They are fun, and useful, and capable. 🙂
August 17, 2005 at 9:48 am
Agreed!
But, though my While/Looping answer was tongue-in-cheek, here's a more serious question: what about locking? Does a Declare Cursor on (stuff) lock more (stuff) than would a While loop that...
August 16, 2005 at 6:23 pm
Viewing 15 posts - 76 through 90 (of 117 total)