Comparing two columns in two tables using partial text strings and copying data between tables

I have two tables:
The Vendor table is supplied by a clothing manufacturer and lists product data by row with a column that contains a unique manufacturer ID, such as T5C4.  In this table is a short product description and a long product description that I need to find and copy into the second table, Inventory.
The Inventory table is an export from our Magento store.  Each row contains a unique inventory number in a column that includes but does not match the unique manufacturer ID from the Vendor table.  For example, the unique inventory number could be T5C4-W12, or RED-T5C4W12 or some other variation.
For each product in Inventory, I need to find the matching product in Vendor, and then copy the short description and long description from Vendor to Inventory.
Any tips?  Thanks!
Karl

Karl,
Here's a start, as you requested.
The formula for Our Inventory Row is:
=IFERROR(MATCH("*"&A&"*", Our Inventory :: A, 0), "n/a")
The formula for Brief Description in the inventory table is:
=IFERROR(INDEX(ABC Products :: $A$1:$C$9,MATCH(ROW(), ABC Products :: $D, 0), 2), "n/a")
The formula for the Full description in the inventory table is:
=IFERROR(INDEX(ABC Products :: $A$1:$C$9,MATCH(ROW(), ABC Products :: $D, 0), 3), "n/a")
The Manufacturer's table knows the concise product numbers, so it has the ability to search the Inventory table for it's product id's using wildcards and it then displays the line number of the item in the inventory table. The Inventory table can then search the manufacturer's table for its row number and can reference the brief and full descriptions.
This approach has a serious limitation. It will only find the first occurrence in the inventory. Now, if you want to accept this, you can sort all the found descriptions and pull them out of the inventory table, and then the next product in line will display it's description too.
I wish I could do better with this, but it's all I can come up with at this point, knowing only what you have told me.
Jerry

