You are here: update a field drom another table « MsSQL Server « IT news, forums, messages
update a field drom another table

Posted by cemal on 03/11/07 22:09

hi guys.

I have two table ; categories and products
categories table; catid (int) catname, and products table has
catid(int), catname

I want to update products.catid=catgory.catid where
category.catname=products.catname

never mind please, as soon as I started writing my message I figured
it out.

UPDATE Products
SET catid = Categories.CategoryID
FROM Products INNER JOIN
Categories ON Products.CategoryID =
Categories.CategoryName

this sql command solved my issue.

thank you all for creating an option to get help.

Cemal
Milwaukee

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация