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

The column prefix does not match with a table name

347 100+
I have the following query:

select moncalladd.opname, moncalladd.schedname, moncalladd.firstlisting,
DATEADD(MINUTE, moncalladd.AddTime, DATEADD(DAY, moncalladd.AddDate, '12/31/1899')) as added,
moncalladd.initials, dateadd(n,moncalladd.Timestamp, '12/31/1899')-(moncalladd.timestamp/1000)/60/1440 +1 as oncalldate
from mdr.dbo.moncalladd inner join mdr.dbo.moncalldelete
on moncalladd.schedname = moncalldelete.schedname and moncalladd.timestamp= moncalldelete.timestamp
WHERE dateadd(n,moncalladd.Timestamp, '12/31/1899')-(moncalladd.timestamp/1000)/60/1440+1 >= '03-21-2011' and moncalladd.schedname='CAP.NEURO'
order by oncalldate

If I run that query as is .. it runs fine but when I add the following line:

dateadd(n, moncalladd.startoncalldate, +1)+(moncall.startoncalltime/1440)+(moncalladd.Duration/1440) as addeddate,

anywhere in my query I get this error:
The column prefix 'moncall' does not match with a table name or alias name used in the query.
What am I not seeing here?

Thank you

Doug
Mar 31 '11 #1
1 2506
gpl
152 100+
dateadd(n, moncalladd.startoncalldate, +1)+(moncall.startoncalltime/1440)+(moncalladd.Duration/1440) as addeddate,

highlighted above -- a hard to find typo ?
Mar 31 '11 #2

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

Similar topics

9
by: Chris Bowlby | last post by:
Hi All, I've noticed that in the pg_type system table, there is a data type called "name", would that represent the definition of the table name space, including the max length a talbe name...
2
by: Iker Arizmendi | last post by:
Using psql and running as the owner of the table "app" I try to access the columns of the table like so: SELECT * FROM app; which returns all the columns in the table including the one I'm...
11
by: surya | last post by:
hello sir, i have a table emp ,it has three fields one is empno int ,second is ename varchar(20). and last is salary , emp empno ename salary ----------- ------------...
6
by: blue875 | last post by:
A tale of two queries: One query looks like this, and runs fine. We'll call this the "Customer1 query": SELECT Customer1 overall.*, IIf(IsNull(.),0,1) AS IsField, IIf(IsNull(.),0,1) AS...
6
by: Mike S | last post by:
Hi all, A (possibly dumb) question, but I've had no luck finding a definitive answer to it. Suppose I have two tables, Employees and Employers, which both have a column named "Id": Employees...
0
by: Joe Meng | last post by:
Greetings, I've seen this question asked and answered here, just not completely yet. I'm wondering how to use a column value as a table name in another query. So far it's looking like you must...
7
by: plmanikandan | last post by:
Hi, I would like to know details about the table name starts with prefix in sql server 2000. Actually i'm working on existing code. The existing code insert a record into a table, but the table...
4
by: bubulle | last post by:
Hi, all. Here is my problem: Let's say i have table1 with columns a,b,c and table2 with cols x,y,z. Some of columns contain the same type of data from one table to the other, but others are...
4
by: prasath03 | last post by:
Dear All, Can anybody help me about my coding, i'm inserting the image file to database using jsp. When i execute the code, the following error is occurred: java.sql.SQLException: Insert...
2
by: lildiapaz | last post by:
Can someone please explain to me how to select a specific column in an excel spreadsheet and import the information in that column to an sql table in a c# windows application. Let's say my excel...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.