Help with script

  • Hell. was wondering if you could help with a sql script Im struggling to prepare. Please see the below showing two select statements against two tables with an example product code. This is the scenario I need to identify and then correct. Both tables are product tables and link on warehouse and code. (WAREHOUSE and warehouse and SAGE_PRODUCT_CODE and product). If there is a BF and BE warehouse in stockm and a BF warehouse in fecon -- then use the BF record in fecon2 to create a matching BE record in fecon2 I need a checking script to display first and then an update script.

    select * from pres.scheme.stockm

    where product = 'B007386'

    select * from pres.scheme.fecon2

    where SAGE_PRODUCT_CODE = 'B007386'

  • Table definitions please, at the very least, sample data would be very useful too.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • dandrews 45259 (10/20/2016)


    [ img]C:\Users\dandrews\Desktop[/img]

    The picture won't show up. And even if it showed up, it's not what it's needed.

    Please, read the articles in my signature to know what we need to help.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • Have you solved this already?

    I have a similar problem and would like to know how and if you managed to solve it already

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply