Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 INNER JOIN issue

Author  Topic 

DrMak
Starting Member

3 Posts

Posted - 2007-03-17 : 06:17:30
Hello,
i need a bit help about populating datalist control. Instead to explain my problem i have an image that would better illustrate my problem i believe
LINK TO THE IMAGE

it is related with INNER JOIN SQL Statement. I have no clue how to retrive the data from the two tables and bind to SqlDataSource which populates the DataList control. Basicaly i know how to fetch some data but from the picture above you will notice that i am far from the solution. This is the SELECT query that i am currently using:

SELECT Matches.ClubHome, Matches.ClubGuest, Matches.MatchDate, Prognosis.Match_ID AS Expr1, Prognosis.User_ID, Prognosis.UserName, Prognosis.Coefficient, Prognosis.SpentMoney, Prognosis.Company, Prognosis.GivenTip, Prognosis.PrognoseDate FROM Matches INNER JOIN Prognosis ON Matches.Match_ID = Prognosis.Match_ID WHERE (Matches.Match_ID = Prognosis.Match_ID)


tia

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-03-17 : 06:20:41
what is that image ? it is not showing at all


KH

Go to Top of Page

DrMak
Starting Member

3 Posts

Posted - 2007-03-17 : 06:27:01
quote:
Originally posted by khtan

what is that image ? it is not showing at all


KH





I offer my appologize for the inconvinience. Now i have fixed the link. Please take a look at the image.

Best Wishes
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-03-17 : 06:35:48
something like this

select m.ClubHome, m.ClubGuest, p.UserName, p.Coefficient
from Matches m inner join Prognosis p
on m.Match_ID = p.Match_ID



KH

Go to Top of Page

DrMak
Starting Member

3 Posts

Posted - 2007-03-17 : 06:55:03
quote:
Originally posted by khtan

something like this

select m.ClubHome, m.ClubGuest, p.UserName, p.Coefficient
from Matches m inner join Prognosis p
on m.Match_ID = p.Match_ID



KH





But practically i already have something like that.
Check the original thread please.
Thanks
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-03-17 : 07:19:51
Are you not getting the correct result when running your query in Query Analyzer ?


KH

Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-03-17 : 14:15:19
This is a problem with REPORTING SERVICES LAYOUT, not T-SQL.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page
   

- Advertisement -