• What he's trying to do is set up a key code to run a procedure, so that he can highlight a section of text in a query and hit the key code to run the query with the selected text as a parameter. This is exactly the same as highlighting text and hitting <ALT-F1> to run sp_help on the selected text.

    Unfortunately, this feature doesn't add quotes around the selected text, so if you want to use this feature on more than just a base table, the text selected will have to include the quotation marks. Since putting quotation marks around the entire name, i.e. 'your_schema.your_table' instead of 'your_schema'.'your_table', will break anything but dynamic SQL even if your database is set up to use quoted identifiers, your desired functionality is not going to have much utility.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA