How To Get Column Description From MetaData?

Mar 25, 2008



I've tried looking in sys.syscolums and sys.syscomments, but I can't seem to find where the Description information is retain for a Field in the system tables -- any hints?

Thanks, Rob.

View 2 Replies


ADVERTISEMENT

Where Is "description" Col In Repository Metadata

Apr 20, 2000

I'm trying to create a Data Dictionary view from system table info like tablename, fieldname, datatype etc. I can find all that I need except for the "description" field which is displayed in Enterprise Manager/ Repository metadata pane.

How can I locate this field so I can reference it in a view? Isn't it stored in a system table? Master, model? Where is it?

Thank in advance,

Phil

View 1 Replies View Related

Column Description

May 18, 2005

Hello, it seems I forgot how to do it,
I want to create a query to get the column description table, I mean get structure without data.
I remember it was select DESC or something like that, donno if im right!!!
 
regards

View 6 Replies View Related

Description Column In SP

Dec 17, 2013

I am having trouble bringing "description" column in to my sp and them at the out put. in the ppatient_status_mstr there is a column called“description” which has patient status such as “discharged” “termed collection” etc... How do I use the SP to bring this description into application? I am assigning it to @mytext. I am not sure how to declare “description” in the SP? Every time I use it I get errors like:

Msg 4104, Level 16, State 1, Procedure CheckStatus, Line 20
The multi-part identifier "pm.alerts_ind" could not be bound.
Msg 207, Level 16, State 1, Procedure CheckStatus, Line 40
Invalid column name 'description'.
Msg 207, Level 16, State 1, Procedure CheckStatus, Line 43
Invalid column name 'description'.

I want to say if user picks a description from application . show me that description in output. But I am having trouble how to use the description? I am not sure if my “IF” statements are correct either?

Here is the procedure

ALTER PROCEDURE [dbo].[CheckStatus] (@enc_id varchar(36) OUTPUT, @Mytext varchar(50) OUTPUT, @data_ind Char(1) OUTPUT)
AS
BEGIN
DECLARE
@alerts_ind char(1)

[code]....

View 20 Replies View Related

Get The Description Of A Column

Jul 23, 2005

Okay guys heres the senario.I have written a kick butt asp application that allows me to test sqlstatements and manage/display all my databases from the web but I havea feature I want to include that I can't figure out how. In EnterpriseManager, one of the column editable properties is the ColumnDescription. I can't find it in sql server itself. only in theEnterprise Manager. I need to access it using a sql statement so thatit will display in my table definiation view that I create in the aspapp.

View 1 Replies View Related

SQL Server2000 And COLUMN DESCRIPTION

Nov 16, 2001

HI

I have a big problem with SQL server2000. I can't get COLUMN DESCRIPTION.
I will print DATADICTIONARY from a DB, I can get all elemnts (table name, columns name, datatype, precision, scale, FK, PK, default value..) I missed only DESCRIPTION. How I can get it????

Medo

View 1 Replies View Related

List Column Name And Description

May 26, 2006

Hello everybody,

If I know the table name, is there any command to list all "Column Name" and the Columns "Description" as shown in the Design Table window.

Any feedback is welcome!

Thank you,

Edi

View 3 Replies View Related

Get And Set Column Description From Sql Server2005

Aug 10, 2007

I dont know,how can I get column description from Sql Server 2005 and use it in vb.net 2005? would you please help me solve it?

View 1 Replies View Related

Set COLUMN Description In .Net 2005,

Aug 13, 2007

Hi,
I want to set column description in .Net 2005, Please guide me.
thanx very much

View 1 Replies View Related

Display Column Description

Jun 13, 2006

I have this easy sql for a drop down.

select code_value, desc1
from dbo.market_area_code
where code_value in ('1', '2', '4')

How can I add something to display something like

if code_value = '1' then display 'Blue'
if code_value = '2' then display 'Orange'
if code_value = '4' then display 'Red'

View 3 Replies View Related

How Can I Retrieve Description And Other Column Information?

Jun 2, 2004

Hi, all..
I want to know the query to retrieve Column information that we can see from table Design view of Enterprise manager, such as Column name, Pk or not, FK table, Data Type, Null or not, Description(Specially Descrition).

Is there any sp for this or any query for this?

Thank you all...

View 14 Replies View Related

Get Column Or Table Description Query

Jun 12, 2008

