Solved

Firebird ISQL, can I prompt user to pass variable to script

Posted on 2008-10-08
4
1,080 Views
Last Modified: 2013-12-09
I need to create a batch file that runs an sql query and prompts the user to enter in variables. Its really the simplest of queries.

update invoice set departmentid=1 where invoiceno=@uservariable

it should loop until the user presses esc or something like that, is it possible?

0
Comment
Question by:lagg2007
  • 2
  • 2
4 Comments
 
LVL 19

Accepted Solution

by:
NickUpson earned 250 total points
ID: 22671530
not in isql solely, I could do it with a unix shell script so it probably can be done in a dos shell

the code would be something like

prompt for invno
while invno != 0
  isql <params>
    update invoice ...
    commit;
    exit;
prompt for invno

looping outside of the isql itself


0
 

Author Comment

by:lagg2007
ID: 22676444
Sounds like it could be what im looking for, but ive not a clue how to call that in a dos script, could you give me a hand?
0
 
LVL 19

Expert Comment

by:NickUpson
ID: 22676692
sorry, dos scripting not my area, now if you were using a proper operating system, say linux, :)
0
 

Author Comment

by:lagg2007
ID: 22677294
Thanks for help mate! i know ifs and buts. The software isnt supported on linux:(
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: I have seen many questions on EE and elsewhere, asking about how to find either gaps in lists of numbers (id field, usually) ranges of values or dates overlapping date ranges combined date ranges I thought it would be a good …
Read about achieving the basic levels of HRIS security in the workplace.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now