Reply to Re: help with update

Your name:

Reply:


Posted by --CELKO-- on 01/31/08 23:37

What you posted makes no sense in an RDBMS.

1) RTables have no ordering; that is a property of a file.

2) ".. SequenceNum is 1,2,3, etc of the line items on the invoice <<

Unh?? Display and formatting is done in the front end and not in the
database. You are still thinking of a COBOL program where display and
data were mixed together in a procedural program, working on one
record at a time

3) "I have say 100,000 rows, different Invoice numbers with different
number of lineitems. All the LineItems are out of synch .. <<

Since a table has no ordering, how can it be "out of synch" --
whatever that means.

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.

[Back to original 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

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