由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Database版 - SQL add some columns into a table from another table (转载
相关主题
Help on Sql server huge table performanceSQL question: update a field
SQL combine two tables into one table and add a new columnRookie's question again
问一个SQL Server的问题SQL请教...怎么写这样的distribution list
SQL Server Trigger on System Base Table or Catalog ViewMS T-SQL 问题
SQL combine two columns from two different tables no shared (转载)Common Table Expression 问题
A Query question有包子!sql procedure 来rank不同table里面的数据
Table Merge (SQL Server)SQL copy a table into a new table and add a new column
Access 里面两个 column不一样的table 能combine 到一起吗?新手请教SQL 语法问题- alias 和 join
相关话题的讨论汇总
话题: table话题: jim话题: sql话题: acct话题: columns
进入Database版参与讨论
1 (共1页)
l******9
发帖数: 579
1
On SQL Server 2008 R2, I need to add some columns into a table from another
table.
e.g.
Table1:
name value id
Jim 288 abf
Table 2:
name acct num rank
Jim 12 29 8
Jim 98 95 7
Jim 20 52 9
What I need:
name value id acct num rank acct num rank acct num rank
Jim 288 abf 12 29 8 98 95 7 20 52 9
The record numbers in table 2 may be variable.
Any help would be appreciate.
y******8
发帖数: 171
s**********o
发帖数: 14359
3
一个人有多少ACCOUNT你不知道吧,所以你的列数是不一定的
比如有一个人有200个ACCOUNTS,多数人只有一两个ACCOUNT,
你这个TABLE就是稀稀拉拉的,有个PIVOT是做这个的,另外
也可以建构新表INSERT WHEN CASE GROUP BY
1 (共1页)
进入Database版参与讨论
相关主题
新手请教SQL 语法问题- alias 和 joinSQL combine two columns from two different tables no shared (转载)
How to lock tabel with LINQ to SQL (转载)A Query question
最近写了不少SQL script,请大牛评价下属于什么水平Table Merge (SQL Server)
紧急求助, 关于SQL ServerAccess 里面两个 column不一样的table 能combine 到一起吗?
Help on Sql server huge table performanceSQL question: update a field
SQL combine two tables into one table and add a new columnRookie's question again
问一个SQL Server的问题SQL请教...怎么写这样的distribution list
SQL Server Trigger on System Base Table or Catalog ViewMS T-SQL 问题
相关话题的讨论汇总
话题: table话题: jim话题: sql话题: acct话题: columns