TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Diane
NA
40
0
sql server 2005 error
Jan 24 2010 1:00 AM
I am new to t-sql in the last few months. I am getting the following error in sql server 2005 and would like to know how to get around the problem:
Msg 4104, Level 16, State 1, Line 1
The multi-part identifier "Z.MaxReceiveDate" could not be bound.
The sql that I am running is the following:
select distinct Z.gnumber, R.Requests, Z.MaxReceiveDate
from
(select distinct gnumber,
count(*) as Requests
from dbo.table1
where receive_date > Z.MaxReceiveDate
group by gnumber
) R
left join
(select distinct P.gnumber,
MaxReceiveDate = Max(Received_Date),
from dbo.table2
group by P.gnumber
) Z
On Z.HNumber = R.Hnumber
I am bascially trying to use the maxreceivedate value from a subquery.
Can you suggest ways to solve this problem?
Thanks!
Reply
Answers (
1
)
Merge 2 column valuee is in single column but O/P is displayed some format
Triggers