Table Description Information

Jul 20, 2000

In oracle there is a describe command:
describe table_name
This command will tell you the columns names, datatypes, and length of the columns for that particular table. Does anyone know if there is a simliar command in SQL server that would do that? The only way that I have found so far is to do a join of the syscolumns with sysobject by table name.

View 2 Replies


ADVERTISEMENT

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

Transact SQL :: If Not Exists Some ID In One Table Then Insert ID And Description In Another Table

Jul 14, 2015

I need to find out if a Transaction ID exists in Table A that does not exist in Table B.  If that is the case, then I need to insert into Table B all of the Transaction IDs and Descriptions that are not already in. Seems to me this would involve If Not Exists and then an insert into Table B.  This would work easily if there were only one row.  What is the best way to handle it if there are a bunch of rows?  Should there be some type of looping?

View 12 Replies View Related

Get Description In Table

Jul 20, 2005

i want get fields description in structure tables that i madetables.please help me for resolve this problem .thank you

View 2 Replies View Related

Table Description

Jul 20, 2005

Hi All,In SQL Server how can I get the descriptions of tables in adatabase?From MSDN help I could find a way to get the description of columnsusing the following extended propertySELECT *FROM ::fn_listextendedproperty (NULL, 'user', 'dbo', 'table','Reports', 'column', default)ThanksRegardsSobhan

View 1 Replies View Related

Adding A Table Description

Jul 31, 2007

Hi everyone,

I'm using SQL 2005. I want to add a description for each table on my database. How do I do that? I know I can add a description to each field, but how do I add a description to each TABLE? I tried going to Properties but don't see anything.

Grateful for any help. Thanks.

View 12 Replies View Related

File / Table Description.

Aug 24, 2005

Newby question but can't find it myself.How can I get a file-description from a file / table ?eg. the decription must deliver the following info:Record nr.Field nr.FieldnameField descriptionData typeLenghtDecimalsetc....Can somebody please tell me what to do?ThanxMF

View 5 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

Description Field In Subscriptions Table

Apr 10, 2007

The Description field in SQL Server 2005 Reporting Services just defaults to "Send e-mail to email@domain.com" (obviously a dummy e-mail address) when you create an e-mail subscription. You cannot edit the Description when you select "Edit" beside a subscription.



The Description may be edited directly in the Subscriptions table under the ReportServer database but this is not end-user friendly.



I thought of using an add/update trigger to set the Description to the "Subject" out of the Extension Settings field. The Extension Settings field is XML so you would have to parse the Subject out of there first. The "Subject" is the e-mail Subject for the e-mail that is sent to the subscriber and it much more adequately describes the report.



My boss understood what I wanted to do but wanted to make sure in the industry literature that the product was not that lacking. Hard to believe that you cannot directly edit the Subscription Description through the web browser interface - would love for someone to prove me wrong.

View 5 Replies View Related

Any T-SQL Command Can Show The Description Of Specified Table Columns?

Mar 22, 2004

I want to ask something because i need.

Any SQL/T-SQL command inside MsSQL Server 2000 can show the description of {all table columns or specified table columns} of specified table inside specified database?

can you teach me how to do and any example(s)?

View 2 Replies View Related

How To Store Bullet-form Description In A Table ?

Apr 24, 2004

Assume that if i have a product called Jacket that has the following descriptions, which written in bullet form

• 600 Denier Carbolex® coated 1000mm Polyurethane
• Anatomically fitted for the riding position
• Ballistic nylon in protective areas
• FS Rainguard® 100% waterproof/breathable jet-liner
• Polyester mesh non-allergenic liner
• Removable CE armour equipped in the hips and knees
• Padding at knees, shin, hips and kidney area
• Removable zip-out satin quilted liner
• Reflective Phoslite®
• Stretch in the knees
• Gusseted with Velcro front zip closure
• Velcro adjustable waist
• 2 front pockets
• Storm flap system


How am i going to store in the Products table ? But not all products have these descriptions, other products may have no description at all.... If I store them in a text/memo DESCRIPTION field, then , I do not know how to format them into bullet form...


