简体   繁体   中英

Table Valued Function

How to convert rows to column in SQL Server 2008 using table valued function?

Example:

Name: Danish; Sex: Male 

convert to Male as column heading and Danish as field data.

Thanks, Danish

Your question is really vague.

Converting rows to columns in sql server can be done with the PIVOT function. Look at the documentation on MSDN , and maybe this stackoverflow question for examples .

I fail to see what this has to do with table-valued functions

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM