Free hand sql with prompt variables

Richard Sharpe

Free hand sql with prompt variables
I too am looking for away to do this, like Oracle, Sybase used a similar
syntax, but I have been unsuccessful in DB2

Thanks

Rich

-----Original Message-----
From: Damien Blood [mailto:[login to unmask email]
Sent: Thursday, January 10, 2002 9:43 AM
To: [login to unmask email]
Subject: [DB2-L] Free hand sql with promt variables


Hi All,

Is there a way in DB2 that you can
write basic sql and it will prompt you
for variable input.

i.e. In oracle you could use:

select * from emp
where mgr_no = &ID
order by emp_no;

Then it would prompt you for &ID.

Enter value for ID:

Is there a similar method in DB2?

I am writing some freehand sql in a Business Objects
front end application and I want it to prompt users
for input.

Any ideas?

Cheers

Regards

Damien Blood
Support Consultant


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

Should you require further information please contact
us using the details below.

website: http://www.acuma.co.uk
email: [login to unmask email]
**********************************************************************








Andrew Laredo

Re: Free hand sql with prompt variables
(in response to Richard Sharpe)
I believe the issue here is not DB2, but rather who is processing the SQL
before it is handed off to DB2. Some guys said they wrote this using Rexx,
some pointed out QMF has a feature for this....the DB2 precompile, prepare,
execute is not handling this, its in front of db2...

but you need to find the feature in Business Objects as that is your front
end. (this came from chiefly a MF guy, so take it with a grain of salt).


Andy

Andrew Laredo
Senior Software Consultant
BMC Software
1270 6th Ave.
New York, New York
212-218-4493 (office)
212-218-1666 (fax)
bmcsoftware

-----Original Message-----
From: Damien Blood [mailto:[login to unmask email]
Sent: Thursday, January 10, 2002 9:43 AM
To: [login to unmask email]
Subject: [DB2-L] Free hand sql with promt variables


Hi All,

Is there a way in DB2 that you can
write basic sql and it will prompt you
for variable input.

i.e. In oracle you could use:

select * from emp
where mgr_no = &ID
order by emp_no;

Then it would prompt you for &ID.

Enter value for ID:

Is there a similar method in DB2?

I am writing some freehand sql in a Business Objects
front end application and I want it to prompt users
for input.

Any ideas?

Cheers

Regards

Damien Blood
Support Consultant


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

Should you require further information please contact
us using the details below.

website: http://www.acuma.co.uk
email: [login to unmask email]
**********************************************************************