How can I query/script Column or Table description (extended property MS_Description') in SQLserver 2005 db.

View 4 Replies View Related

Selecting The Column Description In 2005

Aug 3, 2006

I am migrating between SQL Server 2000 and SQL Server 2005 but hit a snag when attempting to write a query to display the column's description.

I used this code with SQL Server 2000 to get the "Description" data.

select o.name 'table' , c.name 'column' , p.value as 'description' , t.name 'datatype' , c.isnullable 'nullable?' , c.length, m.text 'default_text' from sysobjects o

join syscolumns c on o.id = c.id

join sysproperties p on o.id = p.id and p.smallid = c.colid

join systypes t on c.xtype = t.xtype

left outer join syscomments m on m.id = c.cdefault

order by 'table' , 'column'

How can I reproduce this with SQL Server 2005? I tried using the following which gives me a lot of the same data but not "Description":

SELECT * FROM INFORMATION_SCHEMA.COLUMNS

Any help here would be greatly appreciated.

View 3 Replies View Related

How Can I Get The SQL Server 2000 Column Description

Feb 9, 2007

How can I get the SQL Server 2000 Column Description within ADO.NET 2.0?

BR / Chris

View 3 Replies View Related

SQL Table And Column Metadata

Jun 21, 2006

SQL table and column metadata

Is there a way to add or update the column or table (using the extended properties) description metadata via T-SQL (from within a stored procedure) or via a program (such as VB.NET using ADO)?

These metadata properties are available via the SSMS interface:
Columns via the Column Properties/Table Designer/Description
Tables via the Table Properties/Extended Properties/[Extended Property Name]

Thanks in advance,
Mark

View 6 Replies View Related

How To Display The Column Description In Query Analyser

Jun 1, 2004

Hello All.

I have created a table with short name as the file name but have entered the description in the column box (when creating a new table - see attached). I would like to show this description information in query analyser. Can this be done? I used sp_help <table name> but it doesn't show the description.

Please advise. Thank you.


Best regards

View 2 Replies View Related

GetSchema Not Returning Description Of Table Or Column

May 1, 2008

I am trying to get the schema of database using the getschema method. However, the schema that is being returned does not include the description. I have added in table and column descriptions for some of my tables and columns but the dataset returned does not include the description column.

Any idea on how to get the description to be output?


Dim testCn As System.Data.OleDb.OleDbConnection

testCn = New System.Data.OleDb.OleDbConnection(step2.GetRevEngConn.ConnectionString)

Dim testDS As DataTable

testCn.Open()

testDS = testCn.GetSchema("TABLES")
testds.writexml("c:schematables.xml")

testDS = testCn.GetSchema("COLUMNS")
testDS.writexml("C:schemacol.xml")

testCn.Close()



- <Columns>


<TABLE_CATALOG>XDMDB_LAPTOP</TABLE_CATALOG>

<TABLE_SCHEMA>dbo</TABLE_SCHEMA>

<TABLE_NAME>PropertyValue</TABLE_NAME>

<COLUMN_NAME>property_value</COLUMN_NAME>

<ORDINAL_POSITION>6</ORDINAL_POSITION>

<COLUMN_HASDEFAULT>false</COLUMN_HASDEFAULT>

<COLUMN_FLAGS>230</COLUMN_FLAGS>

<IS_NULLABLE>true</IS_NULLABLE>

<DATA_TYPE>130</DATA_TYPE>

<CHARACTER_MAXIMUM_LENGTH>0</CHARACTER_MAXIMUM_LENGTH>

<CHARACTER_OCTET_LENGTH>0</CHARACTER_OCTET_LENGTH>

<CHARACTER_SET_CATALOG>master</CHARACTER_SET_CATALOG>

<CHARACTER_SET_SCHEMA>dbo</CHARACTER_SET_SCHEMA>

<CHARACTER_SET_NAME>iso_1</CHARACTER_SET_NAME>

<COLLATION_CATALOG>master</COLLATION_CATALOG>

<COLLATION_SCHEMA>dbo</COLLATION_SCHEMA>

<COLLATION_NAME>SQL_Latin1_General_CP1_CI_AS</COLLATION_NAME>

<COLUMN_LCID>1033</COLUMN_LCID>

<COLUMN_COMPFLAGS>196609</COLUMN_COMPFLAGS>

<COLUMN_SORTID>52</COLUMN_SORTID>

<COLUMN_TDSCOLLATION>CQTQADQ=</COLUMN_TDSCOLLATION>

<IS_COMPUTED>false</IS_COMPUTED>
</Columns>

View 2 Replies View Related

External Metadata Column Error

Oct 25, 2007

I keep getting the following error in SSIS. Also, I don't get the error on every server the package is run on, but less than 5 (the package is run on over 100).

"The external metadata column collection is out of synchronization with the data source columns. The column "Timestamp" needs to be added to the external metadata column collection"

Please tell me where I need to remove Timestamp from. Thanks

-Kyle

View 1 Replies View Related

External Metadata Column Error

Oct 24, 2007

I keep getting the following error in SSIS. Also, I don't get the error on every server the package is run on, but less than 5 (the package is run on over 100).

"The external metadata column collection is out of synchronization with the data source columns. The column "Timestamp" needs to be added to the external metadata column collection"

Please tell me where I need to remove Timestamp from. Thanks
-Kyle

View 1 Replies View Related

Setting The Column Property Description With A SQL Function Call

Feb 2, 2008

I am trying to figure out how to set the Description of a Column in my database table by making a SQL function call. I know that I can go into Microsoft Studio Express and type in each desciption for each column. I just have about 1000 variables and each variable's description is in an Excel spreadsheet. I want to be able to build SQL code that will set each of the 1000 variables own description.

Thanks for any help.

Wesley Marshall

View 4 Replies View Related

Column Metadata From Connection Manager Programmatically

May 9, 2006

Hi all!

My problem I've been struggling with is the following. I have a set of text files (around 70), each with different column numbers and types. I define Flat File Connection Managers for each of them where I can nicely rename, set data types and omit certain columns. I do this once and this will be the basis for the rest of the data process (would be nice programmatically too actually).
I would like to pump each of these text files into SQL Server tables using CREATE TABLE and BULK INSERT (because do it one-by-one is really a pain). The question is:

is there a way to obtain column information (Script Task) from a Connection Manager so I can run CREATE TABLE-s? I just need the names, data type for each nothing fancy...

(I bumped into interfaces like IDTSConnectionManagerFlatFileColumns90, which I cannot handle from the Script Task.)

Any help appreciated!

View 6 Replies View Related

Integration Services :: Column Metadata In Table

Apr 10, 2015

I am having one store procedure which use to load data from flat file to staging table dynamically.everything is working fine. staging_temp table have single column.all the data stored in that single column below is the sample row.

AB¯ALBERTA ¯93¯AI
AI¯ALBERTA INDIRECT ¯94¯AI
AL¯ALABAMA ¯30¯ 

after the staging_temp data gets inserted into main table.my probelm is to handle such a file where number of columns are more than the actual table.if you see the sample rows there are 4 column separated by "¯".but actual I am having only 3 columns in my main table.so how can I get only first 3 column from the satging_temp table.output should be like below.

AB¯ALBERTA ¯93
AI¯ALBERTA INDIRECT ¯94
AL¯ALABAMA ¯30

View 45 Replies View Related

The External Metadata Column Collection Is Out Of Synchronization...

Mar 12, 2008

Hi,

I have an Excel file source. I keep getting this error when running the package:

"The external metadata column collection is out of synchronization with the data source columns. The column "x" needs to be updated in the external metadata column collection."

When I get this error with regular flat files, it's because I've changed the data type of a given column in the flat file connection manager. And I resolve it simply by double-clicking on the flat file source task, and viola - it corrects it for me.

How do I correct this with an Excel file? Help.

Thanks

View 10 Replies View Related

Fetch Metadata From A Column With An Alias In A View

Aug 2, 2007

Hi!

I have created a view and one of the columns in the view has an alias assigned to it.

I'm able to read the metadata from INFORMATION_SCHEMA.VIEW_COLUMN_USAGE and also lookup
from which table each column in the view orginated from except for the column that has an alias assigned to it.

Is there any other way to lookup a column that has an alias assigned to it?


Thanks alot!

Adam

View 2 Replies View Related

View / Underlying Column Definition Metadata

Mar 18, 2008

Have many views based on legacy tables that have different table and column names. Want to create a table that shows view table / column and underlying table column, e.g.

CREATE VIEW [dbo].[Branch]
AS
SELECT

divbra_id BranchID,
cmpny_id CompanyID,
divbra_cde BranchCode,
divbra_nme BranchName

FROM MyDatabase.dbo.divbranc

GO

is an existing view. I want to pull out the following metadata:

divbranc divbra_id Branch BranchID
divbranc cmpny_id Branch CompanyID
divbranc divbra_cde Branch BranchCode
divbranc divbra_nme Branch BranchName

Is there anyway to get this from SQL metadata without actually parsing the view SELECT statement in code?

View 7 Replies View Related

Reading Values From Data-description Column And Insert Into One Table?

Jul 17, 2013

I have a subselect that should be working but doesn't. Been at it too long today.

DECLARE @Calendar1 AS DateTime
SET @Calendar1 = '{{{ Please choose a start date. }}}'
SELECT
('0' + CONVERT (varchar (10), W.WorkerID)) AS VendorID,
(W.FirstName + ' ' + W.LastName) AS VendorName,
(W.FirstName + ' ' + W.LastName) AS Contact,

[code].....

Where did I go wrong?

View 3 Replies View Related

OLE DB DataSource W Stored Procedure Not Populating Column Metadata

Mar 28, 2006

I'm having some issues getting OLE DB Data Sources to work w stored procs in SSIS. Here's the situation.

I have an OLE DB Data Source set up to call a stored proc w no parameters. The stored procedure loops through a set of databases and inserts data from each database into a results table. I'm attempting to return the results table to SSIS, but the Available External Columns are not populating. However, previewing the query in SSIS does show results. The insert in to the results table is done by a call to sp_executesql.

I've tried setting the results table up as a temp table, table variable, and static table. I have NOCOUNT set ON and am only returning one recordset. I've seen the other threads in here about similar problems, but none of their solutions seem to work for me.

Any help would be much appreciated....

View 2 Replies View Related

Error: The External Metadata Column Collection Is Out Of Synchronization With The Data Source Columns

Apr 17, 2007

Hello,

I have a SSIS package with a Data Flow task. This task transfers the data from SQL Server 2000 to a table in SQL Server 2005.



I deployed and tested this package on the Test Server. Then put this package in a job and executed it - Works fine.



On the production server- If I execute the package through DTEXECUI, it works fine. But when I try executing it through a job- the job fails and it gives me following error:

Description: The external metadata column collection is out of synchronization with the data source columns. The "external metadata column "T_FieldName" (82)" needs to be removed from the external metadata column collection....



What I don't understand is, why are there no errors displayed when I execute the package through DTEXECUI.



Can anyone help me to resolve this issue.



Thanks.

View 3 Replies View Related

[Excel Destination [91]] Error: Cannot Create An OLE DB Accessor. Verify That The Column Metadata Is Valid.

Apr 19, 2008


I was trying to get my data from olb table to excel. but i got this error
my dataflow is as follows:
oledb source-> excel destination

i have got a excel file template at the destination all ready.
with the column names+ the sheet all ready.
but somehow it got stuck...
anybody can help?
thanks!

View 8 Replies View Related

Store Procedure To Load Data From Flat File To Staging Table Dynamically - Column Metadata

Apr 9, 2015

I am having one store procedure which use to load data from flat file to staging table dynamically.

Everything is working fine.staging_temp table have single column. All the data stored in that single column. below is the sample row.

AB¯ALBERTA ¯93¯AI
AI¯ALBERTA INDIRECT ¯94¯AI
AL¯ALABAMA ¯30¯

After the staging_temp data gets inserted into main table.my probelm is to handle such a file where number of columns are more than the actual table.

If you see the sample rows there are 4 column separated by "¯".but actual I am having only 3 columns in my main table.so how can I get only first 3 column from the satging_temp table.

Output should be like below.

AB¯ALBERTA ¯93
AI¯ALBERTA INDIRECT ¯94
AL¯ALABAMA ¯30

How to achieve above scenario...

View 1 Replies View Related

How To Get The Description ?

Jul 27, 2005

Hi,I have a SQL that is working fine:
SELECT DISTINCT T1.ATCkod FROM ATC_tot T1    JOIN ATC_tot T2 ON T2.ATCkod = T1.ATCkod and T2.Typ_lakemedel LIKE '%' + @Kod2 + '%'    JOIN ATC_tot T3 on T3.ATCkod = T1.ATCkod AND T3.Typ_lakemedel LIKE '%' + @Kod3 + '%'    WHERE T1.Typ_lakemedel = @KodNow I need to have a description together with the ATCkod, tablename ATC columnname ATCdesc. ATC_tot.ATCkod = ATC.ATCkod. I have tried Inner join without success. Any good suggestions ...?

View 1 Replies View Related

How Can I Set Description Property By T-SQL ?

Jun 6, 2007

I would like to create table by T-SQLand need to specify DescriptionBut I can't find any sample to add Description property by T-SQL  Additionally, I also would like modify Description property by T-SQL. What can I do ?????  Please help me ...... 

View 2 Replies View Related

Description Field

Sep 30, 2004

Hi

Getting an error on the following SQL. The field in question is the Description field which has * in the description. Not sure how I should have the SQL to solve this

UPDATE Taylors
SET Area=::Area::,Avail=::Avail::,Address=::Address::,Type=::Type::,Price=::Price::,Bedrooms=::Bedrooms::,HotProps=::HotProps::,Office=::Office::,Description=::Description::
WHERE RefNo =::RefNo::


Database Results Error
Description: [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression '* modern retirement flat * double bedroom * south lounge * fitted kitchen * good size bathroom * communal gardens * residence parking *'.
Number: -2147217900 (0x80040E14)
Source: Microsoft OLE DB Provider for ODBC Drivers

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved