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.
Author |
Topic |
Gekko
Yak Posting Veteran
63 Posts |
Posted - 2011-06-10 : 14:17:09
|
Hallo !Please a need help. TabProduct: I have list (register) products. Tsale: I have sale this products.Sometimes happens that in Tabproduct overwrite Name.I want to choose (select) from which the Tproducts has been rewritten.example:TproductNumpr.....Grouppr......Name124-------6------------keywords132-------4------------mouse124-------2------------monitor(overwrite on "notebok" this minute)124-------3------------usbTsale invoice.....Numpr.....Grouppr......name0001---------124-------6---------keywords0001---------132-------4---------mouse0002---------124-------2---------monitor0002---------124-------3---------usband now (this minute) I run a SQL query where I'll find a product that has been rewritten in the product table (compare this two table), but select condition isTsale.name <> Tproduct.nameresult:Numpr.....Grouppr......Name.......OverwriteProdukt124---------2--------monitor--------notebokbig thanks |
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2011-06-10 : 14:46:42
|
You probably would need to enhance your where clause like this:WHERE Tsale.name <> Tproduct.name AND Tsale.Numpr = Tproduct.Numpr AND Tsale.Grouppr = Tproduct.Grouppr |
 |
|
Gekko
Yak Posting Veteran
63 Posts |
Posted - 2011-06-10 : 16:36:31
|
but of course that simple....it works ....thanks sunitabeck |
 |
|
|
|
|