MySQL Forums
Forum List  »  General

Re: Passing variable to SQL script
Posted by: Anthony Willard
Date: July 02, 2007 01:30PM

I do not believe there is a way to pass in parameters to a SQL script.

I controlled this by how I created the SQL script itself. First, I created a master script that contained the SQL I wanted to execute with the variable parts clearly identified (like ##WHERE_CLAUSE##), then would run a sed script to manipulate the resultant script, making whatever substitutions were needed, to a temporary script, then executed that temporary script against the database.

It's not perfect, but it solved my problem.

Options: ReplyQuote


Subject
Written By
Posted
Re: Passing variable to SQL script
July 02, 2007 01:30PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.