Extracting data from an Oracle database using TableAdapters

S

Steve Kershaw

I have a need to extract data from an Oracle database using an SQL
query. The problem is that I need to insert a parameter into the query.
For example:

SELECT EMPLOYEE, DED_CODE FROM QUARTDED WHERE STATE = @STATE

The problem is that the "@STATE" Dosen't work. When I try to execute
the query in Query Builder I get a Invalid column error.

Further the query changes from WHERE STATE = @STATE to WHERE STATE =
"@STATE".

I'm a SQL Server guy and this works on SQL Server 2005. Can anybody
help please!
 
A

asflp

Hi Steve

Oracle uses a colon to bind variables, try substituting a colon for the
@ sign.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top