sql query

  1. G

    Update sql query parameter from excel cell

    Hi, I have a sql query stored in power query. I have managed to change some of the settings of that query with values from the excel sheet. For instance I stored a value 1, or a text chain in excel cell so that I can update my query without using VBA. However, some of the parameters I need to...
  2. S

    SQL Query Question

    This question is a little off topic but the users on this form have helped me out a lot with my VBA so I was hopeful someone could answer an SQL question. My company uses a SQL server to log all of the events that happen on a piece of equipment every day. Each day the server creates a new...
  3. R

    Odbc/sql server access in Excel - repeatedly asking for password

    Hi, I have created a macro which creates a SQL Server connection and returns data as requested - this works fine, however, my macro involves running the same code a number of times - also works fine, just with different connections - still all working! However, because I am making a number of...
  4. B

    Union SQL and Excel Data

    I currently have two data sources 1 A SQL Data table 2 An Excel data table Both tables have the same fields. Is there a way of unioning them in MSQuery so I can return all the results in one table? I had a go below but it didn't like it SELECT * FROM "dbo"."VMS_Nominal_SUMMARY" UNION ALL...
  5. J

    SQL Queries in Excel

    I have the following seven Access queries that I need to convert into an Excel macro because there is not a lot of data in the two source tables and my coworkers are more comfortable working in Excel than Access. I am not sure of how to write the VBA around these SQL queries so that it will run...
  6. A

    execute multiple mySQL statements at once

    I am working on some code that needs to add data into a database. I have no problems adding data when I am trying to execute one SQL statement at a time. My problem comes in when I attempt to execute 2 or more SQL statements at once. I know my syntax is correct, as I am able copy the value of...
  7. O

    RunTime Error 1004 Invalid Object Name when connection to SQL Server Database

    Hi, I've searched the forum and not found any posts reporting this problem. When running a QueryTable command in VBA I keep getting the error: RunTime Error 1004: Invalid object name: 'MyDatabase.Data.Amount_Source' What I cannot understand is that when I copy the SQL Query Command Text...
  8. Avatar

    Excel VBA + Massive Array + SQL INSERT = HELP!

    Greetings, I have an array (dimensions: 1.5mil,14) containing data entries that i need to INSERT into an Access 2003 table. I am hoping to do this as a single SQL string... Is this possible? below is the code in a nut shell. Sub sbRun() Dim aryDataSet() Dim i As Long, _ lngTopRow As...
  9. Dan DeHaven

    End a BackgroundQuery of a ListObjects SQL Query?

    I'm using Excel 2010 to pull data via a Worksheets ListObjects with an ODBC connection to a SQL Server. I haven't had problems with this till I ran into an empty record set. In the case of no records Excel continues to Refresh the external query and displays this in the bottom left corner of the...
  10. B

    SQL query using list of numbers in a sheet

    Good Afternoon, I have a simple .xlsm book into which users can paste a list of file numbers and when run, the macro reads each file number, one at a time, and runs a query against a SQL DB and then pastes the results back into the book. Is there a way to read all of the file numbers...

Some videos you may like

This Week's Hot Topics

  • Sort code advice please
    Hi, I have the code below which im trying to edit but getting a little stuck. This was the original code which worked fine,columns A-F would sort...
  • SUMPRODUCT with nested If statement
    Hi everyone, Hope you're all well. I'm hoping someone will be able to point me in the right direction with a problem I'm having with a SUMPRODUCT...
  • VBA - simple sort is killing me!
    Hello all! This should be so easy, but not for me, apparently! I have a table of data that can be of varying lengths and widths. My current macro...
  • Compare Two Lists
    I have two Lists and I need to be able to Identify differences between them. List 100 comes from a workbook - the other is downloaded form the...
  • Formula that deducts points for each code I input.
    I am trying to create a formula that will have each student in my class start at 100 points and then for each code that I enter (PP for Poor...
  • Conditional formatting formula required for day of week and a value
    Hi, I have a really simple spreadsheet where column A is the date, column B is the activity total shown as a number and column C states the day of...
Top