Viewing 15 posts - 49,021 through 49,035 (of 49,571 total)
It means that you have a primary key on the table, a constraint that forces all values in a column to be unique.
Since you tried to insert duplicate values...
September 15, 2006 at 1:30 am
Insert into Service (GroupNo,ServiceCode,ServiceName,SystemNo,Upload,ControlNo)
SELECT 6,ServiceCode,ServiceName,SystemNo,Upload,ControlNo
FROM Service
WHERE GroupNo=1
The select takes all the records in Service that have a GroupNo of 1 (Where...)
The constant in the select clause (SELECT 6, ...) means...
September 15, 2006 at 12:57 am
Why? Sum ignores nulls. It will add up non-null values. The isnull around the sum is just incase the entire column is null or there are no records. That's the...
September 14, 2006 at 11:50 pm
Yes, and you have to join it as meny times as there are levels in the nesting.
Just a warning. It's not going to run fast. I'd recomend that you...
September 14, 2006 at 5:13 am
I think this will work. I've only done it 3 levels deep, but the principle's there and you should be able to extend it to as many levels as you...
September 14, 2006 at 4:48 am
Hmmm, that's going to be one messy query.
Let me think about this....
September 14, 2006 at 2:19 am
Sum ignores nulls. If you sum a column that contains nulls, you'll get the total of the non-null values and a warning saying null values were eliminated due to aggregation.
The...
September 14, 2006 at 1:51 am
Ok, a bit better.
so...
z a
x z
y x
if I ask x, I'll get a
if I ask y, I'll also get a
Is that right?
Is there any limit on how deep...
September 14, 2006 at 1:49 am
How do you define 'latest'? Do you have a date or timestamp somewhere in there or some other way to order the records?
If the table has
y a
x a
x y
a c
y ...
September 14, 2006 at 1:30 am
Can you post the table structure please, columns, constraints, current indexes. also if possible, the update statements that run.
Thanks
September 14, 2006 at 12:56 am
Why two columns? Tis a much better design to have a single column that stores the current datetime.
Getdate retuns the current date and time to an accuracy of 3 ms....
September 13, 2006 at 2:18 am
Remove builtin\Administrators from the sysadmin role. Make sure that you have another admin account before you do that. Make sure that the sa login has a strong password.
It won't stop him from...
September 12, 2006 at 9:21 am
I wouldn't personally think more than about 10-20% from just splitting the files. Now if you're moving to faster disks as well, you'll get an increase from that as well.
We're...
September 12, 2006 at 9:00 am
It depends on whether the data required for the join is in memory or on disk. If both tables are in memory, then there will be no gain (because no...
September 12, 2006 at 8:45 am
I forgot to mention, we've currently got three filegroups, clustered indexes in 1, nonclusters in the second and some of the tables text images in the third and we're looking...
September 12, 2006 at 8:24 am
Viewing 15 posts - 49,021 through 49,035 (of 49,571 total)