Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2016
    Posts
    1

    Question Unanswered: How to create sub-skus?

    Hello all, I am more a Excel user but I believe I have more chance to get this done in Access.
    Really appreciate if you can help me with this.

    I am trying to create sub skus from an selected skus from my master sheet.

    Example:
    TB-10-12345-274-98-12
    TB-10-12345-900-99-12
    TB-10-12345-950-99-12
    TB-10-12345-123-99-12
    TB-10-12345-131-99-12
    TB-10-12345-311-99-12
    TB-10-12345-247-99-12
    TB-10-24681-274-98-12
    TB-10-24681-900-99-12
    TB-10-24681-950-99-12
    TB-10-24681-123-99-12
    TB-10-24681-131-99-12
    TB-10-24681-311-99-12
    TB-10-24681-247-99-12

    What I am trying to do is to pull all the sku contain -274 and create 3 different skus and replace the -274 with something else (-123, -456,-789). It can be reside in a different table.


    Please let me know if more info needed. Thanks in advance!

  2. #2
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    495
    Provided Answers: 24
    copy your data to the new table
    run a query using REPLACE function

    REPLACE([field],"-274","-XXX")

  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    an alternative approach would be to write an insert query

    thats going to be something like:-
    Code:
    insert into mytable select my, column, list, replace(myskucolumn,"-274-","-123-") as subSKUColumn from mytable where myskucolumn like "*-274-*"
    the wrinkle is that the order of ther columns SELECTed MUST be the same order as defined in the table OR you must specify the order of columns int he insert INTO part.
    eg
    insert into mytable col1,col2,col3 select acol, bcol, replace(myskucolumn,"-274-","-123-") as subSKUColumn from mytable where myskucolumn like "*-274-*"

    you will of course have to use wahtever your table is called in place of mytable, whatever your columns are called instead of col1..col3, my,column,list etc...

    assumignt he query works, then edit it, reapce the -123- with whatever else you want to add.
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •