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.
Author |
Topic |
ravininave
Posting Yak Master
111 Posts |
Posted - 2012-09-06 : 09:30:10
|
I've Four TablesRegistrationLayoutmastAgentMastReceiptsHere is my QuerySelect Registration.Name, LayoutMast.ProjName ,AgentMast.AgentName from AgentMast INNER JOIN Registration On AgentMast.AgentCode = Registration.AgentCode INNER JOIN LayoutMast on Registration.LCode = LayoutMast .CodeNo where Registration.UserName = @Username and Registration.UserPass = @UserPass;It's working fine up to here.Now I've to modify this query little bit With this query:1] I've to fetch sum(Amount) for the Registration.CodeNo (Registration.CodeNo = Receipt.CodeNo)2] I've to Fetch Last Payment Date & Amount from Receipt of the CustomerHow could I modify the query further. I don't know.VB6/ASP.NET------------------------http://www.nehasoftec.com |
|
|
|
|