You are here: Re: help with update « MsSQL Server « IT news, forums, messages
Re: help with update

Posted by Ed Murphy on 02/01/08 02:36

--CELKO-- wrote:

> 4) "So I need to Update them in the order 1,2,3 etc for their
> respective Invoice number"
>
> Unh? SQL is a set-oriented language. Updates are done in whole sets
> and not row-at-a-time. You are confusing tables with magnetic tape
> files. The usual patter is like this skeleton:
>
> CREATE TABLE Invoices
> (invoice_nbr INTEGER NOT NULL PRIMARY KEY,
> ..);
>
> (CREATE TABLE InvoiceDetails
> (invoice_nbr INTEGER NOT NULL
> REFERENCES Invoices (invoice_nbr),
> sku CHAR(10) NOT NULL
> REFERENCES Inventory (sku),
> PRIMARY KEY (invoice_nbr, sku),
> order_qty INTEGER NOT NULL
> CHECK(order_qty > 0),
> ..);
>
> There is no mention of the paper (or video) order form lines in the
> RDBMS. They are physical and the RDBMS is logical. You are really
> missing basic concepts and need to get help.

Many reasonable real-world systems include some type of sort criteria
as well, e.g. OrderDetails may wish to record which line item the
customer ordered first, second, etc. - but of course there's plenty of
room for debate over how best to implement the concept.

 

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

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