473,322 Members | 1,540 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Urgent: Input of values (that is, dynamic queries)

How can I execute a query which prompt the user for input?
Something like
SELECT [target list]
FROM Table
WHERE Name=[value input from user]

In Oracle PL/SQL, you use & before variable names to have the SQL*Plus
ask for input.
In Postgres PLpg/SQL, I read that the EXECUTE statement should let you
do something like this, but I tried
EXECUTE 'SELECT * FROM Employeers WHERE id=' || quote_literal(emp_id);
and the psql client tells me
ERROR: syntax error at or near "'SELECT * FROM Employeers WHERE id='"
at character 9
LINE 1: EXECUTE 'SELECT *.....
^
Could you help me, please?
Sep 24 '05 #1
0 1355

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: David | last post by:
Hi, I have a quick question. I have a .asp application in which certain parts, clients can now edit/update/add information to their records in our DB. I basically use an include statement at...
4
by: John | last post by:
Hi all, I have posted this type of question quite a few times but to date, no-one has actually been able to provide me with a solution. I really need to understand how to do this properly. My...
1
by: Jack Bauer | last post by:
How can I execute a query which prompt the user for input? Something like SELECT FROM Table WHERE Name= In Oracle PL/SQL, you use & before variable names to have the SQL*Plus ask for input....
7
by: serge | last post by:
How can I run a single SP by asking multiple sales question either by using the logical operator AND for all the questions; or using the logical operator OR for all the questions. So it's always...
3
by: Dotnet Gruven | last post by:
I've built a WebForm with a Table added dynamically in Page_Load when IsPostBack is false. The table includes a couple of TextBoxes, RadioButtonLists and CheckboxLists. On postback, those...
14
by: Frank Swarbrick | last post by:
A few weeks ago I had posed a question about how one my create a cursor for a query where the predicate condition is dynamic. Meaning that the query might want to have one of several possible...
1
by: itsraghz | last post by:
Hello All, I am using a Dynamic SQL Statement inside a Stored Procedure. I am using IBM DB2 V8.1 database. When i want to have the values to be filled in dynamically, i use the parameter...
1
by: caiaphas | last post by:
hi, Im trying to make a trigger that monitors the deletes and updates on a table. I will use this design for many tables so Im trying to make it as dynamic as posible. Im trying to build a...
6
by: jenipriya | last post by:
Hi all... its very urgent.. please........i m a beginner in oracle.... Anyone please help me wit dese codes i hv tried... and correct the errors... The table structures i hav Employee (EmpID,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.