I would appreciate anyone knows the solution for me... Thanks in advance !

View 4 Replies View Related

Read Table Description Into ADODB.Recordset.

Aug 20, 2003

How do I read the Tables description into ADODB.Recordset and then recreate the Tables+description into a new database from the ADODB.Recordset.

View 1 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

Transact SQL :: Getting Hashtags From Description And Placing Them In Another Table

Apr 27, 2015

I have a question regarding saving hashtags in another table. I have two tables with these columns:

Table1
ItemId, Name, Description (it may contains several hashtags like this example "hey I am an #example of this #question")

Table2
HashtagId, ItemId, Hashtag

So I want to detect #example and #question and put them in Table2. I'd like to create a trigger for table1 that if there was a hashtag, it added a record in table 2.

CREATE TRIGGER [dbo].[tr_Events_ForInsert_Hashtag]
ON Table1
FOR INSERT
AS
BEGIN
DECLARE @ItemId bigint
SELECT @ItemId  = ItemId FROM inserted

[Code] .....

View 3 Replies View Related

How To Select Description When Retrieving Data From Quote Table

Mar 11, 2014

I have 'codes' and 'Description' field in 'ecode' table and 'codes' in quote table values for 'Codes' in quote table is like

Quoteid Codes

0012 LB,WS
0031WDC

In 'ecode' table 'description' column contain the description for each code

for eg :

Ecode Table : -

Codes Description
Lb - Late Booking
WS - Winter Sports
WDC - Wedding Cover

How to select 'description' when retrieving data from quote table

View 2 Replies View Related

Retrieval Of The Description Of A Field In A SQL Server 2000 Based Table

Jun 1, 2006

I live in Brazil, and use SQL Server 2000 SP4 with Visual Basic 5.0 SP3, with connectivity to ODBC through RDO/ADO.

I have an example table with the following structure:

Table Name: Autioneer's (translated from Portuguese)

'Field 1/3
Name: Code
DataType: int
Description: Auctioneer's Code

'Field 2/3
Name: Name
DataType: nvarchar(50)
Description: Auctioneer's Name

'Field 3/3
Name: RegNum
DataType: nvarchar(20)
Description: Auctioneer's Registration Number

I need a way to programatically extract the Fields Description Property from the table

example sintaxe:

SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME ='AUCTIONEERS'

Thanks for any help that can be offered here
Neil Ramkeerat.

Replies can be sent to neilramkeerat@hotmail.com

View 3 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

How To Dynamically Enter Error Code And Description In A Pre-define Table?

Aug 4, 2006

Hi,

I want to implement error handling my SSIS package. for this I am putting an execute SQL task for a container(which contains different interlinked tasks) in event handler.

Say my first task fails in this container.Immedaitely my sql task which inserts the error code and description should exceute in the event handler and populate my error table in OLAP database.

Any help will be great SSIS gurus.

Thanks in advance.

Regards,

Aman

View 4 Replies View Related

Query To Only Display Information From One Table Where The Foreign Key Doesnt Exist In The Other Table.

Nov 28, 2006

I want to make a query, stored procedure, or whatever which will only display the primary key where there does no exist a foreign key in linked table.For example. If I had two tables with a one to many relationship.A [Computer] has one or more [Hard Drives]. I want to select only those computers which do not have a Hard Drive(s) associated with them. That is, show all computers where the Computer_ID field in the [Hard Drives] table does not exist. This seems simple but I'm drawing a blank here. 

View 1 Replies View Related

Table Information In Sql Server

Feb 21, 2008

Hi,
In my Sql Sever i have added one Database "Devtools", by restoring it from .bak file. Now In my asp page I want to Display a Datagrid with data from a table "Devices". I want to Generate the Gridview dynamically. The columns in the table are dynamic they are not constant so I want to generate my Gridview dynamically. So I want to get the columns info of the table and based on that I want to dynamically add the columns to the table.  So how to get the info of the table first. Is there any query where i can get the table info

View 3 Replies View Related

Retreiving Table Information With SQL

Mar 5, 2004

Hello:

