Forum Replies Created

Viewing 7 posts - 31 through 38 (of 38 total)

  • RE: html tag

    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(

    (

    ...

  • RE: SQL update data from one table to another

    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...

  • RE: html tag

    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;', '<'), '&...

  • RE: Best way to transpose multiple rows onto 1 row?

    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...

  • RE: Pivot Querrie using Dates

    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 *"?...

  • RE: SQL update data from one table to another

    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...

  • RE: Adding two columns SQL 2005

    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)...

Viewing 7 posts - 31 through 38 (of 38 total)