+ Reply to Thread
Results 1 to 6 of 6

MS Query with external data from SQL + extra columns inside worksheet: relation when updat

  1. #1
    Registered User
    Join Date
    04-15-2015
    Location
    Belgium
    MS-Off Ver
    2010
    Posts
    3

    MS Query with external data from SQL + extra columns inside worksheet: relation when updat

    Hi

    This is what I would like to do:

    I've got a program with a SQL-table with articles and one with recipes.
    I want to use this data in Excel. Therefore I use a MS Query.

    Since I'm missing some attributes for both the articles and recipes inside the program
    I want to add some extra columns inside the worksheet.

    My problem:
    how can Excel remember the relation between the values in those extra columns and the external data.
    Once new articles and recipes have been added inside SQL
    and I refresh the query, the data in the extra columns is mixed up, since the new data is not added in new rows under the existing ones.

    Example:

    (ED= external data in SQL) (ID = internal data / manualy added columns in Excel worksheet)

    before update

    EDarticlenumber1234 EDarticledescription1234 IDadditive1234
    EDarticlenumber1265 EDarticledescription1265 IDadditive1265
    EDarticlenumber1378 EDarticledescription1378 IDadditive1378

    after update, article 1262 has been added to SQL

    EDarticlenumber1234 EDarticledescription1234 IDadditive1234
    EDarticlenumber1262 EDarticledescription1262 IDadditive1265
    EDarticlenumber1265 EDarticledescription1265
    EDarticlenumber1378 EDarticledescription1378 IDadditive1378



    Any help is appreciated.

  2. #2
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: MS Query with external data from SQL + extra columns inside worksheet: relation when u

    So basically you are adding new calculated columns when the data is on excel from MS Query right?
    Cheers!
    Deep Dave

  3. #3
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: MS Query with external data from SQL + extra columns inside worksheet: relation when u

    When you joined the forum recently you agreed to abide by the Forum Rules, but in haste I fear you might not have actually read them. Please stop and take a moment to read them now. We all follow these rules for the benefit of all, as must you. Thanks.

    (link above in the menu bar)

    Your post does not comply with Rule 8 of our Forum RULES. Do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

    P.S I commented in your other thread

  4. #4
    Registered User
    Join Date
    04-15-2015
    Location
    Belgium
    MS-Off Ver
    2010
    Posts
    3

    Re: MS Query with external data from SQL + extra columns inside worksheet: relation when u

    Ok kyle123 I haven't read the rules (like everbody I think).
    Maybe it's a good idea to merge both forums and make 1 stronger?

    This is crosspostlink: http://www.mrexcel.com/forum/excel-q...ing-query.html

    Sorry

  5. #5
    Registered User
    Join Date
    04-15-2015
    Location
    Belgium
    MS-Off Ver
    2010
    Posts
    3

    Re: MS Query with external data from SQL + extra columns inside worksheet: relation when u

    @NeedForExcel:
    it's not a calculated column which uses the external data
    just an extra column with free text.

  6. #6
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: MS Query with external data from SQL + extra columns inside worksheet: relation when u

    Is it possible to attach a sample workbook?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 8
    Last Post: 08-27-2012, 04:37 PM
  2. VBA query on external worksheet to an array
    By Peanuts890 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-25-2011, 04:47 PM
  3. Query - creating relation with field alphanumeric
    By LUCAS MOREIRA in forum Excel General
    Replies: 1
    Last Post: 11-29-2010, 08:04 PM
  4. [SOLVED] Associate additional columns with an external query
    By cujimm in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-08-2005, 08:35 PM
  5. [SOLVED] Get External Data Web Query new worksheet
    By Nina in forum Excel General
    Replies: 0
    Last Post: 04-14-2005, 03:06 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1