我有三张桌子:
Years (YearId,Year)
Months (MonthID,Month)
Date (DateID,YearID,MonthID)
Client (CLientID,ClientName)
Payment (PayID,ClientID,DateID,Amount)
我想将 DataGridView 填写为:
Client Name, Amount, Year, Month
我使用了这个语句,但它不起作用:
Select * From (select Year From Years Where YearID = (Select YearId From Date Where dateID = (Select DateID From Payment))),(Select Month From Months Where Monthid = (Select MonthID From Date Where dateID = (Select DateID From Payment))),(Select ClientName From Client Where ClientID = (Select ClientID From Payment),(Select amont From Payment)