Editing Sales.SalesOrderHeader (table)
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 566: | Line 566: | ||
| not null | | not null | ||
| | | | ||
− | | Primary key. | + | | Primary key.PK_SalesOrderHeader_SalesOrderID |
|- valign="top" | |- valign="top" | ||
| RevisionNumber | | RevisionNumber | ||
Line 572: | Line 572: | ||
| not null | | not null | ||
| (0) | | (0) | ||
− | | Incremental number to track changes to the sales order over time. | + | | Incremental number to track changes to the sales order over time. |
|- valign="top" | |- valign="top" | ||
| OrderDate | | OrderDate | ||
Line 578: | Line 578: | ||
| not null | | not null | ||
| (GETDATE()) | | (GETDATE()) | ||
− | | Dates the sales order was created. | + | | Dates the sales order was created. |
|- valign="top" | |- valign="top" | ||
| DueDate | | DueDate | ||
Line 584: | Line 584: | ||
| not null | | not null | ||
| | | | ||
− | | Date the order is due to the customer. | + | | Date the order is due to the customer. |
|- valign="top" | |- valign="top" | ||
| ShipDate | | ShipDate | ||
Line 590: | Line 590: | ||
| null | | null | ||
| | | | ||
− | | Date the order was shipped to the customer. | + | | Date the order was shipped to the customer. |
|- valign="top" | |- valign="top" | ||
| Status | | Status | ||
Line 596: | Line 596: | ||
| not null | | not null | ||
| (1) | | (1) | ||
− | | Order current status. 1 = In process; 2 = Approved; 3 = Backordered; 4 = Rejected; 5 = Shipped; 6 = Cancelled | + | | Order current status. 1 = In process; 2 = Approved; 3 = Backordered; 4 = Rejected; 5 = Shipped; 6 = Cancelled |
|- valign="top" | |- valign="top" | ||
| OnlineOrderFlag | | OnlineOrderFlag | ||
Line 602: | Line 602: | ||
| not null | | not null | ||
| (1) | | (1) | ||
− | | 0 = Order placed by sales person. 1 = Order placed online by customer. | + | | 0 = Order placed by sales person. 1 = Order placed online by customer. |
|- valign="top" | |- valign="top" | ||
| SalesOrderNumber | | SalesOrderNumber | ||
Line 608: | Line 608: | ||
| | | | ||
| | | | ||
− | | Unique sales order identification number. | + | | Unique sales order identification number.AK_SalesOrderHeader_SalesOrderNumber |
|- valign="top" | |- valign="top" | ||
| PurchaseOrderNumber | | PurchaseOrderNumber | ||
Line 614: | Line 614: | ||
| null | | null | ||
| | | | ||
− | | Customer purchase order number reference. | + | | Customer purchase order number reference. |
|- valign="top" | |- valign="top" | ||
| AccountNumber | | AccountNumber | ||
Line 620: | Line 620: | ||
| null | | null | ||
| | | | ||
− | | Financial accounting number reference. | + | | Financial accounting number reference. |
|- valign="top" | |- valign="top" | ||
| CustomerID | | CustomerID | ||
Line 626: | Line 626: | ||
| not null | | not null | ||
| | | | ||
− | | Customer identification number. Foreign key to Customer.CustomerID. | + | | Customer identification number. Foreign key to Customer.CustomerID.IX_SalesOrderHeader_CustomerID |
|- valign="top" | |- valign="top" | ||
| ContactID | | ContactID | ||
Line 632: | Line 632: | ||
| not null | | not null | ||
| | | | ||
− | | Customer contact identification number. Foreign key to Contact.ContactID. | + | | Customer contact identification number. Foreign key to Contact.ContactID. |
|- valign="top" | |- valign="top" | ||
| SalesPersonID | | SalesPersonID | ||
Line 638: | Line 638: | ||
| null | | null | ||
| | | | ||
− | | Sales person who created the sales order. Foreign key to SalesPerson.SalePersonID. | + | | Sales person who created the sales order. Foreign key to SalesPerson.SalePersonID.IX_SalesOrderHeader_SalesPersonID |
|- valign="top" | |- valign="top" | ||
| TerritoryID | | TerritoryID | ||
Line 644: | Line 644: | ||
| null | | null | ||
| | | | ||
− | | Territory in which the sale was made. Foreign key to SalesTerritory.SalesTerritoryID. | + | | Territory in which the sale was made. Foreign key to SalesTerritory.SalesTerritoryID. |
|- valign="top" | |- valign="top" | ||
| BillToAddressID | | BillToAddressID | ||
Line 650: | Line 650: | ||
| not null | | not null | ||
| | | | ||
− | | Customer billing address. Foreign key to Address.AddressID. | + | | Customer billing address. Foreign key to Address.AddressID. |
|- valign="top" | |- valign="top" | ||
| ShipToAddressID | | ShipToAddressID | ||
Line 656: | Line 656: | ||
| not null | | not null | ||
| | | | ||
− | | Customer shipping address. Foreign key to Address.AddressID. | + | | Customer shipping address. Foreign key to Address.AddressID. |
|- valign="top" | |- valign="top" | ||
| ShipMethodID | | ShipMethodID | ||
Line 662: | Line 662: | ||
| not null | | not null | ||
| | | | ||
− | | Shipping method. Foreign key to ShipMethod.ShipMethodID. | + | | Shipping method. Foreign key to ShipMethod.ShipMethodID. |
|- valign="top" | |- valign="top" | ||
| CreditCardID | | CreditCardID | ||
Line 668: | Line 668: | ||
| null | | null | ||
| | | | ||
− | | Credit card identification number. Foreign key to CreditCard.CreditCardID. | + | | Credit card identification number. Foreign key to CreditCard.CreditCardID. |
|- valign="top" | |- valign="top" | ||
| CreditCardApprovalCode | | CreditCardApprovalCode | ||
Line 674: | Line 674: | ||
| null | | null | ||
| | | | ||
− | | Approval code provided by the credit card company. | + | | Approval code provided by the credit card company. |
|- valign="top" | |- valign="top" | ||
| CurrencyRateID | | CurrencyRateID | ||
Line 680: | Line 680: | ||
| null | | null | ||
| | | | ||
− | | Currency exchange rate used. Foreign key to CurrencyRate.CurrencyRateID. | + | | Currency exchange rate used. Foreign key to CurrencyRate.CurrencyRateID. |
|- valign="top" | |- valign="top" | ||
| SubTotal | | SubTotal | ||
Line 686: | Line 686: | ||
| not null | | not null | ||
| (0.00) | | (0.00) | ||
− | | Sales subtotal. Computed as SUM(SalesOrderDetail.LineTotal)for the appropriate SalesOrderID. | + | | Sales subtotal. Computed as SUM(SalesOrderDetail.LineTotal)for the appropriate SalesOrderID. |
|- valign="top" | |- valign="top" | ||
| TaxAmt | | TaxAmt | ||
Line 692: | Line 692: | ||
| not null | | not null | ||
| (0.00) | | (0.00) | ||
− | | Tax amount. | + | | Tax amount. |
|- valign="top" | |- valign="top" | ||
| Freight | | Freight | ||
Line 698: | Line 698: | ||
| not null | | not null | ||
| (0.00) | | (0.00) | ||
− | | Shipping cost. | + | | Shipping cost. |
|- valign="top" | |- valign="top" | ||
| TotalDue | | TotalDue | ||
Line 704: | Line 704: | ||
| | | | ||
| | | | ||
− | | Total due from customer. Computed as Subtotal + TaxAmt + Freight. | + | | Total due from customer. Computed as Subtotal + TaxAmt + Freight. |
|- valign="top" | |- valign="top" | ||
| Comment | | Comment | ||
Line 710: | Line 710: | ||
| null | | null | ||
| | | | ||
− | | Sales representative comments. | + | | Sales representative comments. |
|- valign="top" | |- valign="top" | ||
| rowguid | | rowguid | ||
Line 716: | Line 716: | ||
| not null | | not null | ||
| (NEWID()) | | (NEWID()) | ||
− | | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. | + | | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.AK_SalesOrderHeader_rowguid |
|- valign="top" | |- valign="top" | ||
| ModifiedDate | | ModifiedDate | ||
Line 722: | Line 722: | ||
| not null | | not null | ||
| (GETDATE()) | | (GETDATE()) | ||
− | | Date and time the record was last updated. | + | | Date and time the record was last updated. |
|} | |} | ||