Compound indexes

Bryan McCormack bmccormack at artsystems.com
Fri Jun 20 17:24:15 CDT 2003


Could someone clarify and provide an example of how you're creating
compound indexes with Valentina?  An example of how I would do this on
other SQL databases would be something like:

CREATE TABLE tblCustomerInvoices (
CustomerInvoiceID ULONG NOT NULL UNIQUE INDEXED, 
CustomerID ULONG INDEXED,
SalespersonID ULONG INDEXED,
InvoiceID ULONG INDEXED,
Notes TEXT(255)
);

CREATE INDEX idxCustomerSalespersonInvoice
ON tblCustomerInvoices (CustomerID, SalespersonID, InvoiceID);

In this example, I've been using the properties "NOT NULL UNIQUE
INDEXED" together to form, in essense, a Primary Key.  Then, I want an
individual index on the fields CustomerID, SalespersonID and InvoiceID.
But how do I create a compound index from more than one field as in the
"CREATE INDEX..." syntax?  I've looked through previous posts and have
seen that using BaseObject methods is the way to accomplish this, but am
unclear on how.  Or am I wrong there, too?

Thanks in advance,
Bryan


More information about the Valentina mailing list