Viewing 7 posts - 31 through 38 (of 38 total)
Thanks, now I understand why you were looking for that format. Based on that I would change the previous query slightly.
Select AllNames = REPLACE(REPLACE(STUFF(
(
...
March 30, 2010 at 10:00 am
Sorry, I didn't see anything about only adding new records. In that case, just add a left join to filter out existing records.
Insert Into SLsubDept (empId)
Select E.employId
From...
March 30, 2010 at 9:40 am
Select AllNames = REPLACE(REPLACE(CAST(
(
Select N'<li>' + FirstName + N' ' + LastName + + N'</li>'
From Staff
Order By StaffId
For XML Path('')
) As NVarChar(1000)), '& lt;', '<'), '&...
March 29, 2010 at 6:56 pm
All questions of proper naming and data modeling aside...
This is probably not the most elegant solution, but it should work (assuming I understood the initial post correctly). I'm sure...
March 29, 2010 at 5:38 pm
Sounds like what you want is the month names as the column headers on your resultset.
Why not alias the column names instead of retrieving the results with "Select *"?...
March 26, 2010 at 9:20 pm
Does your initial query produce an error or just not pull back any results?
Couple of points.
1. The EmployId in table 1 does not match up with EmpId. They...
March 26, 2010 at 4:05 pm
To me, this is a good place to use a pivot. Gets rid of having to take care of those temp tables.
Select Ethnicity, COALESCE(F, 0) As [Female], COALESCE(M, 0)...
March 25, 2010 at 12:54 pm
Viewing 7 posts - 31 through 38 (of 38 total)