Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Query Parameter for Oracle thru VB.net

Posted on 2006-07-06
2
Medium Priority
?
1,131 Views
Last Modified: 2008-03-17
Hi,

I am trying to convert a VB report written for SQL database to work against Oracle db.  The SQL db statement was:

select t1.a, t1.b, t2.c
from table1 t left outer join table2 t2 on t1.a=t2.a
where t1.a = @Parameter1

When I try to use the same syntax for the Oracle backend, I get a missing expression error, ORA-00936.  Is there an alternative way I have to define parameters for Oracle (rather than the @)?  

I did take case sensitivity into account for field names.

Thanks,
Dee
0
Comment
Question by:dpozega
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 25

Expert Comment

by:jrb1
ID: 17053178
Where are you running this?  From a program, or just in SQL*PLUS?

If just in SQL*PLUS, then run:

select t1.a, t1.b, t2.c
from table1 t left outer join table2 t2 on t1.a=t2.a
where t1.a = &Parameter1;
0
 
LVL 14

Accepted Solution

by:
sathyagiri earned 1000 total points
ID: 17053274

select t1.a, t1.b, t2.c
from table1 t left outer join table2 t2 on t1.a=t2.a
where t1.a = :parameter1

0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

618 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