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 |
programer
Posting Yak Master
221 Posts |
Posted - 2011-06-04 : 18:35:22
|
I have a table tbl_payment and tblPaymentDetails.In the tbl_Payment I have:ID | PaymentMethod1 | Visa 2 Mastercard3 PayPalin the tbl_PaymentDetails I have:ID | IDPaymentMethod | AttributeName1 | 1 | CardNumber2 | 1 | CardName 3 | 2 | CardNumber 4 | 3 | emailin the tbl_transactions I have:ID | ReferenceNumber | TransactionMethod| Amount1 | 4324242 | Visa | 102 | dasda3 | Mastercard | 303 | dasd23 | PayPal | 100Up to here everything is clear.In the column AttributeName I can not to added "Amount", because column AttributeName is Data Type varchar. Amount is DataType= decimal.I was thinking that in the column AttributeName in the table tbl_PaymentDetails, add ReferenceNumber. Thus I get data of Payment details and amount payment.Do you have a better idea ? |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-06-05 : 03:54:20
|
make AttributeName of sql_variant type if you want to store numeric data also------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|