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

Why does SELECT ColumnName throws up SQLSTATE 42703 error?

I set up Aqua Data Studio (Trial) version and DB2 Express edition along with control center and command line tools. I created the database using the Command line tool. And then went on to create a new schema and tables in Aqua data. After importing all my data into the tables, I realized only "select * from ..." works but wen I try to mention a specific column name as in "select price_date from .." I get an error back SQLCODE = -206 SQLSTATE = 42703. I also tried using a qualifier for the coloums like table_name.column_name and also alias, it still doesn't help. Then I tried dropped the tables and schema( lost all data) and created the same using the command centre. And I was able to access the columns using a simple select. But now I want to create a stored proc, I am not sure how to run it from the command center and Aqua data wouldn't let me do it...I land up on the same problem as before. It somehow recognizes my tables but not my columns. Any alternative to Aqua data or how I should run stored procs on DB2 using CLP ? It would be best if I could fix the SQLSTATE = 42703 problem asap as the evaluation perios will expire soon.
In short

select * from BSE500DTA.STK_PRICE_RAW_DTA fetch first 100 rows only (WORKS)

select co_code from BSE500DTA.STK_PRICE_RAW_DTA fetch first 100 rows only (DOES NOT WORK)
Feb 5 '11 #1
1 6958
Try this

select \"co_code\" from BSE500DTA.STK_PRICE_RAW_DTA fetch first 100 rows only

Try to give the cloumn name from this o/p

db2 describe table <tabschema>.<tabname>
whatever is the o/p for "column co_code" use that exactly in the above statement.


Cheers
Pramod
Feb 5 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Shino | last post by:
Hi, Can anyone help with this error: "ORA-00904: invalid column name"? Thanks! SQL> create view PPFa as 2 SELECT L.UserID AS LecID, U.Name, U.Email, I.IntakeID, S.UserID AS StudID 3 FROM...
17
by: kalamos | last post by:
This statement fails update ded_temp a set a.balance = (select sum(b.ln_amt) from ded_temp b where a.cust_no = b.cust_no and a.ded_type_cd = b.ded_type_cd and a.chk_no = b.chk_no group by...
2
by: JJA | last post by:
Please advise on how to get the GROUP BY coded in an acceptable way: DECLARE @LO INT DECLARE @HI INT DECLARE @StartDate varchar(10) DECLARE @EndDate varchar(10) SELECT @StartDate =...
7
by: CharlesEF | last post by:
Hi All, I have run into another problem that is eating my lunch. Should be simple but I am having one heck of a time. Please look at this SELECT statement: SELECT FROM States WHERE ] =...
5
by: Patryk | last post by:
Hello I using websphere and db2 (v8). I have a problem with this select: SELECT * FROM ( SELECT ROW_NUMBER() OVER() AS ROWNUM, * FROM S.A AA) AA WHERE ROWNUM BETWEEN 5 AND 20; From console...
1
by: Zri Man | last post by:
Procedure Get_RowCount works fine when called independently. When called from Another procedure it gives the following error. SQL0206N "C" is not valid in the context where it is used....
10
by: Colleyville Alan | last post by:
I am trying to turn a short and fat (63 columns) table into one that is tall and skinny (7 columns). Basically, I am trying to create a "reverse crosstab" using a looping structure in VBA along...
17
by: Benoit Martin | last post by:
I'm working on a project in VB.net connecting to a SQL Server 2000 database that I can't modify I created a dataset with a schema identical to the DB. When trying to update the DB from the dataset...
5
by: sweetpotatop | last post by:
Hi, I got 'Invalid Column Name NewCol1' when I query the following: Select col1, col2, (some calculation from the fields) as NewCol1, (some calculation from the fields) as NewCol2, NewCol1 =...
2
by: manojuniverse | last post by:
Hi , I have indexed folder on my remote computer. I am trying to access catalog of that indexed folder using asp.net as follow. string name = "MYserver".gun..Scope()"; string...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.