0
votes
0answers
7 views

Query SQL database through Excel VBA

I am looking to import data in Excel using SQL connection. For example, how do I build connection using VBA in Excel to pull a simple SQL query like one below. Can someone help? I need help building ...
1
vote
1answer
31 views

Select distinct Categories from a table

I have a table: ------------------ | A | B | C | D | ------------------ | 1 | 5 |bla|bla1| ------------------ | 2 |10 |bla2|bla2| ------------------ | 3 |10 |bla2|bla1| ------------------ | 4 | 5 ...
0
votes
1answer
51 views

SQL - Selecting all latest unique records

I'm struggling a bit at creating an SQL query to select some records from an Access Database (using Excel VBA). A cut of one of the tables (let's call it 'table1') has the following columns: | my_id ...
0
votes
2answers
27 views

Why would my recordset be empty after running a Select?

I am trying to get this code to work, but It keeps returning -1 for the RecordCount. The select statement does find values, I went to the database and ran it there. But I am unable to get any values ...
0
votes
1answer
115 views

Choose a value between two columns SQL - VBA in Excel

I have two columns in a table stored in a SQL database. Column A and column B both contains Boolean value. Is there possible to load only the maximum value between these 2 columns. IF A >=B THEN A ...
0
votes
0answers
30 views

How to merge records with duplicates in a column and copy distinct data to a new column of the merged record

I have an excel table that I want to change. It looks someting like this: PhoneNum Name Adress ID 758635 John Long First Street 17839 758635 Ann Long First Street 15283 ...
0
votes
0answers
180 views

Checking if a access table exists in Excel vba( dlookup or using sql)?

how to check if table exist and if it doesnt exist create table in sql server 2008 The link above I think shows what I am trying to do using sql in excel vba. I should say I don't really know sql, ...
1
vote
1answer
206 views

Importing data from access into an open excel spreadsheet? (Excel VBA)

I am trying to make an application that has the feature to import data from access into excel. I am starting with a table named ""1301 Array"" before I give user control over which table. The problem ...
0
votes
0answers
202 views

SQL VBA Excel update SQL table with variable fields

I need some help with an sql statement. I have an Excel sheet with variable fields, e.g. sheet 1: customer name, address, phone 1 sheet 2: customer name, address, phone 1, phone 2 sheet 3: customer ...
0
votes
1answer
79 views

Pulling an column of values from SQL and putting them in an array VBA

I am trying to get a list of employee numbers from our database so I can iterate through them to locate information that is listed by employee number. They are not sequential so a counter doesn't ...
1
vote
1answer
119 views

How to create a dynamic table structure in SQL from multiple delimited text files?

I have about 100,000+ delimited text files (they dont have same number of columns in each file, e.g. some files have 10 columns, some have 20 and so on). I need to upload all of them to SQL server. ...
2
votes
2answers
100 views

Excel function or VBA script to combine ranges

I have 2 columns each with a varying amount of rows. In this instance I want to merge (scalar multiple? multiple matrices?) the item in A1 with the range(B1:B50) and then repeat for each item in ...
1
vote
2answers
32 views

How to access a query with a dependant range of cells

this function opens a connection to a an sql database, collects data and bring it back and copies it into cell O6 and onward. I have come into two problems. My first is i want to select a range of ...
1
vote
1answer
160 views

Pull Access accdb query into Excel 2007 error 3265

newbie here. Found the following code on the internet. It has been around for years. I have customized it for my application. Updated reference to MS Office 12.0 access data base engine library. I ...
2
votes
2answers
2k views

Using Excel VBA to Export data to Ms.Access Table

I am current using following code to export data from worksheet to Ms.Access database, the code is looping through each row and insert data to Ms.Access Table. Public Sub TransData() ...

1 2 3 4 5 8
15 30 50 per page