Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: excel query assistance  (Read 2811 times)

0 Members and 1 Guest are viewing this topic.

JAgosta

    Topic Starter


    Starter

    • Experience: Beginner
    • OS: Unknown
    excel query assistance
    « on: July 10, 2012, 09:51:01 AM »
    Hello esteemed users -
    I have a spreadsheet with various cells and want to create a dynamic query to access a backend dictionary table based on the value of certain cells and insert into another tb.
    For example, in the following:

    EID or PID    PhyNum   Web   Red   Blu   Gre   Sil
    5000418    p97582     x    x    x    x    x
    5000419    p97584     x    x    x    x    x
    5000420    p97583     x    x    x    x    x
    5000421    p97585     x    x    x    x    x
    5000422    p97586     x        x        x

    EID, PID relate to CPK_WORKGROUP_ID
    web, red, blu, gre, sil relate to C_DESC column

    I want to query a table / insert to another.

    Tables are:
    tworkgroup (dictionary):
      CPK_WORKGROUP_ID
      C_DESC         
      C_CREATED_TS   

    tworkgroupreqister:
      CPK_WORKGROUP_ID 
      CPK_USERID       
      C_WORKGROUP_ADMIN


    Query is:

    insert into db21sql.tworkgroupregister
    select cpk_workgroup_id, '<PhyNum from xls>', 0
      from db21sql.tworkgroup
     where upper(c_desc) like '%SILVER%'; (or web, red, blu, gre for each with an 'x')

    Is this doable? or am I up a tree  ???

    TIA,
    Jeff A



    [year+ old attachment deleted by admin]

    soybean



      Genius
    • The first soybean ever to learn the computer.
    • Thanked: 469
    • Computer: Specs
    • Experience: Experienced
    • OS: Windows 10
    Re: excel query assistance
    « Reply #1 on: July 12, 2012, 05:59:33 AM »
    When I think of tables and queries, I think of Access, not Excel.  So, I'll just suggest you consider using Access.  But, for help with Excel, you can find some Excel-specific forums by doing a search on excel forum.

    JAgosta

      Topic Starter


      Starter

      • Experience: Beginner
      • OS: Unknown
      Re: excel query assistance
      « Reply #2 on: July 12, 2012, 09:52:22 AM »
      Thanks Soybean -
      The users submit the xls to us. My role is to add them to the back-end tables based on the data. I do certainly agree that  access would be a 'better' choice, but can't affect that change.  :-X

      Tku,
      Jeff a