Options

Stored Procedure disables prompting

brettbrett Posts: 2
edited March 15, 2010 6:05AM in SQL Prompt Previous Versions
We just bought SQL Prompt here at work and I've found a peculiar issue. We have a Stored procedure template that we use for our templates. When I tried to use it today though I found that SQL prompt stopped prompting. So I started a new query and it worked just fine. So then I started copying code over a piece at a time until it stopped prompting. It turned out that the following line is what would cause it stop prompting
--CREATE PROCEDURE prc_saleTranxHistory 
--	@executionDate datetime = getdate()
--AS
--BEGIN

If I comment the create procedure line it starts working again. Kind of annoying though, because I work on a lot of stored procedure scripts and I need SQL prompt to work while I'm working on them.
I don't care to be witty. Have a nice day.

Comments

  • Options
    Anu DAnu D Posts: 876 Silver 3
    Many thanks for your post.

    I tried to replicate your issue and found a syntax error in your code near GETDATE
    Can you kindly try using this code instead?
    CREATE PROCEDURE prc_saleTranxHistory
      @executionDate DATETIME = GETDATE 
       
    AS
    Begin
    
    End
    

    As you see the code you pasted is not parsed by management studio as it throws error and as it is erroneous SQL prompt stops prompting.

    Can you amend your code to above code and let me know whether it works for you or not?
    Anuradha Deshpande
    Product Support
    Redgate Software Ltd.
    E-mail: support@red-gate.com
  • Options
    Anu DAnu D Posts: 876 Silver 3
    Did the above suggestion solved the purpose?

    Kindly let me know if you need any help.
    Anuradha Deshpande
    Product Support
    Redgate Software Ltd.
    E-mail: support@red-gate.com
Sign In or Register to comment.