S
Serdar C.
hello everyone,
i am working on a program that keeps a company's stock's .. everytthing
works fine but i am trying to do something like this:
first there are 2 tables in the database:
C1-C4: Column1 through column4
Table1 Table2
C1 C2 C3 C4
+---------+--------+ +---------+--------+
| Value1 | Value2 | | Value3 | Value4 |
+---------+--------+ +---------+--------+
i want to do something like updating the "Value2" like,
"Value2 = Value2-Value3"
i tried a sql command like this which i knew it wont work but i tried anyway
" update Table1 set C2 = (C2 - (select C4 from table2 where C3 = 'value3'))
where C1 = 'Value1' "
i hope u got the point..
thanx for spending your time on reading and thanx more for you help
efforts..
i am working on a program that keeps a company's stock's .. everytthing
works fine but i am trying to do something like this:
first there are 2 tables in the database:
C1-C4: Column1 through column4
Table1 Table2
C1 C2 C3 C4
+---------+--------+ +---------+--------+
| Value1 | Value2 | | Value3 | Value4 |
+---------+--------+ +---------+--------+
i want to do something like updating the "Value2" like,
"Value2 = Value2-Value3"
i tried a sql command like this which i knew it wont work but i tried anyway
" update Table1 set C2 = (C2 - (select C4 from table2 where C3 = 'value3'))
where C1 = 'Value1' "
i hope u got the point..
thanx for spending your time on reading and thanx more for you help
efforts..