Similar Messages

  • Problem copying data between tables

    Hello Members,
    Its my first day using SQL queries on oracle 10g database.I used the following query to copy selected feilds of a table :
    CREATE TABLE SAMPLE_TEMP as (SELECT CUSTOMER, BALANCE FROM CUSTOMER_ALL)
    The CUSTOMER_ALL table has over 2 million records. I was successful in creating a table and copying data, but the new table could populate only 52978 records.
    ---- Sample data in my table
    CUSTOMER     BALANCE
    6.28899273     0
    6.28899274     0
    6.28899275     0
    6.28899289     625.12
    6.28899292     2666.24
    How do I go about fixing this ? Do i need to declare a structure and assign the number of records i will store to it ? Any guidance will help me get started.
    Regards
    newbie

    Hello,
    If the CUSTOMER_ALL table is a live table, there may have been new records INSERTed since you copied the data, therefore you will have different counts.
    To check on the data difference:
    SELECT CUSTOMER, BALANCE FROM CUSTOMER_ALL
    MINUS
    SELECT CUSTOMER, BALANCE FROM SAMPLE_ALL

  • Copying data between tables - numbers on an ipad

    I have two [main] lists (tables):
    Workers names, photos, arrival times, training record and other data on one table (the 'Workers List') with one worker's data on each line.
    The other table (really a set of 3)  of three 'shift sheets', Red, Green and Neutral listing who is on-duty at any given time.
    What I'm trying to do - on an iPad - is allocate each worker to a R,G or N shift by making an entry on their row in the Workers List, and have their name and photo (cells from columns B and C in the Workers List) copied automatically to the next available empty row in the relevant one-of-three shift sheets.
    As I see it there are two main problems: the 'cut and paste' aspect which I can just abut get a handle on, and the selection of the next empty row in the coreect (1 of 3) sheet - which has me baffled.
    I'd really appreciate any thoughts.
    Nick
    (if anyone's even remotely interested, this is for organising the staff at the Incredibly-Famous Cider Bus at Glastonbury Festival!! - a free jar for the problem solver!)

    ok, my solution gets a little complicated and I dont know if it would work for the pictures at all.
    I would have three columns Marked as R, G or B. These would eb equations that look at your column that has R, G or B entered. These increment by one if the letter for that column is found on that row.
    Then in my "color" tables, I have an equation that uses an offset and a match to locate the next row for that color.
    Heres a table for an example(with formula results):
    1
    a
    R
    1
    b
    G
    2
    c
    R
    3
    d
    R
    3
    e
    G
    Column A increments every time R appears in C
    then in the Color R table we use this in cell A1 to pull back the data in the first rows column B that has an R (row 1 in this case)
    =offset(table1::$B$1,match(row(),table1::$a,0)-1,0,1,1)
    this looks for the number 1 in column A, returns what row that was found on, offset from B1 that number minus 1. grab a range 1x1, ie. one cell.
    Just modify this to pull back as many different columns you need. It will show #N/A when you hit the last row for R, just delete those and remove the extra rows from displaying in your table. exapnd when you add more.
    Repeat this with an additional column for G and B, and modify the equation for referencing thier counter columns. the first row in your G table will pull back the information from row 2 in my table above.
    Let me know here if this makes sense. its the only way I could find of doing something similar in XL at work.
    Thanks
    Jason
    Message was edited by: jaxjason

  • Copying data between tables

    I have just completed the process of exporting my companies
    main mailing database into a new database file which is setup and
    structured differently. I am trying to figure out how to run a
    coldfusion query that can update my contact information from one
    table into another, tables are as follows:
    companies table
    companyid | contacttitle1 | contactname1 | contactsurname1 |
    contactposition1 | mail1
    autonum | text | text | text | text | text
    AddxContacts table
    id | contacttitle1 | contactname1 | contactsurname1 |
    contactposition1 | mail1
    number | text | text | text | text | text
    i need to update the fields in the first table with the
    fields in the second table, the companyid & id from each table
    are the primary keys that match up the records, however the
    AddxContacts table may contain more than one entry with the same id
    no, but i only want to copy one record for each id no.
    I have scoured various forums looking for an easy way to do
    this but so far have come up blank, any help would be greatly
    appriciated. Thanks

    There is a major difference between what you say you intend
    to do and what your sample code indicates you are attempting to do.
    Do not store contact information in your company table. Put
    it elsewhere with either a one to many or many to many relationship
    set up, depending on your business requirements.

  • How can I make my query to compare only columns of two tables... not the storage information?

    11GR2
    =-----------------------------------
    I am using below querry to compare two table that has same name, under two different users... But after making storage information false like below and  if the storage information is different on column level than it create "Alter modify " statements for the column ... How can I make my query to compare only columns of two tables... not the storage information?
    begin
    DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'PRETTY', TRUE);
    DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'SQLTERMINATOR',TRUE);
    DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'SEGMENT_ATTRIBUTES', FALSE);
    DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'STORAGE', FALSE);
    DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'TABLESPACE',FALSE);
    DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'CONSTRAINTS',FALSE);
    DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'REF_CONSTRAINTS',FALSE);
    DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'CONSTRAINTS_AS_ALTER',FALSE);
    End;
    select REGEXP_REPLACE(dbms_metadata_diff.compare_alter('TABLE','TABLE_NAME_A','TABLE_NAME_A','USER1','USER2'),('USER1...'),'', 1, 0, 'i') from dual

    I am using below querry to compare two table that has same name, under two different users... But after making storage information false like below and  if the storage information is different on column level than it create "Alter modify " statements for the column ... How can I make my query to compare only columns of two tables... not the storage information?
    If you want help you have to SHOW us what you are doing and how you are doing it; you can't just try to tell us in your own words.
    We can't see your computer screen.

  • Query for comparing two columns in two tables

    Hai, all,
    I have following two tables and columns, I need to get the rows (all columns) from scott.cp_ip which are not ( the same value present in t1 and also in t2).
    Table scott.cp_ip column cp_ip.vrno = Table scott.cb1 column cb1.cb_vnno
    I used the following query and did not get the correct result:
    select * from scott.cp_ip where cp_ip.vrno in (select cb1.cb_vnno from scott.cb1);
    Can you please tell how it can be solved?
    Thanks in advance.
    Rcs
    SQL> desc scott.cb1;
    Name Null? Type
    ID NUMBER
    SUPCODE NUMBER
    SUPLNAME VARCHAR2(100)
    NAME VARCHAR2(100)
    ITEMCODE VARCHAR2(10)
    RECDOC NUMBER
    RECDATE VARCHAR2(10)
    TOTVALUE NUMBER
    QTY NUMBER
    CB_IPNO NUMBER
    CB_VNNO NUMBER
    CB_VDT VARCHAR2(10)
    CB_AMT NUMBER
    SQL> desc scott.cp_ip;
    Name Null? Type
    ID NUMBER
    VRNO NUMBER
    CODE VARCHAR2(50)
    HEAD VARCHAR2(255)
    PARTI VARCHAR2(255)
    CR NUMBER
    SQL> select * from scott.cp_ip
    2 intersect
    3 select * from scott.cb1;
    select * from scott.cp_ip
    ERROR at line 1:
    ORA-01789: query block has incorrect number of result columns
    SQL> (select * from scott.cp_ip
    2 minus
    3 select * from scott.cb1)
    4 union all
    5 (select * from scott.cb1
    6 minus
    7 select * from scott.cp_ip);
    (select * from scott.cb1
    ERROR at line 5:
    ORA-01789: query block has incorrect number of result columns
    SQL> select * from scott.cp_ip where cp_ip.vrno in (select cb1.cb_vnno from scott.cb1);
    result=instead of 1408 rows, 1481 rows (excess 73 rows) getting!
    ----------

    Instead of SELECT * write only the column that you want to compare. I guess that would be cb1.cb_vnno and cp_ip.vrno.

  • How to map single input value to Two columns of Database table using format file of Bulk Copy Process

    Hi All,
    Am using OPENROWSET to load the file data into table, here the problem is i need to map same input value to two different columns of table, As format file doesn't allow the duplicate numbers am unable to insert same value to two columns, please help me to
    find a solution for this. 
    i can use only OPENROWSET because i need to insert some default values also which come based on file. only the problem is how to map same input value to two different columns of table. please give me the suggestions.
    Thanks,
    Sudhakar

    From what you say:
       INSERT tbl(col1, col2)
          SELECT col1, col1
          FROM   OPENROWSET(....)
    But I guess it is more difficult. You need to give more details. What sort of data source do you have? What does your query look like? The target table?
    Erland Sommarskog, SQL Server MVP, [email protected]
    Hi Erland,
    Thanks for your response
    my source file is text file with | symbol separate for ex:
    1002|eTab |V101|eTablet|V100|Logic|LT-7|Laptops|SCM
    Database table have columns like
    column1,column2,column3...etc, now i need to insert same value from input file into two columns for ex:
    the eTab value from text file has to be insert into column2 and column3 of
    table
    we cannot change format file like below one
    for the above situation how can we insert eTab into column2 and column3
    Thanks,
    Sudhakar.

  • How to merge two columns in csv file using vbscript?

    How i can merge two column in csv file using vbscript or powershell?
    1  , 2  , 3  , 4  , 5
    1  , 23 ,  4 ,  5
    thanks

    Here are two examples
    http://msdn.microsoft.com/en-us/library/ms191250.aspx
    calulated
    http://msdn.microsoft.com/en-us/library/ms191250.aspx
    Gary Newman MCSE, MCT, CCNA, MCSD, MCPD, MCDBA, MCAD, MCSA, MCTS Developer and Administrator On SharePoint 2013 SharePoint Practice Manager for AmeriTeach Denver, CO.

  • Different ways to copy data between two schemas in one instance

    Hi there,
    I am searching a good way to copy data between two schemas in the same instance.
    Both schemas have an identical structure such as triggers, tables, views and so on. The only difference is the purpose: one is the productivity system and one is for development.
    I looked at datapump but I do not explicit want to export / import. I want to keep the data in the productivity schema as well as copy it to the other schema. Any ideas? I found out there is a copy statement but I dont't know how that works.
    Thank you so far,
    Jörn

    Thank you for your replies!
    I also thought of creating a second instance for development and move the dev - schema to it. I just don't know whether our server can handle both (performance?). Anyway the idea is to have a possibility to quickly rebuild the data inside a schema without indixes or triggers, just pure data. I thought the easiest way would be to copy the data between the schemas as they are exactly the same. However if you tell me DataPunp is the best solution i won't deny using it :).
    When you export data a file is created. does that also mean that the exported data is deleted inside the schema?
    best regards
    Jörn
    Ps: Guido, you are following me, aren' t you? ;-)

  • [Microsoft][SQL Server Native Client 11.0][SQL Server]The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.  'Items' (OITM) (OITM)

    Dear Experts,
    i am getting the below error when i was giving * (Star) to view all the items in DB
    [Microsoft][SQL Server Native Client 11.0][SQL Server]The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.  'Items' (OITM) (OITM)
    As i was searching individually it is working fine
    can any one help me how to find this..
    Regards,
    Meghanath.S

    Dear Nithi Anandham,
    i am not having any query while finding all the items in item master data i am giving find mode and in item code i was trying to type *(Star) and enter while typing enter the above issue i was facing..
    Regards,
    Meghanath

  • Error in SQL Query The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator. for the query

    hi Experts,
    while running SQL Query i am getting an error as
    The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator. for the query
    select  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price ,
    T2.LineText
    from OQUT T0  INNER JOIN QUT1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN
    QUT10 T2 ON T1.DocEntry = T2.DocEntry where T1.DocEntry='590'
    group by  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price
    ,T2.LineText
    how to resolve the issue

    Dear Meghanath,
    Please use the following query, Hope your purpose will serve.
    select  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price ,
    CAST(T2.LineText as nvarchar (MAX))[LineText]
    from OQUT T0  INNER JOIN QUT1 T1 ON T0.DocEntry = T1.DocEntry LEFT OUTER JOIN
    QUT10 T2 ON T1.DocEntry = T2.DocEntry --where T1.DocEntry='590'
    group by  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price
    ,CAST(T2.LineText as nvarchar (MAX))
    Regards,
    Amit

  • Which are R/3 table used for Infocube 0FITV_C01 and 0FITV_C01

    How to find which are the R/3 tables used for Infocube 0FITV_C01 and 0FITV_C01
    Thanks and regards,
    Ranjan

    Hi Ravi,
    Please check this link:
    http://help.sap.com/saphelp_nw04/helpdata/EN/05/5ae8375ae64014e10000009b38f8cf/frameset.htm
    I hope it will help u.
    thanks and regards
    Venkata Naidu Bandi

  • I am creating a request for proposal form and I need to add a commission structure field.  I created a table using the ranking field and now I need to delete the "dots/buttons" and turn them into text fields, is this possible?

      I created a table using the ranking field and now I need to delete the "dots/buttons" and turn them into text fields, is this possible?

    It sounds like what you are trying to do is edit the choices in a likert field to something other than the default radio button. This is not something that you can do in Formscentral at this time.
    Andrew

  • Can I use photoshop text styles and photoshop actions with creative cloud photography?

    I'm really confused by this subscription pricing. If I purchase the $9.99/month, do I get the full desktop app of Photoshop and Lightroom? But I see on this page Products they list something called Photoshop CC that costs twice as much. How is that different from the Creative Cloud Photography?
    My main question is whether I can use photoshop text styles and photoshop actions with Creative Cloud Photography, since I just purchased a bundle that includes these and I want to be able to use them. But I'd also like to understand what comes with all of the various products and how they are different.
    My other question is how is Lightroom different from Photoshop? I have a sense of what you can do in Photoshop but I don't know much about Lightroom at all.
    One more question: the free trial -- is it limited in any way besides the time length? If I do that, will I get a clear idea of all that I will be able to do once I subscribe, or are the functions limited in the trial?
    I tried to just send an email to Adobe to ask these questions but apparently they are not interested in responding to emails from people who are not yet paying customers, so I was directed here. Thanks very much for your help!

    I always like to trot this bit about Bridge once in a while or in the voice of the "Two Bobs" from Office Space,
    "Can you tell us exactly what it is you do around here?"
    What Adobe Bridge does:
    Bridge is the coordinating hub of the Creative Suite. Synchronizing color management settings for all suite programs is done from Bridge, and can only be done from Bridge, to take one important use.
    Bridge displays actual thumbnails of many more file types than Finder or Explorer. It also allows instant play of sound or video files more readily than the native OS file managers.
    Bridge allows direct access to file metadata, to embed copyright information  and keywords where appropriate (e.g., for corporate logo vector and raster files). It also displays the fonts used in an InDesign file, the swatches in an INDD or AI and the output plates (including spot color plates) they use.
    When managing the assets for a design project, Bridge allows quick and simple sorting, rating and custom labeling (with color flash indications) of assets. I can rate images according to whether they are rejects, possibles, for review by client, or approved. The filters built into Bridge allow instant isolation of only the approved images or designs in a folder, only the rejects (for deletion) or only files with certain ratings, no matter how many files it contains. It recognizes aspect ratios, so if I only need a landscape or a 16:9 image in a folder of hundreds of images, I turn off the aspect ratios I don't need.
    Once filtered, the remaining visible files can be selected and copied, moved, or deleted without affecting the rest of the contents of a folder.
    Collections are a massively useful feature. One of my clients is a performing arts center, and in a season we turn out dozens of ads, flyers, brochures, web banners, playbills, billboards and other collateral using the same assets over and over. These assets are organized by artist and/or show on disk, but I set up each season's repeating assets as a Collection in Bridge, so that I just have to open the collection and drag and drop these assets into new INDD, AI, PSD, HTML (in Dreamweaver), FLA or AE projects without having to navigate from folder to folder picking up individual files.
    Bridge's Favorites is another place I stack frequently-accessed folders, such as stock photography, backgrounds, and top-level folders for active projects.
    Assets can be divided into subfolders, but a quick toggle of "Show items from subfolders" exposes all of the assets in a single view while maintaining their organization. I will typically keep AIs, PSDs, EPSs, stock photography and client images in separate subfolders within a project. When I'm ready to start pulling assets into an InDesign layout, I toggle this on and simply drag what I need into the layout.
    Bridge comes with Adobe Camera Raw built in, which is many times faster than using Photoshop to adjust jpegs or tiffs for things like tonal range, white balance, cropping, spotting and sharpening, and is non-destructive.
    One tremendously useful Bridge function for InDesign CS5+ users is the "Show linked files" feature, which opens all the linked files in a layout into a single view, regardless of where they are physically located. I often use this when doing alternative layouts from a client-approved mockup for a campaign, to be certain the same assets are used in each piece, or when creating a motion graphic or interactive piece for the campaign in After Effects or Flash.
    The batch and image processing scripts built into Bridge automate things like creating web-ready small jpegs from multiple images, renaming large numbers of files in place or by copying to an alternative location, creating sets of PSD, png, jpeg or other file types from an assortment of image files, and so on.
    Bridge is so much a part of my daily workflow that on my main workstation I have one monitor dedicated to it almost 100%. Bridge just sits open 24/7, ready for use. I would run at half speed without it, no question.

  • ADF 11g can not select and copy data from cell of readonly table in IE

    hi,
    In ADF 11g, when render view object as readonly table with Single RowsSelection, using IE browser can not select and copy data from the cell, but it work in firefox.
    is it a bug?
    Edited by: kent2066 on 2009-5-18 上午8:46

    Hi Timo,
    Sorry forgot to mention versions.
    We are using 11.1.1.7 and IE 9.
    I tried in Google but could not get the solution.
    Kindly let me know solution for this.
    PavanKumar

