473,437 Members | 1,715 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,437 software developers and data experts.

How to fix ambiguous column error?

This is what I am trying to accomplish:
To determine what type of work is most bountiful for my company, i am trying to create a query and report titled “Hours Against Each WorkCode” that includes a summary of Hours worked against each WorkCode. Display WorkCodeID, WorkCodeDescr, and HoursWorked (using HOURS and WORKCODES tables)

This is what i have and i am getting a ambiguous column error for workcodeID which is in both tables. I feel like i have to join them somehow. HELP!

This is what i have
USE tisds5Project
SELECT WorkCodeID, WorkCodeDescr, HoursWorked
FROM tblHOURS, tblWORKCODES
ORDER BY HoursWorked, WorkCodeID
Apr 13 '10 #1
2 5028
when dealing with columns with the same name from different tables you should uniquely define each such column by preceding the table name before its name.. so in your query you should declare which you mean by WorkCodeID.. Is it tblHOURS.WorkCodeID or tblWORKCODES.WorkCodeID ?
Apr 14 '10 #2
nbiswas
149 100+
Use table alias.
Apr 19 '10 #3

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

Similar topics

9
by: xuatla | last post by:
compile error: test1.cpp:21: error: ISO C++ says that `T mtd::CDiffOperator::getdp(const mtd::mVector&, long int, mtd::mBCTYPE) const' and `void mtd::CDiffOperator::getdp(mtd::mVector&, const...
3
by: Travel Jadoo | last post by:
I could not find any discussion on this but imho this seems an erroneous error occuring now in 7.3.4 (after upgrade from 7.2.3): select null::time, 'test'::varchar as time order by time; ERROR:...
1
by: Alex Zhitlenok | last post by:
Hi, My question is how to resolve in C# ambiguous overloaded operators? Let say, I have two unrelated classes A and B, each one implements overloaded operator + with the first parameter of type...
9
by: Prasad | last post by:
HI, I am a beginner in VC++.. I am trying to write a Win32 console application in visual studio.. I am using following header files.. #include <STRING> using namespace std; #include...
3
by: Arpan | last post by:
The following code exists in a class file named "Users.vb": Namespace Users Public Class UserDetails Public FirstName As String Public LastName As String Public UserName As String Public...
1
by: rn5a | last post by:
Consider the following code in a VB class file: Namespace LoginUserFetchDB Public Class ZForZebra : Inherits SoapHeader Public UserName As String Public Password As String End Class Public...
12
by: Nathan Sokalski | last post by:
I have several CustomControls that I have written for my project. However, when I try to compile I recieve the following warning & errors: Warning 32 Could not resolve this reference. Could not...
7
by: veerranu | last post by:
MERGE INTO stbl_pcop_dafmaster_av x using ( select rsn,mdn,sdca,sdca,sdca,sdca,sdca,sdca,sdca,sdca,sdca,sdca,sdca,sdca,sdca,sdca,sdca,sdca,sdca,sdca,sdca,sdca,sdca,sdca,sdca,sdca from...
11
by: =?Utf-8?B?SmVycnkgQw==?= | last post by:
I have a machine Windows Server 2003 using IIS 6.0 and I am getting the error BC30560 prjob_ascx is ambiguous in the namespace ASP I found a fix. Deleting all the files in the...
32
by: Anna Smidt | last post by:
I am having an "ambiguous call to overloaded function" error again. This is the function: int nGetProfWidth (int ncols, unsigned ProfSpec) { if ((ProfSpec & PROF_2d) == 0) return ncols;...
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
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
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.