sql - Concatenate column values from rows -


I SQL Server I am using a Taimset usable system with 2000 backend I more than 1 so many rooms and tutors in different forms by changing the different rows different can turn into different lists I have used the code below in this code:

  DECLARE @ tartar varchar (8000) SELECT @ Tutors = isnull (@Tutors + '+', '') + name fROM (SELECT CT_EVENT_STAFF .event_id, CT_EVENT_STAFF.weeks, CT_STAFF.unique_name, celcat200809.dbo.CT_EVENT_STAFF AS CT_EVENT_STAFF left oUT of CT_STAFF.name ER Select 200809.dbo.//STAFF AS CT_STAFF at CT_EVENT_STAFF.staff_id = CT_STAFF.staff_id WHERE event_id = @eventID) data_set print @ tutors  

Event_ID is a unique event, it only works when when will I know the exact ID, I think it's a way of doing this for each individual event_id without can not

what the cursor goes to every ID? Its possible solution to use a UDF is my second problem, the timetalling system (CEKKAT) creates a new database for each year (I do not know), then I would have SQL Dialogue i.e. next year's database celcat200910, I believe That dynamic SQL can not be run in the UDF. The

Please remember to SQL Server 2000

If you still suggest Achchhaga You can use a view in the form, but instead of redirecting it to a table, select it together tables. The year / month can be divided into columns if it has not already been done and you need it. Select

  as UNIFIED_CT_STAFF Select year = 2008, month = 9, exclusive_name, name by FROM celcat200809.dbo CT_STAFF Union selection year = 2008, month = 10, unique_name, name From celcat200810.dbo.//STAFF  

Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -