please hel me.. Please
i have two table
1) Table1
field name
1) FreeBag = 100
2) BuyBag = 50
the total is 150
2) Table2
field name
1) DeliveredBag = 200
subtract the 200-150 i want the output is 50
this is my code
<table>
<%
Set MyConn = Server.CreateObject("ADODB.Connection")
MyConn.Open "FILEDSN=c:/dsn/MyTable_dsn.dsn"
SQL_query = "SELECT SUM(BuyBag+FreeBag-DeliveredBag)AS Total FROM Table1, Table"
Set RS = MyConn.Execute(SQL_query)
WHILE NOT RS.EOF
%>
<tr>
<td>Total Bag Remain</td>
<td><%=RS("Total")%> </td>
</tr>
<%
RS.MoveNext
WEND
RS.Close
MyConn.Close
%>
</table>
what is the wrong of my code?
Please help me... Thank you..