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 |
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-09-13 : 06:32:06
|
Priya writes "HelloI want select col_name('itemMaster',2) from itemmaster where itemcode='111'i want 2 in col_name which is name of item directly from item master without executing sp_executesql" |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-09-13 : 06:39:30
|
[code]select col_name(Object_ID('itemMaster'),2) from itemmaster where itemcode='111'[/code]I am not sure what you want, but you should give table id as first parameter to Col_Name() function.Harsh AthalyeIndia."Nothing is Impossible" |
 |
|
|
|
|