Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
TP143
Starting Member
1 Post |
Posted - 2007-08-03 : 07:41:53
|
Hi,I'm a newbie in database and begin to write some queries in MS SQL Server 2000. I have a homework with question:Table: InventoryTransactionsa. TransactionID should be uniquely identify each record in the tableb. TransactionID should be auto generatedc. The Transaction date should not be greater than the current dated. The Transaction date should be the current date if not enterede. The Transaction date should be greater than the order datef. Quantity Ordered, Quantity Received, and UnitPrice should be greater than 0g. The Quantity Received cannot be greater than the quantity ordered.h. Total Amount should be automatically calculated using the formula:((Quantity Received * Unit Price of Item) + Freight Charge) and be stored in the Total Amount field.i. The Shipment date should be updated to two days after the transaction date after the transaction is successfully completed.j. The Quantity received should be added to the QoH in the Items tablek. When a record is inserted into the table, the QoH in the Items table should be updated automaticallyI need your help to do these questions. I'm just start to learn SQL so don't laugh me Thanks != - Free eBooks Portal: www.new4hack.com - = |
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2007-08-04 : 21:42:09
|
Have a look atidentitycheck constrainttrigger==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|