473,397 Members | 2,116 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,397 software developers and data experts.

Extracting data from an Oracle database using TableAdapters

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!

Nov 9 '06 #1
2 1863
Hi Steve

Oracle uses a colon to bind variables, try substituting a colon for the
@ sign.
Steve Kershaw wrote:
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!
Nov 9 '06 #2
Thanks that worked just fine!!!

Steve

asflp wrote:
Hi Steve

Oracle uses a colon to bind variables, try substituting a colon for the
@ sign.
Steve Kershaw wrote:
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!
Nov 9 '06 #3

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

Similar topics

0
by: otto | last post by:
Hi, all: We have a Windows application that make operations against an Oracle database. The business logic components are in the server and are accesible from the client interface trought a...
1
by: Master Ken | last post by:
Hi All, I'm very new to C# and ASP and I am asking for some help as I don't really know where to start on this project. Some background info first I run a report each week which outputs data...
3
by: chirag1989 | last post by:
how can i add data to database using excel through asp actual i wanted to use datagrid but as its not supported by asp so i want to try dat by excel can any one just provide me a short code...
3
by: techquest | last post by:
Hi, I want to connect into oracle database and export the table data into a flat file using UNIX shell scripts. I cant use other GUI tools to do this, as the dataload will be in millions. hence if...
5
by: sumanta123 | last post by:
Dear Sir, How to export/import the excel file in oracle database using sql promt. Please guide me the command(export/import) for the neddful. Thanks in Adavance. Regards Sumanta Panda
0
by: akshalika | last post by:
I am new to Biztalk. In my project we need to connect oracle database and insert data into oracle table using BizTalk project. I use WCF Adapter pack(SP2). I create biztalk project then using Consume...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.