I have an app that needs to retrieve the list of tables in an SQL database. I see that there is a way to do this with the OLEdb provider (GetOleDbSchemaTable() ), but I can't find a sibling method in SQL. IS there one/ Any Ideas?

Mike

View 4 Replies View Related

How To Get Table And Column Information

Aug 18, 2000

Okay, I'll admit it: I am not a Guru. Far from it. So here is one of the zillion tasks I cannot do - unfortunately it is one that I need to have done... :

I need a recordset containing the Name, Datatype, Size, Precision, and Name_of_parent_table of all columns in all non-system tables in a given database.

Most likely this can be accomplished with one or two SPs, but which ones? And how?


Is there any Kind Soul out there, perhaps?

Peter

View 5 Replies View Related

Printing Only Certain Information From The Table Using Php

Jul 30, 2004

i need help printing only certain rows from within a table.. for instance, if my table looks like this :
+-------------------+----------------+----------------------+
| Description | Heading | Link |
+-------------------+----------------+----------------------+
| Google | Heading 4 | www.google.com |
| Toms Hardware | Heading 3 | www.tomshardware.com |
| Anandtech | Heading 2 | www.anandtech.com |
| check this out | Heading 1 | www.henryadams.com |
| another heading 4 | Heading 4 | www.heading4.com |
| test | Heading 3 | www.test3.com |
| heading 4 agagin | Heading 4 | laksjdf;alkf |
| new heading test | newHeadingTest | www.newheadingtest |
+-------------------+----------------+----------------------+

and i want to only print out the results for "Heading 4" under the "Heading" column, and only have the results print out once, using php.. how would i do this?

The Headings are inputed by the user through a web interface i created where the user may either select an exisiting heading or type in a completely new one that has nothing to do with any of the others.

thanks for any and all of your help..

View 1 Replies View Related

Getting Column Information From Table

Jan 7, 2006

Hi,

Is it possible to retrieve column information alone in the sp_columns command? I saw that it has an additional option "@column_name". But when I include it in my sql, it doesn't work the way I had expected it to..

I had tried sp_columns @table_name='mytable', @column_name='COLUMN_NAME'

I expect just the column names alone in the resultset. What am I doing wrong here?

Thanks and Regards,
Celia.

View 1 Replies View Related

Extracting Information Outside A Table

Feb 22, 2008

Hi,

I have two tables - a stock table and a transaction table. The stock table is called stock and the transaction table is called trans. The table make a point of sale database. Both table have a joining field called prod_no.

I want to extract the stock line by querying stock.prod_no that are not present in the trans table for a period of time specified.

Basically, I want to find dead stock lines that have not been sold and, therefore, are not in the transaction table but that have a stock figure. I have to enter in a start and end date paramater using the ddate field in the trans table. I have looked at left, right and outer joins but with no luck and don't even know if this is the correct query type to use.

any help would be much appreciated,

View 4 Replies View Related

Help With Getting Table Information From Sqlserver

Jul 20, 2005

I am new to using sqlserver and have been given the task to get the columnname, data type and the description from a given table and put this intoanother table. Can this be done?Thanks in advance.Jeff Magouirk

View 2 Replies View Related

Table Information From SQL Server

Mar 14, 2008

Hi

I have a problem I am trying to ascertain the quality of the data in the table of a system we are migrating from one database to another.

We have already taken the step of converting it into SQL server to make sense of it now I wnat to query the data itself

To do this I set up a query that went through sysobjects and syclumns and listed the tables and their columns

What I want to do now is use this information to query the data elements themselves to determine where we should concentrate our data mapping on.

I started out with a cursor doing this
declare @table varchar(50)
declare @col varchar(50)
declare @result int
declare count_cursor cursor scroll
for select tname,cname from infotemp
open count_cursor
fetch from count_cursor
into @table,@col
while @@fetch_status=0
BEGIN
exec ('select count('+@col+') from '+@table)
Fetch next from count_cursor into @table,@col
END
close count_cursor
deallocate count_cursor

But I am having problems getting the counted value into the result value from the exec statement

Anybody got any ideas

Thanks

View 4 Replies View Related

Serious Trouble Getting Database Table Information

Feb 7, 2001

