database - Select data from table with column name and description SQL Server -


I have all the columns named in the old column, others do not understand the names, but table details include column description, table How can you choose all the data from, and combine with the column description?

Updated below:

Name and column description

  SELECT COLUMN_NAME AS Name, COLUMN_TEXT AS [DB2- Details from LINKED-SERVER] [BD2] .QSYS2.SYSCOLUMNS where TABLE_NAME = 'ITMHED'   

I found:

  Name of the ITMNO item number ITMNM item name .... 800+ rows more   

Then I have another query:

  SELECT * from [DB2-LINKED-SERVER ]. [BD2] .ITMHED   

returned it to me:

  ITemano ITMNM ... 800+ more columns AB-001 Mountain Bike ....   

What do I need:

  item number name ... 800+ more columns AB-001 mountain bike .....  < / Pre> 

If I only make 2-3 columns, I can manually rename them, but with many records, I want to make it more readable for users. I need to prepare a report about this. 'COLUMN_TEXT AS Description +', 'FROM'

  SELECT COLUMN_NAME AS name '' [DB2-LINKED-SERVER]. [BD2] .QSYS2.SYSCOLUMNS where TABLE_NAME = 'ITMHED'   

can get output from it and then enter it in the following:

[DB2-LINKED- Select from SERVER] (insert output from above). [BD2] .ITMHED

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -