Basic parameter passing to sql script
921009Apr 11 2012 — edited Apr 12 2012Hi all,
Another newb question. I want to write a sql script that accepts a couple of command line parameters from the shell.
I've read that &1 will reference the first parameter and &2 the second and so on.
What is the proper way to capture the values in a variable in my script and test them for not being null, for being legit numbers, for there only being 2 parameters and for the second being larger than the first. Basic stuff in most languages, but I'm having trouble googling for good sql examples.
Thank you,
Scott