I would like to know how to (if it is at all possible) in SQL (or even ADO) to retrieve all the data concerning database X's

a) Tables
b) Tables column names
c) Tables column's data types

I don't want to use the doa.tabledefs object.. .i would prefer to do it in SQL, but using ADO objects (since I am developing stuff in VB) would be ok too.

Please Help.. i have been going crazy trying to find anything useful.. email me back please!

Thanks,
Matt

View 2 Replies View Related

Get Table Information With Stored Procedure?

Apr 6, 2008

Hi,

I have a database with two handred tables.I want to get a list that have table name and numbers of record in each table.

Would you please give me a idea if you know how to do this with query or build-in stored procedure.

Thanks a lot

Mark

View 1 Replies View Related

Database/Table/Column Information

Jan 17, 2007

Hi,
I need to provide a report that lists the databases in each instance, then the tablenames and the number of rows in each table.

Is there any easy way to do this in SQL 2005?

Cheers
Gregg

View 8 Replies View Related

How Do I View Table Information Such As Constraints?

Sep 19, 2007

I remember once using a command in Query Analyser that gave me all theinformation about a table. It showed details about the columns,constraints, keys, indexes etc.I can't remember how I did this? Can anyone help me?It could of been a stored proc that I called or a query on the systemtables.I do know that it was very simple to do and it was executed in QueryAnalyser.Can anyone help me?

View 2 Replies View Related

Transact SQL :: Inserting Information From One Table Into Another?

Aug 12, 2015

I am working on moving information from one of our databases into a newer one the company has recently setup. I am working in MS SQL Server 2012 and am trying to Inset/Update (depending on the information) a part table. I will list the two tables I am working on as Old (where I am getting the information) and New (where it is to be inserted into).

The old table has about 250 columns of information, most of which is not needed. The needed information is as follows: Name, ID, Component1, Component1_PIN,Component1_SN, Component1_Description, Component2, Component2_PIN, Component2_SN. The component section repeats up to Component12.

The new table has columns setup as such: Name, ID, Case, CasePIN, CaseSN, Case_Desc, Processor, ProcessorPIN, ProcessorSN, Processor_Description, Memory, MemoryPIN, MemorySN, Memory_Description, etc.

The issue I am having is that in the old table each component can have Case, Processor, Memory, etc in that one column. I need to insert Case, Memory, etc into the correct column in the new table while keeping intact the rest of the information. 

Example:

Old Table
Name | ID | Component1 | Component1_PIN | Component1_SN | Component1_Description | Component2 | Component2_PIN | Component2_SN | Component2_Description
Nest8 | 5682 | Case | 901834 | 237848117 | Black, rectangular | Memory | 9081234 | 5398798134 | NULL
Nest8 | 5978 | Case | 901463 | 237848138 | Black, rectangular | Processor | 2394875 | 2903857809 | Bad
Reds3 | 5683 | Memory | 2405 | 89752342 | Crucial | HardDrive | 92387595 | 457982234 | NULL
Bass | 5644 | HardDrive | 79872346 | 5321675789 | NULL | Case | 10984528 | 3498769872 | NULL

I am not sure how to loop through and grab each part and place it in the column it needs to be while keeping it with the ID. 

View 7 Replies View Related

How To Show Description In Report Instead Of Code (Desc For Code Is In Master Table)

Mar 28, 2007

Dear Friends,



I am having 2 Tables.

Table 1: AddressBook
Fields --> User Name, Address, CountryCode



Table 2: Country
Fields --> Country Code, Country Name


Step 1 : I have created a Cube with these two tables using SSAS.



Step 2 : I have created a report in SSRS showing Address list.

The Column in the report are User Name, Address, Country Name



But I have no idea, how to convert this Country Code to Country name.

I am generating the report using the Layout tab. ( Data | Layout | Preview ) Report1.rdl [Design]



Anyone help me to solve this issue. Because, in our project most of the transaction tables have Code and Code description in master table. I need to convert all code into corresponding description in all my reports.




Thanks in advance.





Regards
Ramakrishnan
Singapore
28 March 2007

View 4 Replies View Related







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