Viewing 15 posts - 8,551 through 8,565 (of 15,381 total)
patrickmcginnis59 10839 (4/23/2013)
April 23, 2013 at 1:12 pm
This will probably get you what you want.
select EmpID,
LName,
FName,
StationID,
Region
from
(
SELECT
a.EmpID,
a.LName,
a.FName,
a.StationID,
b.Region,
ROW_NUMBER() over(partition by a.EmpID order by a.EmpID) as RowNum
FROM emp.employees a
JOIN emp.division b
ON a.StationID=b.StationID
) x
where x.RowNum = 1
April 23, 2013 at 12:46 pm
I think you are asking where do you run the MERGE???
EXEC('Your Entire MERGE Statement goes here') at LinkServer
April 23, 2013 at 11:16 am
prakashr.r7 (4/23/2013)
Thank you, Sean.....had to do some slight changes....and it worked.....Thank you again...
You're welcome. Glad I was able to get you close enough to figure out the last couple steps.
April 23, 2013 at 10:54 am
autoexcrement (4/23/2013)
This database is hosted at a web hosting company on SQL 2K5. Maybe their box doesn't have all the necessary hotfixes installed or something,...
April 23, 2013 at 10:32 am
autoexcrement (4/23/2013)
This database is hosted at a web hosting company on SQL 2K5. Maybe their box doesn't have all the necessary hotfixes installed or something,...
April 23, 2013 at 10:26 am
prakashr.r7 (4/23/2013)
Sean Lange (4/23/2013)
prakashr.r7 (4/23/2013)
Sean Lange (4/23/2013)
April 23, 2013 at 9:25 am
Can it be as simple as MAX(WhateverTheNewColumnIS)?
The problem is that is nearly impossible to provide much assistance because we can't see what you see and we don't know your data...
April 23, 2013 at 8:39 am
prakashr.r7 (4/23/2013)
Sean Lange (4/23/2013)
What is the point of NamePhone? Your table PhoneName is properly normalized and the second table is not. I would drop NamePhone and use PhoneName.
Sean, I just...
April 23, 2013 at 8:35 am
maxlezious (4/23/2013)
April 23, 2013 at 8:24 am
Here are a couple others.
http://www.sqlservercentral.com/articles/Stairway+Series/The+Relational+model+and+Normalization./74134/%5B/url%5D
http://www.sqlservercentral.com/articles/Normalization/74241/%5B/url%5D
http://www.sqlservercentral.com/articles/74381/%5B/url%5D
http://www.sqlservercentral.com/articles/Normalization/74437/%5B/url%5D
April 23, 2013 at 8:22 am
You really should leave formatting to the front end. All formatting does on the sql side of things is slow it down and make it more difficult to work with....
April 23, 2013 at 8:13 am
What is the point of NamePhone? Your table PhoneName is properly normalized and the second table is not. I would drop NamePhone and use PhoneName.
April 23, 2013 at 8:03 am
duplicate post. direct replies here. http://www.sqlservercentral.com/Forums/Topic1445358-1550-1.aspx
April 23, 2013 at 7:59 am
saptapavank (4/23/2013)
can any one suggest me that how to find out the No. of instances in a server using query
Interview question?
April 23, 2013 at 7:58 am
Viewing 15 posts - 8,551 through 8,565 (of 15,381 total)