Viewing 15 posts - 76 through 90 (of 211 total)
Thanks for your help but it seems like we have a name resolution issue. If I create the linked server named "BETADB" instead of the actual db server name, RPBETADB81,...
May 12, 2011 at 1:40 pm
This work?
SELECT s1.EmpId, s1.Division, s1.Department, SUM(s1.Salary), SUM(s1.Salary)/s2.Salary
FROM SomeTable s1
INNER JOIN (SELECT EmpId, SUM(Salary) AS Salary FROM SomeTable GROUP BY EmpId) s2
ON s1.EmpId = s2.EmpId
GROUP BY s1.EmpId, s1.Division, s1.Department, s2.Salary
May 12, 2011 at 1:33 pm
Thanks for the responses.
colin.Leversuch-Roberts (5/11/2011)
Oh I link by ip...
May 11, 2011 at 6:53 am
Sorry, kicked it out there thinking this was new development work.
In the past I've had to do something similar using a JOIN table containing a generic ID plus an identifier...
May 9, 2011 at 2:34 pm
Maybe a sequence table? You'd then FK all your other tables back to it.
May 9, 2011 at 12:07 pm
For change control purposes, we usually convert these values to BIGINTs. Easier to pass back and forth from middle tier.
April 12, 2011 at 2:10 pm
Grant Fritchey (4/8/2011)
April 8, 2011 at 9:34 am
Fitting end to the week: I know I got the right answer but never fail, there is somebody telling me I got it wrong.
April 8, 2011 at 9:08 am
Check this out: http://support.microsoft.com/kb/269074
April 7, 2011 at 4:10 pm
Don't have a lot to go off here but I'd double check to make sure the employee table is in the dbo schema.
March 29, 2011 at 7:48 am
I agree with Grant about using Visio to do modeling. They had a much better product (for modeling) before MS acquired them.
I'd recommend Quest's Toad Data Modeler. Nice reverse and...
March 28, 2011 at 2:31 pm
Leaving the time off defaults it to midnight (i.e. '2011-3-1' = '2011-03-01 00:00:00.000').
Syntax looks ok. Noticed that you are returning a different date field in the select then you're filtering...
March 28, 2011 at 1:59 pm
You could do multiple joins to the address detail table based on address type, something like this:
SELECT c.CustomerID,c.RegisterDate, c.Email, c.FirstName, c.LastName, c.Phone,
c.AffiliateID, c.Referrer, c.OkToEmail, c.BillingEqualsShipping, c.BillingAddressID, c.ShippingAddressID,
c.CreatedOn, c.VATSetting, c.VATRegistrationID, c.Active,
a1.Company,...
March 7, 2011 at 9:45 am
I'd wait for a maint window then make the DB read/write, add the user and then reset to read-only.
USE [master]
GO
ALTER DATABASE [SomeDB] SET READ_WRITE WITH NO_WAIT
GO
CREATE USER [SomeUser] FOR LOGIN...
March 3, 2011 at 11:45 am
Viewing 15 posts - 76 through 90 (of 211 total)