May 16, 2013 at 4:20 am
Hi
When runing queries I keep geting the above error.
Does anyone know how to resolve this pls?
thanks
May 16, 2013 at 4:42 am
philip.davy (5/16/2013)
HiWhen runing queries I keep geting the above error.
Does anyone know how to resolve this pls?
thanks
Can you post the code you are running?
Somewhere in this code you are using "Members.MemberID_", but your table Members (or table refereed by this alias) has no "MemberID_" column.
May 16, 2013 at 5:36 am
select
List_,
Description,
count(month(TimeClicked)) as MonthTimeClicked
from clicktracking_ with (nolock)
inner join members_ on clicktracking_.MemberID_ = Members_.MemberID_
inner join lyrLookupCompletionStatus on lyrCompletedRecips.CompletionStatusID = lyrLookupCompletionStatus.CompletionStatusID
group by
List_,
Description
May 16, 2013 at 5:47 am
philip.davy (5/16/2013)
selectList_,
Description,
count(month(TimeClicked)) as MonthTimeClicked
from clicktracking_ with (nolock)
inner join members_ on clicktracking_.MemberID_ = Members_.MemberID_
inner join lyrLookupCompletionStatus on lyrCompletedRecips.CompletionStatusID = lyrLookupCompletionStatus.CompletionStatusID
group by
List_,
Description
Query you posted refers to the table with name "Members_"
Error shows "Members" - no underscore at the end.
Actually, you have a very strange naming convention...
Why do you add underscore at the end of some table and its columns names?
May 16, 2013 at 6:45 am
philip.davy (5/16/2013)
selectList_,
Description,
count(month(TimeClicked)) as MonthTimeClicked
from clicktracking_ with (nolock)
inner join members_ on clicktracking_.MemberID_ = Members_.MemberID_
inner join lyrLookupCompletionStatus on lyrCompletedRecips.CompletionStatusID = lyrLookupCompletionStatus.CompletionStatusID
group by
List_,
Description
lyrCompletedRecips.CompletionStatusID = lyrLookupCompletionStatus.CompletionStatusID
This will fail unless you have lyrCompletedRecips in your FROM list.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
May 16, 2013 at 8:56 am
The naming convention was decided by someone else
May 16, 2013 at 9:05 am
philip.davy (5/16/2013)
The naming convention was decided by someone else
Have you figured out the query issues, Philip?
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
May 16, 2013 at 9:10 am
Sorry, afraid not
thanks
May 16, 2013 at 9:11 am
I don't see it in the query, but as Eugene suggested, the error implies you had members.memberid_ in the query somewhere.
I'd double check that.
May 16, 2013 at 9:17 am
Yes I've corrected that
May 16, 2013 at 9:18 am
philip.davy (5/16/2013)
Sorry, afraid notthanks
If you are still interested in working it through, there are folks here willing to help.
There are two or three remaining issues with the query;
you have a reference to a table lyrCompletedRecips, in a join, which isn't in the FROMlist
table lyrLookupCompletionStatus isn't joined to any tables in the FROMlist which will result in a cartesian product (too many rows)
the aggregate probably won't generate the result you are expecting.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
May 17, 2013 at 7:54 am
Maybe I'm missing something but perhaps all this procedure needs is to make sure the table and column names are enclosed in brackets ([]) due to the odd naming convention.
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply