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.
| Author |
Topic |
|
new2this
Starting Member
16 Posts |
Posted - 2008-05-07 : 14:37:41
|
| I have to create a stored procedure that accepts a column name and returns the name of the tables that have that column name. I'm not sure how to get it to accept the column name. Here's what I have so far:create proc spTheNameOfTheProcedureasselect table_name from information_schema.columnswhere column_name = XXXXXXno sure what to put where I have XXXXX |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-05-07 : 14:44:23
|
| create proc spTheNameOfTheProcedure(@columnName nvarchar(128))asselect table_name from information_schema.columnswhere column_name = @columnNamegoTara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Database maintenance routines:http://weblogs.sqlteam.com/tarad/archive/2004/07/02/1705.aspx |
 |
|
|
new2this
Starting Member
16 Posts |
Posted - 2008-05-07 : 15:17:53
|
| Thanks |
 |
|
|
|
|
|