Maybe you are looking for

  • How do you create FX

    Gidday, I have only been using FCP6 and FCS2 for a few months after converting to Macs. It is only through the use of forums and online tutorials that I feel confident that I know the basics..... When it comes to FX it seems that FCP is limitless. I

  • Ken Burns effect causing photos to show static

    As the subject line suggests I am getting a sizzle effect, like sparkling pixel static across my photos when the Ken Burns zoom is in progress. It is uniform across the entirety of the photo. THis is in imovie hd 6.0.4 on my new imac 21.5 with system

  • I-pod Touch Cable

    I got question guys.Today I found an Ipod on the sidewalk (Lucky me)I noticed taht i t still works but the battery is low.Is there any USB Cable that can help me transfer music,Videos,Photos...Etc .I saw one the BestBuy website.Its brand is Griffin..

  • Pl/sql doubts clarification

    Hi, I have doubts with some of the questions given below: 1.Identify two features of obfuscation. (Choose two.) A. The Import and Export utilities accept wrapped files. B. SQL' Plus cannot process the obfuscated source files. C. Only the wrap utility

  • Generic Delta extraction by Function module issue

    Hello Experts, Please help !!! I have problem for delta extraction by Function module.  For the full load, I wrote function module based on RSAX_BIW_GET_DATA_SIMPLE. It works fine. But I would like to have the delta load enabled. Therefore, I modifie