Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 unable to do sp_help

Author  Topic 

kvishnuprasad
Starting Member

13 Posts

Posted - 2008-06-27 : 11:44:43
HI
I have a table with the name BMC_BMC_HardwareSystemComponent_
adn i tried "sp_help BMC_BMC_HardwareSystemComponent_"
it gives anerror can any one tell me whats the problem.
same with "sp_help User"

Regards,
Vishnu

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-06-27 : 11:48:50
What are you trying to do?
Go to Top of Page

kvishnuprasad
Starting Member

13 Posts

Posted - 2008-06-27 : 11:51:26
I want to see all the column names of table "User" and "BMC_BMC_HardwwareSystemComponent_",
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-06-27 : 11:55:49
You can see all informations with

sp_help 'tablename'
Go to Top of Page

kvishnuprasad
Starting Member

13 Posts

Posted - 2008-06-27 : 11:59:36
Yeah I can see for all the tables except for few where they ahave a big table name
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-06-27 : 12:02:04
quote:
Originally posted by kvishnuprasad

Yeah I can see for all the tables except for few where they ahave a big table name


so what that doesnt matter. you can still run sp_help on them
Go to Top of Page

kvishnuprasad
Starting Member

13 Posts

Posted - 2008-06-28 : 09:52:57
sp_help doesnot work if the table name is more than 30 chars..
any help??????
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-06-28 : 13:47:13
quote:
Originally posted by kvishnuprasad

sp_help doesnot work if the table name is more than 30 chars..
any help??????


i dont think there's such a problem. what was your table name? what error did you get when you used sp_help?
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-06-28 : 14:51:18
It will list all columns of all tables in your database:

SELECT ST.Name,SM.NAME
FROM SYS.OBJECTS ST INNER JOIN SYS.COLUMNS SM
ON ST.OBJECT_ID = SM.OBJECT_ID
WHERE ST.TYPE = 'U'
ORDER BY ST.NAME, SM.NAME

Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-06-28 : 22:50:16
Or just query information_schema.columns.
Go to Top of Page
   

- Advertisement -