English 中文(简体)
Concatenate on JobID [duplicate]
原标题:Concatenate on JobID [duplicate]
  • 时间:2012-04-24 11:23:25
  •  标签:
  • sql-server
This question already has answers here:
Closed 11 years ago.

Possible Duplicate:
Concatenate a selected column in a single query?

我知道这一点在我的SQL中相当简单,但我不知道如何在Server这样做。 我的表格有两栏。 用户ID & TagID。 我愿将TagID压缩为 com马分道,结果由用户信息数据库分类。 如何做到这一点?

问题回答

我想想一下一下一下一下你在寻求的东西:

SELECT   +Table1.UserID+ , +Table2.TagID+   AS CombinedCSVColumn
      , SUM(Table1.Value) AS Value
From dbo.Table1 as Table1
INNER JOIN db.Table2 as Table2
ON Table1.EmployeeID = Table2.EmployeeID
GROUP BY   +Table1.UserID+ , +Table2.TagID+   

也就是说,如果来自两个表。 一个表格类似。

关于

澳门





相关问题
Export tables from SQL Server to be imported to Oracle 10g

I m trying to export some tables from SQL Server 2005 and then create those tables and populate them in Oracle. I have about 10 tables, varying from 4 columns up to 25. I m not using any constraints/...

SQL server: Can NT accounts be mapped to SQL server accounts

In our database we have an SQL server account that has the correct roles to access some of the databases. We are now switching to windows authentication and I was wondering if we can create a NT user ...

SQL Server 2000, ADO 2.8, VB6

How to determine if a Transaction is active i.e. before issuing Begin Transaction I want to ensure that no previous transaction are open.. the platform is VB6, MS-SQL Server 2000 and ADO 2.8

热门标签