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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SELECT problem

Author  Topic 

mirko1508
Starting Member

1 Post

Posted - 2009-03-19 : 15:44:16
i have 2 tables (table1 and table2)
table1 columns: ARTid, ARTname, ARTprice
table2 columns: BILLid, ARTid, ARTname, ARTprice, BILLtotal

i want that table2 (ARTname, ARTprice) get values when i type number in ARTid column?

Sorry for my bad english

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2009-03-19 : 16:29:13
Rather than store the same data in two places why not drop the columns from table2 (ARTname,ARTprice). You can display the info from a single select statement using both tables.

Be One with the Optimizer
TG
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-03-20 : 09:29:05
and also you dont have to worry about updating table2's (ARTname, ARTprice) values everytime it gets updated in table1
Go to Top of Page
   

- Advertisement -