Viewing 15 posts - 8,566 through 8,580 (of 8,730 total)
You're welcome.
Be sure to understand the code before you use it.
August 21, 2012 at 10:23 am
Here's one option
UPDATE o SET
phonecount = g.phonecount,
contactnamecount = g.contactnamecount
FROM @PhoneTable_New o
JOIN (
SELECTMAX(ID) max_id,
phone,
COUNT(phone) phonecount,
COUNT( DISTINCT contactname) contactnamecount
FROM @PhoneTable_New
GROUP BY phone ) g ON o.phone = g.phone AND o.id...
August 21, 2012 at 10:15 am
From what I remember from your query, it was working ok if you made the corrections I told you.
If you want to obtain the total devaluation value, you should not...
August 21, 2012 at 7:26 am
This could work, but I don't have sample data to test with. I'm not sure about performance but it's 2000 friendly 😛
INSERT INTO XX_ordid_tracker (
poid,
recptkey,
ord_id)
SELECT r.ord_oda_id,
r.token,
ISNULL(...
August 20, 2012 at 12:05 pm
Something like this?
DECLARE @test-2 table(
col1int)
INSERT INTO @test-2
SELECT 1 UNION ALL SELECT
2 UNION ALL SELECT
3 UNION ALL SELECT
4 UNION ALL SELECT
5...
August 20, 2012 at 9:04 am
This thread can help you.
http://www.sqlservercentral.com/Forums/Topic1335869-391-1.aspx
August 20, 2012 at 7:22 am
Toreador (8/20/2012)
Currently 15% of people think that Count(columnname) on a 7-row table will return a value of 10 😉
When I read that answer, for a moment I thought it could...
August 20, 2012 at 6:51 am
Thank you very much for your answers.
I'm new at administration and I guess I'll have to do some research on RAID and other parts referring to infrastructure of SQL...
August 19, 2012 at 1:01 pm
Mr. Celko,
The main problem in here wouldn't be the DDL as we cannot see the original table just a simplified version of it. I'm pretty sure the OP shouldn't be...
August 18, 2012 at 3:21 pm
No one said they were working on a production database.
I believe that most problems like this should be solved with other administration options and not triggers. I wouldn't say you...
August 17, 2012 at 2:02 pm
Sean Lange (8/17/2012)
August 17, 2012 at 1:02 pm
Did you read the links I posted? (Application Roles, EXECUTE and sp_executesql)
My suggestion is to use the Application Roles and remove permissions to the logins.
However, If you want to create...
August 17, 2012 at 12:45 pm
Is a good thing that you posted DDL, sample data and expected results.
But the problem is it's not matching with each other.
You might want to check your definition on...
August 17, 2012 at 11:44 am
Why would you like a Stored Procedure? If this is for administration, you should do this task once.
I'm not sure if this is the best solution, you should try to...
August 17, 2012 at 11:22 am
You're welcome, just be sure to know what it is doing before you use it for production (as you should always do). And be sure you can explain it.
August 17, 2012 at 8:14 am
Viewing 15 posts - 8,566 through 8,580 (of 8,730 total)