Hello I have the following tables :
TableA
ID | SomeInt
1 55
1 66
2 77
TableB
ID | OtherInt
1 ComputedBy Field
2 ComputedBy Field
The computed by field needs to return the sum from tableA where TableB.ID = TableA.ID, but if I say:
SELECT SUM(SomeInt) from TableA where ID = TableA.Id
where the first ID would be the current table's ID, the dbms says "Ambiguous field name between table Table1 and Table2"
So, how do I get the ID from the current row so that it doesnt mix the field name.
Something like This.ID, Self.ID, CurrentRow.ID or whatever sql uses
EDIT: Apparently I could use Current table's name to reference the column