How to find a specific word (from a list) in a sentence located in a different table, and build a column that contains the name

Hi all, 
I have 2 tables:
1) Lookup table- "Names"- which contains ID# and product description (~100 names that can change).
2) Data table- "Data"- which contains a column with sentences and within lies also the description. In addition, there is a quantity column.
Example:
Names table-
ID
Name
1 Glass
2 Paper
3 Alum'
4 Metal for construction
100 Hydro therapy products
And Data table-
Description
Qty
Someone went to use the machine. 1.80 cm, Alum', for the rest of the day
6
Metal for construction is the major component in our system
7
<gs class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="ba668f16-4de8-41d9-af39-d1b17422d6fe" id="ae5b76e8-6897-46c8-823b-86a382087f83">Kandoo</gs>, Delgado,
Glass 17
Greece needs more paper, 200 ft.
 45
*there is no order where the lookup value can be found in the sentence*
My purpose is to import the Data table while performing a calculation, that <gs class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="1941bde7-1595-40eb-9d64-c2e3b9fabdef" id="b60549fc-5b92-46ea-abc6-72cc8c4c093b">checks</gs>
for each row what is the suitable lookup value and then add it to a new column "Name". 
Meaning, this table should be the new data after import:
<gs class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="f5d9da98-3ff6-4022-920d-8965a15730ee" id="580f945f-7822-4035-9b5b-542c74eff605">Description</gs>
Qty                        
Name
Someone went to use the machine. 1.80 cm, Alum', for the rest of the day
6 Alum'
Metal for construction is the major component in our system
7 Metal for construction
<gs class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="365dd7f8-7ffc-4ef3-95bf-9bf03421c90d" id="c9ba8515-3dba-4a6b-929e-650510f70844">Kandoo</gs>, Delgado, Glass
17 Glass
Greece needs more Paper, 200 ft.
 45 Paper
Appreciate all support! 
I lost hope and I want to avoid macros as much as possible.
Thanks!
עמית

Hi Amit,
I updated the file. The solution uses the following query formula:
let
Source = Excel.CurrentWorkbook(){[Name="DataTbl"]}[Content],
#"Added Custom" = Table.AddColumn(Source, "Custom", each IndexTbl),
#"Expand Custom" = Table.ExpandTableColumn(#"Added Custom", "Custom", {"Scope"}, {"Scope"}),
#"Filtered Rows" = Table.SelectRows(#"Expand Custom", each Text.Contains([Description], [Scope])),
#"Grouped Rows" = Table.Group(#"Filtered Rows", {"Topic", "Component Code", "Project", "Date", "TotalQty", "TotalQtyActual", "ID", "SOW #", " SOW#(lf)Rev", "Scope Driver", "Scope Source", "Scope Source #", "Cost Code", "Type", "Bdg", "System Code", "IMF Number", "IMF Description", "WG", "C or NC", "C/e", "LLE", "Dwg Ref", "Comments ", "Description", "Size", "Qty", "Unit", "Materials Cost/Unit ", "Sub-Total per Unit €", "Unit Rate ", "Total", "DIV Code", "SYS Code", "HelperForDynfilter"}, {{"Scope", each Text.Combine([Scope], " | "), type text}})
in
#"Grouped Rows"
It is based on two queries. The first is the import from table of "IndexTbl", the second is the import of "DataTbl' which is then extended according to the expression above.
Hope this helps.
Gil

