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 |
|
riya.johnson
Starting Member
17 Posts |
Posted - 2009-09-17 : 08:01:38
|
| Hi,I am running exec sp_configure "Cross DB Ownership Chaining"Now I want to display on the current setting in the database.So I want only run_value to be displayed & ignore the other columns.Please guide meRegardsRiyaRiya Johnson |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2009-09-17 : 08:02:42
|
| display where? Filter the results in your front end.http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspxHow to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspxFor ultra basic questions, follow these links.http://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
 |
|
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2009-09-17 : 10:34:00
|
| [code]DECLARE @mytable table ( name varchar(100), minimum int, maximum int, config_value int, run_value int)INSERT INTO @mytableexec sp_configure "Cross DB Ownership Chaining"select run_value from @mytable[/code]- Lumbago |
 |
|
|
riya.johnson
Starting Member
17 Posts |
Posted - 2009-09-18 : 00:52:08
|
| Its not working. It is displaying the following message"EXECUTE cannot be used as a source when inserting into a table variable."Riya Johnson |
 |
|
|
timmy
Master Smack Fu Yak Hacker
1242 Posts |
Posted - 2009-09-18 : 01:36:26
|
| Change Lumbago's script from using a table variable to using a temp table:CREATE TABLE #Mytable instead ofDECLARE @myTable TABLE |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-09-18 : 02:25:02
|
| Note that outputing to table variable by executing the procedure works only from the version 2005MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|