Viewing 15 posts - 946 through 960 (of 1,473 total)
What is the performance of that cursor like? On my system, it ran for 7 minutes with the processor pegged at 100% before I stopped it (coming from my...
December 10, 2008 at 12:19 pm
Pat,
What this all kinda boils down to, is that every solution here does exactly the same thing (assuming nobody typo'd an alias), it just shows different styles of...
December 10, 2008 at 10:41 am
Excellent call Chris. The below shows an example of doing exactly that. The times are from my highly overloaded and underpowered dev box.
[font="Courier New"]-------------------- SETUP --------------------------------
CREATE TABLE #Product(
ProductIdent ...
December 10, 2008 at 10:33 am
If you don't get an answer to this, it's likely because what you're asking for is somewhat obscure. Please refer to the link in my signature for how to...
December 10, 2008 at 9:07 am
Egad I hate those commas on the left.:hehe:
(I know I know, it makes it easier to comment out lines and such, but I still hate it)
I do put each column...
December 10, 2008 at 8:57 am
AS is optional. I've never liked it, and never use it. I'll even go so far as to remove it in a lot of cases. (For purely...
December 10, 2008 at 8:23 am
Two main problems.
1. You're using the wrong sign. Next Payment date is never > Maturity date, so you're not getting anything with the where. Switched it to...
December 10, 2008 at 8:01 am
You were fine Pat, I think he meant HE posted to the wrong forum.
The best practices post is the same one many of us (including myself) have in our signatures...
December 9, 2008 at 6:42 pm
Garadin (12/9/2008)
Although it does seem like it might be more efficient due to the derived tables, the execution plans are virtually identical (once I add the aliases to your outer...
December 9, 2008 at 4:21 pm
populate/update the leaseNumber row in the MachineAudit table where the LeaseInfoImport.[computerName] = MachineName.[machineName]
First...
SELECT MA.MachineID, MN.MachineName, L.LeaseNumber
FROM MachineAudit MA
INNER JOIN MachineName MN ON MA.MachineID =...
December 9, 2008 at 3:16 pm
Example Posted above.
December 9, 2008 at 2:50 pm
You can do this using a Tally table.
See the following article for an explanation of what a Tally Table is:
http://www.sqlservercentral.com/articles/TSQL/62867/
---[Edit]---
Here is an example:
[font="Courier New"]DECLARE
@StartDate VARCHAR(20),
@Enddate VARCHAR(20),
@User numeric,
@Freq VARCHAR(20)
SET @Freq = 7
SET...
December 9, 2008 at 2:17 pm
Mike Feuti (12/9/2008)
From name table:
SELECT '10002',Walton@email.chop.edu,'Vernathan Walton' UNION ALL
SELECT '10004',craig.engstrom@wfhc.org,'Craig W. Engstrom, CBET' UNION ALL
SELECT '10006',,'Larry R. Pallatt, CBET'...
December 9, 2008 at 12:58 pm
Say for instance, you have a table Products with three fields, ProductIDent, ProductID and UnitPrice
You could supply the information about this table like this:
Table Products
ProductIDent (identity)
ProductID
UnitPrice
Data
ProductID ...
December 9, 2008 at 12:02 pm
Chris Morris (12/9/2008)
Kelvin Phayre (12/9/2008)
I then took a different...
December 9, 2008 at 11:51 am
Viewing 15 posts - 946 through 960 (of 1,473 total)