Home Page link  

Help with SQL statement- Supplier List cost into cost field in Ite

 

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
Help with SQL statement- Supplier List cost into cost field in Ite Tara 02-12-2008
Posted by Tara on February 12, 2008, 9:46 am
Please log in for more thread options
Hi, I've a customer who has a number of items in their HQ database at zero
cost. However, for these items there is a cost price detailed on the Supplier
tab. Items carried only have one supplier. They'd like to get this cost
copied into the cost price field on the General tab and because we're talking
about a few thousand items, this isn't something they want to do by hand! I'm
familiar to a point with SQL but because we're talking two seperate tables, I
really wouldn't be sure where to start with the syntax. Could someone please
point me in the right direction? Or if there's an easier way using Wizards
etc, even better! Thanks!

Posted by convoluted on February 12, 2008, 2:27 pm
Please log in for more thread options
Hi Tara - backup your db first....

first run
select * from supplierlist order by cost asc
-- this will show you the contents in the supplierlist table first listing
items with zero cost (or the lowest cost) - fix zero cost entries first by
editing item properties and setting the correct cost in the supplier tab

then run
update item
set item.cost = supplierlist.cost
from item inner join supplierlist on item.id = supplierlist.itemid
-- the inner join will only update items that are both in the item table and
supplierlist table

to see items that are not in the supplier list table run
select itemlookupcode, description
from item
where id not in (select itemid from supplierlist)

Hope this helps....

"Tara" wrote:

> Hi, I've a customer who has a number of items in their HQ database at zero
> cost. However, for these items there is a cost price detailed on the Supplier
> tab. Items carried only have one supplier. They'd like to get this cost
> copied into the cost price field on the General tab and because we're talking
> about a few thousand items, this isn't something they want to do by hand! I'm
> familiar to a point with SQL but because we're talking two seperate tables, I
> really wouldn't be sure where to start with the syntax. Could someone please
> point me in the right direction? Or if there's an easier way using Wizards
> etc, even better! Thanks!

Posted by Tara on February 14, 2008, 5:01 am
Please log in for more thread options
Hi, thanks for that- it worked perfectly. There is just one snag however and
I didn't think of it until I was testing. Many of the suppliers use specific
currencies so the information I need copied from the Supplier tab is actually
the Local Cost. When I view the SupplierList table, Local Cost doesn't
appear as a column. Is it just a calculation based on exchange rates for
information or does it actually exist somewhere within the database? Your
help once again would be much appreciated.

T.

"convoluted" wrote:

> Hi Tara - backup your db first....
>
> first run
> select * from supplierlist order by cost asc
> -- this will show you the contents in the supplierlist table first listing
> items with zero cost (or the lowest cost) - fix zero cost entries first by
> editing item properties and setting the correct cost in the supplier tab
>
> then run
> update item
> set item.cost = supplierlist.cost
> from item inner join supplierlist on item.id = supplierlist.itemid
> -- the inner join will only update items that are both in the item table and
> supplierlist table
>
> to see items that are not in the supplier list table run
> select itemlookupcode, description
> from item
> where id not in (select itemid from supplierlist)
>
> Hope this helps....
>
> "Tara" wrote:
>
> > Hi, I've a customer who has a number of items in their HQ database at zero
> > cost. However, for these items there is a cost price detailed on the
Supplier
> > tab. Items carried only have one supplier. They'd like to get this cost
> > copied into the cost price field on the General tab and because we're
talking
> > about a few thousand items, this isn't something they want to do by hand!
I'm
> > familiar to a point with SQL but because we're talking two seperate tables,
I
> > really wouldn't be sure where to start with the syntax. Could someone please
> > point me in the right direction? Or if there's an easier way using Wizards
> > etc, even better! Thanks!

Similar ThreadsPosted
copy item cost to supplier cost field November 1, 2006, 1:37 pm
Allow entry of cost into extended cost field in purchase order August 29, 2005, 6:55 am
How can i update item cost based on Supplier cost and MPQ. August 13, 2008, 3:23 pm
Item cost/Supplier cost purchase order February 20, 2009, 9:06 am
Help with SQL- SupplierList cost into Item cost field February 15, 2008, 4:48 am
supplier cost to update item cost September 24, 2007, 3:06 pm
Help Please!!! Supplier Cost Local Cost Issues February 20, 2008, 5:30 am
Cost field gets erased February 22, 2006, 3:05 pm
Supplier Cost is zero August 23, 2005, 10:21 pm
Supplier Cost still zero April 29, 2008, 4:32 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