Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2005

    Question Unanswered: Stored Procedures-Is there any way to circumvent it taking the variable "literally"

    I have an issue where I am passing variables from my asp page to the stored procedures. In some cases the variable is a value (string) but in some I need it to the wildcard (where columnname=columnname). Everything fires off great when variables are fed in (obviously) but the default is the columnname, the stored procedure is taking it as a literal string. I really don't want to have to use execute select statements in my script but it is looking like it at this point. Does anyone know anyway I can circumvent this? I know I could use If clauses but this is for an app that has multiple dropdowns and each dropdown is dependant on the other so the if statments will grow to be about 12 deep which is inefficient.

    Thank you!
    Last edited by Buckles; 03-18-05 at 11:26. Reason: More Clarification

  2. #2
    Join Date
    Jun 2003
    West Palm Beach, FL


    You can try using dynamic sql: EXECUTE IMMEDIATE <statement>;
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts