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 |
JasonCamara82
Starting Member
5 Posts |
Posted - 2007-01-16 : 13:10:44
|
I am new to SQL server and I need help with a problem I am having, I need to create a stored procedure to insert a transaction into a database I am working on. I have a transactions table already created with the following columsTransactionID int not nullTransactionIDType int not nullTransactionDate datetime not nullCustomerID int not nullInvoiceNumber int not nullPaymentDueDate datetime not nullStatus bit not nullI know how to start to create a stored procedure but I don't know how to get it to insert a transaction into the tableAny help would be greatly appreciated |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-01-16 : 13:14:02
|
CREATE PROC SomeProcASINSERT INTO SomeTable (ColumnList...)VALUES(...)...Tara Kizer |
|
|
X002548
Not Just a Number
15586 Posts |
|
JasonCamara82
Starting Member
5 Posts |
Posted - 2007-01-16 : 13:29:14
|
what I am doing is I am creating a database for a company, and I need a stored procedure to get the information from a transactionand insert that information into the Transactions table |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2007-01-16 : 14:01:30
|
quote: Originally posted by JasonCamara82 what I am doing is I am creating a database for a company, and I need a stored procedure to get the information from a transactionand insert that information into the Transactions table
Well, that's what I gather...sounds like what you want is to capture a DML operation against a table, in which case you want a trigger to fire and place the "transaction" into a transaction, or history tableThat about right?Brett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxAdd yourself!http://www.frappr.com/sqlteam |
|
|
|
|
|