Warning: iconv_mime_decode() [function.iconv-mime-decode]: Malformed string in /home/rockryno/public_html/lib/standard.lib.php on line 2258
Trigger to update price a,b,c
Home Page link  

Trigger to update price a,b,c

 

Point-Of-Sale Software - - MS Point Of Sale software discussed here

 Post an article  get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content  add this group's latest topics to your Google content  YahooMyWeb Yahoo!  Google Google  Windows Live Favorites Windows Live  del.icio.us del.icio.us  digg digg  Add to Netscape Netscape
Subject Author Date
Trigger to update price a,b,c Sad 09-28-2008
Posted by Sad on September 28, 2008, 5:06 pm
Please log in for more thread options


HI,
i am a bigginer in sql ,Is the following trigger can be used in HQ ?( i
modified it from this forum )
thanks


CREATE TRIGGER [utr_Item_Cost_LowerBound_Insert] ON [Item]
FOR INSERT, UPDATE
AS
IF UPDATE (PRICE)
/***************************************************
utr_Item_Cost_LowerBound_Insert sets LowerBound to price * 0.9%
when item is created.

***************************************************/
BEGIN
UPDATE Item
SET PRICELowerBound = i.price * .9
SET PRICEA = i.price * .95
SET PRICEB= i.price * .9
SET PRICEB= i.price * .85
FROM Item INNER JOIN INSERTED i on Item.ID= i.ID
END


Posted by Kaibin on September 29, 2008, 12:05 am
Please log in for more thread options


yes, can be used in HQ, and the syntax looks correct. any problems w/ it?

--
Kaibin
RMS Support Team
Ridge, Inc.
http://www.ridgeinc.com.cn
> HI,
> i am a bigginer in sql ,Is the following trigger can be used in HQ ?( i
> modified it from this forum )
> thanks
>
>
> CREATE TRIGGER [utr_Item_Cost_LowerBound_Insert] ON [Item]
> FOR INSERT, UPDATE
> AS
> IF UPDATE (PRICE)
> /***************************************************
> utr_Item_Cost_LowerBound_Insert sets LowerBound to price * 0.9%
> when item is created.
>
> ***************************************************/
> BEGIN
> UPDATE Item
> SET PRICELowerBound = i.price * .9
> SET PRICEA = i.price * .95
> SET PRICEB= i.price * .9
> SET PRICEB= i.price * .85
> FROM Item INNER JOIN INSERTED i on Item.ID= i.ID
> END
>


Posted by Sad on September 29, 2008, 8:47 am
Please log in for more thread options


thank you kaibin
i tried this trigger on HQ it was ok ( thier is little change)

CREATE TRIGGER [utr_Item_Cost_LowerBound_Insert] ON [Item]
FOR INSERT, UPDATE
AS
IF UPDATE (PRICE)
/***************************************************
utr_Item_Cost_LowerBound_Insert sets LowerBound to Price * .9%
when item Price is updated or item created.

***************************************************/
BEGIN
UPDATE Item
SET PRICELowerBound = i.price * .9 ,PRICEA = i.price * .95 , PRICEB=
i.price * .9 ,PRICEC= i.price * .85
FROM Item INNER JOIN INSERTED i on Item.ID= i.ID
END


"Kaibin" wrote:

> yes, can be used in HQ, and the syntax looks correct. any problems w/ it?
>
> --
> Kaibin
> RMS Support Team
> Ridge, Inc.
> http://www.ridgeinc.com.cn
> > HI,
> > i am a bigginer in sql ,Is the following trigger can be used in HQ ?( i
> > modified it from this forum )
> > thanks
> >
> >
> > CREATE TRIGGER [utr_Item_Cost_LowerBound_Insert] ON [Item]
> > FOR INSERT, UPDATE
> > AS
> > IF UPDATE (PRICE)
> > /***************************************************
> > utr_Item_Cost_LowerBound_Insert sets LowerBound to price * 0.9%
> > when item is created.
> >
> > ***************************************************/
> > BEGIN
> > UPDATE Item
> > SET PRICELowerBound = i.price * .9
> > SET PRICEA = i.price * .95
> > SET PRICEB= i.price * .9
> > SET PRICEB= i.price * .85
> > FROM Item INNER JOIN INSERTED i on Item.ID= i.ID
> > END
> >
>

Similar ThreadsPosted
Update Price1A Trigger June 13, 2005, 7:21 am
Rob...Cost update trigger October 20, 2006, 12:03 pm
Trigger Update Current Record Only November 20, 2005, 6:14 pm
Update Price A,B&C automatically when I change Regular Price May 8, 2008, 12:14 pm
Kits - Price Update not working April 1, 2007, 4:48 pm
Mass Price Update and Labels October 22, 2008, 4:15 pm
Automatically update price levels when changing cost March 3, 2006, 11:46 am
sql trigger September 28, 2006, 12:16 pm
SQl Trigger July 26, 2007, 2:30 pm
SQL Trigger August 14, 2007, 10:52 am

Contact Us | Privacy Policy
This site is not affiliated with Intuit - makers of Quickbooks and Quicken software
This site is not affiliated with Sage Software - makers of Peachtree accounting software
XML SitemapXML Sitemap