Viewing 15 posts - 2,296 through 2,310 (of 5,103 total)
-- It may be a good Idea to create an index on the Grouping/joining Column
-- create index idx_someName on SomeTame(someName)
-- go
select someName, sum(age) X
into #tmp
from mainTable
group by someName...
May 17, 2006 at 3:20 pm
Hehe
...![]()
![]()
I was refering to the Identity column with primary key...
May 17, 2006 at 3:08 pm
OR Find which is the equivalent of DAYADD in Oracle ![]()
May 17, 2006 at 10:04 am
First.
The Idea of a Sequence table is the right idea in this case.
Second.
"Central location for keys is a concurrency nightmare" if you are not using the appropriate locking...
May 17, 2006 at 9:42 am
There are several posibilities and you will need to choose acording to the complexity you need to handle. For a quick solution have a look at:
My advice is to see...
May 15, 2006 at 2:49 pm
Now that you are looking for performance, Allow me to also say that your triggers should check for different values and only then insert the change in the log.
The reason...
May 15, 2006 at 2:13 pm
May 9, 2006 at 4:13 pm
Correct. sqlmaint.exe does hardcode the connection settings and there is no way to change that. In sql 2005 MS introduced support for those cases with a switch.
The workaround is to...
May 9, 2006 at 3:38 pm
SELECT t1.*
FROM dbo. t1
JOIN
( SELECT [fK_id_1], MAX([date]) MaxDate
FROM dbo.
WHERE [primary]='Y'
GROUP BY [fK_id_1] ) dt
ON t1.fk_id_1 = dt.fk_id_1 and t1.[date] = dt.MaxDate
May 9, 2006 at 12:51 pm
Not all errors are trappable in SQL server, especially TRUNCATE TABLE is something that should be thought very well due to the elevated priviledges required. For such control you will need...
May 9, 2006 at 12:42 pm
try:
select a.changeNo, a.VendorID, a.ChangeDate
,(SELECT NewValue as CertificationDate
from AuditTable
where Field = 'CREDT'
and VendorID = a.vendorID
and DateChange = (select top 1 DateChange --find the latest that...
May 9, 2006 at 12:39 pm
>> Remember: Computed columns via UDF can't be indexed <<
That is not entirely true!
You CAN index the computed column if the UDF is DETERMINISTIC
I hope this clears the confusion of...
May 9, 2006 at 11:41 am
if you are looking at the problem from a performance stand point here are some thoughts:
1. Compute in to variables as many fixed values as you can
2. Try not to use...
May 8, 2006 at 3:18 pm
Michael,
I am sorry if I can't really understand your post but:
1. Can you write *in words* what is it that you want?
2. Can you show an example *in tabular format* of the output.
Cheers,
May 8, 2006 at 2:22 pm
Viewing 15 posts - 2,296 through 2,310 (of 5,103 total)