Home Page link  

sql - make items inactive

 

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

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
sql - make items inactive Doug 05-15-2008
Posted by Doug on May 15, 2008, 11:27 am
Please log in for more thread options
Hi,

Anyone have a sql query to make items inactive if they have 0 quantity
on-hand and have not been sold in 13 months?

Thanks,

Doug



Posted by Michael on May 15, 2008, 12:53 pm
Please log in for more thread options
UPDATE Item
SET Inactive = 1
WHERE LastSold < getdate()-395
AND Inactive = 0
AND Quantity = 0

The "getdate()-395" is 395 days prior to the current date when you run the
query which is approximately 13 months (365 days + 30 days)

Change this to however many number of days prior to today you want.

--
Disclaimer:

Always test any queries that modify data on a test database prior to running
on your live data to ensure the desired results.

Always back-up prior to running any SQL delete queries on your live data.

--

Regards
Michael
(Brisbane, Australia)

> Hi,
>
> Anyone have a sql query to make items inactive if they have 0 quantity
> on-hand and have not been sold in 13 months?
>
> Thanks,
>
> Doug
>
>



Posted by DRS Support on May 15, 2008, 8:15 pm
Please log in for more thread options
If you'd like to review inactive selections before committing any changes,
try this tool.

DRS Tools installer: www.digitalretailer.com/files/DRSToolsSetup.zip
Installer password: dt033108

Select Maintenance, Mark Inactive, press F5 to view current candidates or
select by filter. The default is items with no activity in 12 months and
zero on hand. You can also view inactive items and make them active.

Digital Retail Solutions
www.digitalretailer.com/RMSaddins -- v1.x/2.x compliant add-ins from $49
Trial downloads -- www.digitalretailer.com/trial
Search this newsgroup -- http://tinyurl.com/2lmk4w

> Hi,
>
> Anyone have a sql query to make items inactive if they have 0 quantity
> on-hand and have not been sold in 13 months?
>
> Thanks,
>
> Doug
>
>





Similar ThreadsPosted
RE: How to make items with QTY=0 Inactive ? March 27, 2007, 7:55 pm
RE: How to make items with QTY=0 Inactive ? March 27, 2007, 8:05 pm
How to make items with QTY=0 Inactive ? March 27, 2007, 10:07 pm
make items inactive November 9, 2007, 1:38 pm
Delete Items and Make Items Inactive January 27, 2009, 10:57 am
Make Inactive & May Not Be Placed on PO September 22, 2008, 3:37 pm
make item inactive January 12, 2008, 3:20 am
Inactive Items May 16, 2007, 6:47 pm
Making Items Inactive October 18, 2006, 2:27 pm
Delete inactive items November 3, 2006, 4:56 pm

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