Matt Wright (9/22/2011)
As others have mentioned, I have CTRL+0 set up as "SELECT * FROM", Yes, I know it's bad using SELECT * but picking 50 is arbitrary and I usually need to see more rows. Besides, this is only in our DEV environment that I use this.
As far as working for other schemas, mine works fine as long as I highlight the schema name with the table name. So to select all rows from the person.person table, I would highlight "person.person" and then hit CTRL+0. Easy as pie.
In fact, I get so used to it that I find myself "CTRL+0'ing" in our production environment and wondering why I get no rows back...lol
Could you please put me through this.I think I have not get it right. I ran the s procedure on against Production.Product, set up the shortcut keys and then press the keys afterward. All I got was error. Below is how I did it:
CREATE PROCEDURE dbo.sp_select
DECLARE @cmd NVARCHAR(255)
SET @cmd ='SELECT TOP 50 * from '+ @product
EXEC sp_executesql @cmd
Production.Product --This (Production.Product) was then highlighted. But I got this error:
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near '.'.
Please give details.