Re: TRIGGER NEEDED SHOWING CREDIT CARD AUTH
- From: meangene <meangene@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 18 Sep 2009 12:57:02 -0700
Hugo - Don't rightly know if a view would work for us because each table is
in its own, separate database and instance of SQL Server. Also, writing a "Y"
to the CC_Authorized field would allow us to program the shipping app to then
mark the record for end-of-day processing in the shipping_queue table if we
decide to automate the process. Of course, a view could possibly work OK as a
reporting source if we intend to manually ID and mark approved credit card
shipments.
"Hugo Kornelis" wrote:
On Fri, 18 Sep 2009 05:28:01 -0700, meangene wrote:.
I have two tables: InvoiceHeader and ShipmentHold. Both tables have a key
field OrderNumber that link them. I need an example of a trigger that would
do the following: IF InvoiceHeader.CC_AuthorizationNo is not null THEN write
value "Y" to ShipmentHold.CC_Authorized WHERE InvoiceHeader.OrderNumber =
ShipmentHold.OrderNumber.
What this trigger would do is write "Y" to the credit card authorized field
in the ShipmentHold table for the corresponding order that was just invoiced
with it's credit card payment approved. This allows our shiping folks to run
a periodic report showing what credit card shipments have been processed and
authorized and move those physically onboard the trailer.
Hi meangene,
Why not create a view instead of storing this redundant information in a
seperate table and using a trigger to maintain it (with still the risk
that there will be inconsistencies after all)?
--
Hugo Kornelis, SQL Server MVP
My SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
- References:
- TRIGGER NEEDED SHOWING CREDIT CARD AUTH
- From: meangene
- Re: TRIGGER NEEDED SHOWING CREDIT CARD AUTH
- From: Hugo Kornelis
- TRIGGER NEEDED SHOWING CREDIT CARD AUTH
- Prev by Date: Re: Using Set based loop rather than logic to update column
- Next by Date: Re: Select statement Causing Table Locks
- Previous by thread: Re: TRIGGER NEEDED SHOWING CREDIT CARD AUTH
- Next by thread: Re: TRIGGER NEEDED SHOWING CREDIT CARD AUTH
- Index(es):
Relevant Pages
|
Loading