+ Reply to Thread
Results 1 to 4 of 4

Excel sheet linked to SQL DB

  1. #1
    Registered User
    Join Date
    11-14-2008
    Location
    Ireland
    Posts
    9

    Excel sheet linked to SQL DB

    I have a excel sheet linked to SQL which pull various information automtically from the DB. However, I wish to add columns in between the columns that hold the data from the SQL DB. I have extracted the data and manually insert the columns in the selected areas without a problem and it works fine. However, there come a stage when I have preformed various sorts and filters on the data and copied some cell info from an old sheet that when I refersh the info from the SQL DB it erases everything in the manually added columns.

    I have tried to seperate the SQL statement into nested statements so that the queries run seperatly and I have also tried to add the blank columns I need in the SQL statement through a space (30) entry however I encouter the same problem everytime!

    Would anyone have any idea what I am doing wrong?

  2. #2
    Valued Forum Contributor Richard Schollar's Avatar
    Join Date
    05-23-2006
    Location
    Hampshire UK
    MS-Off Ver
    Excel 2002
    Posts
    1,264

    Re: Excel sheet linked to SQL DB

    I think you should probably keep the pure data and the subsequent work/presentation you need to do separate. So you pull the raw data into sheet1 then you copy across what you need from sheet1 to sheet2. On sheet 2 you add the additional columns/do the filtering etc as required. That way, when you refresh sheet1 you won't lose what you've done on sheet2.
    Richard Schollar
    Microsoft MVP - Excel

  3. #3
    Registered User
    Join Date
    11-14-2008
    Location
    Ireland
    Posts
    9

    Re: Excel sheet linked to SQL DB

    The information extracted from the SQL DB and entered on the sheet are unfortunately interlinked. I need the information in between. I cannot update sheet1 and copy to sheet2 as there are over 16,000 rows pulled from the SQL DB.

    Is there no way of having non-data linked columns between data linked?

  4. #4
    Valued Forum Contributor Richard Schollar's Avatar
    Join Date
    05-23-2006
    Location
    Hampshire UK
    MS-Off Ver
    Excel 2002
    Posts
    1,264

    Re: Excel sheet linked to SQL DB

    Yes, but you'd need a separate query table for each non-contiguous region ie one in columns A:C, another in column F, another in column K, another in P:R etc. You'd need to make sure they used the same filtering and same ordering in the SQL so that they came out in the same order.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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