Similar Messages

  • How to find a specific word in sentence in each line?

    How to find a specific word in sentence in each line and output will show start from the beginning from specific word plus with small description from each sentence?
    For example: I need to find a "+Wednesday+" and "+Thursday+" word in each sentence by line by line from "myfile.txt".
    Go ballet class next Wednesday.
    On the Wednesday is going to swim class.
    We have a meeting on Thursday at Panda's.
    Then it will show the output:
    Wednesday : ballet class
    Wednesday : swim class
    Thursday: meeting at Panda's
    I am going to figure out in Java console to read from a file for specific word from each line and how to make it output in correct way. I know already to make input/file codes.

    I got it and understand much better. Thank you very much. There is a problem with it because I knew how to make
    a specific word in sentence but how I should make Output for specific word and some words from sentence.
    For example:
    Input:
    +"On Thursday go to ballet class"+
    +"Swim class on Friday one time a month at 2 p.m."+
    I used the codes for that:
    class FindSchedule{
         String firstline = "On Thursday go to ballet class ";
         String secondline = "Swim class on Friday one time a month ";
         FindSchedule(){
              System.out.println(firstline + findTheIndex("Thursday", firstline));
              System.out.println(secondline + findTheIndex("Friday", secondline));
         public int findTheIndex(String word, String sentence){
              int index;
              index = sentence.indexOf(word);
              return index;
         public static void main (String[] args){
              new FindSchedule();
    }The output will be:
    Thursday: ballet class
    Friday: 14:00 swim class one time a week
    Notice that time is changing in output complete different from input.
    I need to find out how to extract some words from each sentence for output. Do you know how to do it?

  • I moved my iphone from my parents account to another account on a different computer and i still have some of the music that i dont want from the other account, how can i get it off of my phone without deleting it from the other itunes account?

    Please Help

    What type of "account" are you referring to?  An iCloud account doesn't contain music, an iTunes account does.

  • Ability to create a collection from a text file containing the names of the pictures

    1 thing that would be very good is the ability to create a collection / quick collection from a text file that contains the names of the picture we want in that collection...
    The reason for that is when i receive an order from a customer typicaly 100-200 different pictures (i'm a wedding photographer), i ask my customer to send me an excel spread sheet with all the name or number of the picture thay want with size & quantity...
    I would like to be able to use that file as an input for a batch job that would add all those files to a collection "customer order" instaid od adding them 1 by 1... it would save me lots of time and would prevent some errors in the order...
    I am currently able to do that with the help of a small utility (Useful File Utility) is the name... with the other RAW converter i use... Bibble

    Well, it is workflow software, true, but it's really focussed on image development. What you're proposing would necessarily make the primary focus be on the business angle, I suspect.
    If you're talking about tools to help customers sit down and pick what they want for manual processing later, that's one thing - but going the rest of the distance to order processing and fulfillment would be out of scope, at least in my view. The reason is that there is just so much room for potential variation in how this gets conducted that I can't see how Adobe could possibly satisfy every pro with one implementation. Even just dealing with all of the possible payment vendors is a hugely problematic area.
    I agree with Don; a third-party plugin via the upcoming SDK might be a distinct possibility, particularly if it were for a "plus services" solution in which the plugin were designed to work with a specific fulfillment vendor. THAT could work quite nicely, and the plugin might even be free (in return for giving the vendor your business, of course).
    In other words, it's not that I see it as a bad idea, it's just that I don't think it belongs in the "core" of LR. This is something that is best dealt with using the SDK so that differences in processes can be allowed for.

  • How to find a specific text(string) in a list (100) programs

    Dear All,
    Wish tou a very happy new year 2009!!!
    please let me know how we can find a specific word(eg: "barrel") in a list of programs/reports/bdc/user exits/field exits/function modules.
    Thanks in advance.
    Kumar.

    hi kumar,
    open EWK1 transaction and search for the word or string according to your requirement.
    Cheers
    Gautham

  • Hi, I don't know how to find a specific security patch to apply to my Oracle database version to fix a vulnerability

    Hi, I don't know how to find a specific security patch to apply to my Oracle database version 11.2.0.2.0 (on windows server 2003 32 bits) to fix the following vulnerability:
    Risk: High
    Application: oracle_tnslsnr
    Port: 1521
    Protocol: tcp
    Synopsis:
    It is possible to register with a remote Oracle TNS listener.
    Description:
    The remote Oracle TNS listener allows service registration from a remote host. An attacker can exploit this issue to divert data from a
    legitimate database server or client to an attacker-specified system.
    Successful exploits will allow the attacker to manipulate database instances, potentially facilitating man-in-the-middle, sessionhijacking,
    or denial of service attacks on a legitimate database server.
    Solution:
    Apply the work-around in Oracle's advisory.
    Thank you for your help

    2835604 wrote:
    Hi, I don't know how to find a specific security patch to apply to my Oracle database version 11.2.0.2.0 (on windows server 2003 32 bits) to fix the following vulnerability:
    Risk: High
    Application: oracle_tnslsnr
    Port: 1521
    Protocol: tcp
    Synopsis:
    It is possible to register with a remote Oracle TNS listener.
    Description:
    The remote Oracle TNS listener allows service registration from a remote host. An attacker can exploit this issue to divert data from a
    legitimate database server or client to an attacker-specified system.
    Successful exploits will allow the attacker to manipulate database instances, potentially facilitating man-in-the-middle, sessionhijacking,
    or denial of service attacks on a legitimate database server.
    Solution:
    Apply the work-around in Oracle's advisory.
    Thank you for your help
    that sounds like the "tns poison" vulnerability.  CVE 2012-1675 - Oracle Security Alert CVE-2012-1675
    See MOS note 134083.1  and 1453883.1

  • How to find a specific song?

    I am looking for the song "To Sir With Love" by Lulu with the group The Mindbenders. My problem is that apparently there are two versions? And when I listen to the samples I can't tell if it's has the lyrics I'm looking for. I want the version which is sung in the movie which includes the line Those awkward years... Does anyone know how to find a specific version of a song? Thank you in advance for your help.

    Search the iTunes Store for "to sir, with love"
    One of the songs will contain in the title (from the Columbia movie.....
    No guarantee but I would guess that's the one you are looking for.
    http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewAlbum?i=193322123&id=19332 1271&s=143441

  • How to find a particular word in a file using java

    Program how to find a particular word in a file

    SirivaniG wrote:
    Program how to find a particular word in a fileOkay, I finished it. Now what?

  • How to find out company code from a plant ?

    Hello friends,
    I have to modify a program that uses FM "BAPI_COMPANYCODE_GET_PERIOD".   For that, we have to export company code ID.  Currently it is hard coded with one company code.  Now we want to make this program usable by all company codes.  So instead of hard coding, I would like to dynamically find out company code based on the plant.   So I want to know - how to find out company code from a plant ?  Is there any table that has plant to company-code assignment data, or any other FM/BAPI to get this info ?
    Thanks,
    - Chetan

    hi
    u can find this from table T001K
    or just goto EC01
    here click on STRUCTURE>NAVIGATION
    double click on co code u will get the list
    u can slo try this in EC02
    regards
    kunal

  • How do I restore specific items from backup?

    Hi
    My phone had no reception, therefore I went on iTunes and backed it up then restored my iPhone to the factory settings.
    The recetion problem got fixed, but when iTunes asked me to restore my backup files on to my iPhone, so I did. then the reception problem came back on again. from here, it's obvious something in my backup files is making this problem happen. I then restored to factory settings again, but this time I set it up as a new device.
    now the question is, since the restore from backup function restores everything including the problem, how do I get specific things from the backup files?
    and also what exactly is backed up when you choose to backup the iPhone, does it backup things like photos and videos etc.?
    Thanks in advance.

    bbfc wrote:
    Not true - i don't sync my contacts with another service; they are restored from backup when needed. You can sync them with a service, like Outlook, Google etc, but most people do not know how to do this, so they just use the iPhone backup.
    I'm not sure about "most people", unless most people don't read the manual, which gives very clear step-by-step instructions on how to sync contacts (and calendar) to either the cloud or a computer application. Or they skip the manual and look at the screen, which has a checkbox and dropdown to sync contacts to a computer application.
    I can think of no reason to NOT sync contacts to an application or cloud service, as the iTunes backup is notoriously unreliable and is easily corrupted.
    But you are correct that contacts are included in the backup.

  • How can I sync specific photos from folders instead of syncing the whole folder to my iPad?(1 gen)

    So I recently synced a few folders from my PC to my iPad 1 and there was a few photos I did not want on my iPad, so when I tapped the photo, the trash button wasn't there. I looked up why that was happening and discovered it was because synced photos can't be deleted from the photo library. So I ask my question, how can I sync specific photos from folders instead of the whole folder? from iTunes to my iPad. If there is not a way for me to sync specific photos from folders, how can I delete the photos I don't want from my iPad?

    As King_Penguin has already explained, this isn't possible with the stock Photos app.
    As far as photo syncing is concerned, I also recommend PhotoSync, which is an excellent photo (and video!) synchronization tool, should you want to stick with the stock Photos app on the iPad. Should you want something better (Photos is a pretty limited app without sorting, EXIF displaying etc. capabilities and with HUGE storage usage), you'll need to take a look at third-party apps. I too recommend Photo Manager Pro, it's IMHO the best tool. There's a complete roundup of image viewers for iOS at http://www.iphonelife.com/blog/87/all-one-photo-viewer-roundup-70-price-drop-bes t-image-viewer ; you might want to read it.

  • How do I transfer specific songs from iTunes on my xp windows desk top to my iPhone 4?

    How do I transfer specific songs from itunes on my xp windows base desk top to my iPhone 4?

    Read the manual:
    iPhone User Guide (For iOS 4.2 and 4.3 Software)

  • How to find a specific string in Entire database?

    Well i know this question is posted numerous times here but i m complete noob understanding the solution given on the net.
    Let me introduce the entire scenario .
    We have an application, which keeps on sending emails from an X employees account.
    We are using Oracle 11g as database .But the problem is we don't know which table to search for the value.
    All we have is Database credentials and x employee's name.
    Is there any way we can find out which table contains the name so that we can change it accordingly.
    I m using plsql developer to connect to the database.
    One solution that we got from internet goes as below.
    Ref:
    [http://www.club-oracle.com/articles/oracle-find-all-tables-with-column-value-154/ |http://www.club-oracle.com/articles/oracle-find-all-tables-with-column-value-154/ ]
    As per the solution i had to create a procedure as below .
    create or replace
    procedure find_string( p_str in varchar2 )
    authid current_user
    as
    l_query long;
    l_case long;
    l_runquery boolean;
    l_tname varchar2(30);
    l_cname varchar2(30);
    type rc is ref cursor;
    l_cursor rc;
    begin
    dbms_application_info.set_client_info( '%' || upper(p_str) || '%' );
    for x in (select * from user_tables )
    loop
    l_query := 'select distinct ''' || x.table_name || ''', $$
    from ' || x.table_name || '
    where ( 1=0 ';
    l_runquery := FALSE;
    l_case := NULL;
    for y in ( select *
    from user_tab_columns
    where table_name = x.table_name
    and data_type in ( 'VARCHAR2', 'CHAR' )
    loop
    l_runquery := TRUE;
    l_query := l_query || ' or upper(' || y.column_name ||
    ') like userenv(''client_info'') ';
    l_case := l_case || '||'' ''|| case when upper(' || y.column_name ||
    ') like userenv(''client_info'') then ''' ||
    y.column_name || ''' else NULL end';
    end loop;
    if ( l_runquery )
    then
    l_query := replace( l_query, '$$', substr(l_case,8) ) || ')';
    begin
    open l_cursor for l_query;
    loop
    fetch l_cursor into l_tname, l_cname;
    exit when l_cursor%notfound;
    dbms_output.put_line
    ( 'Found in ' || l_tname || '.' || l_cname );
    end loop;
    close l_cursor;
    end;
    end if;
    end loop;
    end;
    Well i have copied the code to sql window in plsql and executed .But whenever i compile the procedure it says there is an error .
    Not sure what kind of error hidden in the procedure.
    If any 1 has any better idea please share.
    Edited by: Milind on Apr 12, 2012 8:45 PM

    Girish Sharma wrote:
    Milind,
    I am not sure what / which error about your talking, but there is no error/issue at my end when I ran your procedure code :
    1.I just pasted the code in sqlplus window, it showed me Procedure created. message.
    2.I just checked with show errors command, it showed me No errors.
    3.I just tried to run it with :
    SQL> SET SERVEROUTPUT ON;
    SQL> exec find_string('SCOTT');
    Found in EMP.ENAMENo issue error.
    But whenever i compile the procedure it says there is an error .
    SQL> alter procedure find_string compile;
    Procedure altered.
    SQL> exec find_string('SCOTT');
    PL/SQL procedure successfully completed.
    SQL> set serveroutput on;
    SQL> exec find_string('SCOTT');
    Found in EMP.ENAME
    PL/SQL procedure successfully completed.
    SQL>So, there is no error at my end 11.2.0.1 windows box.
    Regards
    Girish Sharma
    Edited by: Girish Sharma on Apr 13, 2012 11:20 AMThanks it worked for me.

  • Anyone any advice on how to stop my mail "activity" from continuously caching? is this a problem? I have had inbox issues recently that are not resolved yet but I am not sure if they are related.

    Anyone any advice on how to stop my mail "activity" from continuously caching? is this a problem? I have had inbox issues recently that are not resolved yet but I am not sure if they are related.

    Quit Mail. Force quit if necessary.
    Back up all data. That means you know you can restore the Mail database, no matter what happens.
    Triple-click the line below on this page to select it:
    ~/Library/Mail/V2/MailData/Envelope Index
    Copy the selected text to the Clipboard (command-C). In the Finder, select
    Go ▹ Go to Folder
    from the menu bar. Paste into the box that opens (command-V), then press return.
    A Finder window will open with a file selected. Move the selected file to the Desktop, leaving the window open. Other files in the folder may have names that begin with "Envelope Index". Move those files, if any, to the Trash.
    Log out and log back in. Relaunch Mail. It should prompt you to re-import your messages. You may get a warning that the index is corrupt and that Mail has to quit. Click OK.
    Test. If Mail now works as expected, you can delete the file you moved to the Desktop. Otherwise, post your results.

  • I want to share Microsoft word from my desktop mac to my laptop but every timeIi try and do it, it says that it can't open because it is not supported by the software. I have tried several times and updated it on the mac but its still not working.

    I want to share Microsoft word from my desktop mac to my laptop but every timeIi try and do it, it says that it can't open because it is not supported by the software. I have tried several times and updated it on the mac but its still not working. Any ideas?

    You need to install Office on the computer from the installer DVD or disc image you purchased.

Maybe you are looking for

  • ICal and Address Book fonts--how do you display them in their own font?

    I tried printing address labels from Mac's Address Book. It was pretty intuitive and straight forward. However, when I was prepping to print, I had the chance to change the fonts. The list of fonts was not presented with each font name in the font it

  • Error importing support pack SAPKH60011 (SAP_APPL)

    Dear All,    I am faceing one error when applying support pack SAPKH60011 can not apply showing error " The import was stopped since an error occurred during tha phase IMPORT _PROPER ....". for details i here attached screenshot . Pls. reply , Thanks

  • ITunes settings lost on every Windows 8 reboot

    I have a Windows 8 laptop and I am using iTunes 64bit version. This problem occured in the previous version and the newly released 11.0.5.5. Every day I properly close all open programs and shutdown. When I reboot the next day, I open iTunes to annoy

  • Can't log in as administrator after update

    I upgraded to 10.4.8 and now I can't log in as administrator. At the log in screen, it will go away after I enter the passwordand act like it will work, but then the log in screen will appear again. I have a test account that I am still able to log i

  • How to make an list row Read only

    Hi All,     Can anyone please tel me how to make the List row (list item) read only where the status column value is Submit.(i.e the whole row has to be made as readonly, am using event handler to try this out) Thanks in advance