Skip to content
Advertisement

Tag: excel

Double sort in Excel or SQL

I have a weird table-sorting issue that I cannot figure out in Excel or SQL. Here’s a table sorted by column 2, “Letter”. Name Letter Dan A Moe A Ted B Dan C Joe F Noe F What I need is the table sorted by Letter BUT… if there are any duplicates in the “Name” column, I need those grouped–which

VBA & SQL how to select specific values based on range in excel?

I am newbie in connection of vba (excel) and oracle database. I have tried to look for some information but I could not find anything that would work for me. I want to write a query that will return me only rows in which there is a specific values. My query looks like this: SQLStr = SQLStr = “SELECT NGKHFHCD,

SQL in Excel: Cannot call declared variable

I am trying to breakdown my SQL string in Excel VBA, storing my variables in the first part of the SQL, and calling them in the second part. It seems that declared variables is not my friend here? First part(Declaring my variable) Second part(Calling my variable) Using a temp table works: But calling the variable doesn’t: Answer In-memory @variables are

Group by and display count in Excel

I am trying to learn some Excel’s features and I want to know if it is possible to make an SQL-like statement in Excel. For example, I distincted a dataset and the output is: I want to make a count(*) and a group by like: Answer Initial data: Create a pivot table. When you drag columns like this… …your pivot

SQL Query with Excel VBA

I’m trying to run a SQL query with Excel VBA. I got the query from someone else. When I run this query, I’m getting the following error message: “The SELECT statement includes a reserve word or an argument name that is misspelled or missing, or the punctuation is incorrect.” I can’t figure out what is wrong (plus I’ve never tried

Formatting in MS Access

I am trying to format a Access table fields to include all values as in the images below. However when I copy and paste from excel to the Access table, only significant figures appear in the table. …

How to change SQL queries in Excel using VBA?

I have a workbook connected to a database that has stock data. I have around 500 stock symbol data and I fetch them one by one by entering the stock symbol (pink highlighted) in the query as shown below. All the time I have to open Connection Properties then Definition to change the stock symbol. This process is time-consuming. I

SQL statement in VBA Excel

I have a problem with a SQL Statement in VBA Excel. I can’t use ORDER BY together with GROUP BY and I don’t understand why. If I delete ORDER BY I don’t get errors. Can anyone help me figure out where am I wrong? Thanks a lot to everyone!! Here is my code: Answer missing space ? try with

syntax error (missing operator) in query expression – VBA and Access

I build a query with this syntax: I did a test query in MariaDB, and it worked. Now, i am use this query in Access with VBA MSExcel, where it has the same structure and relationship between tables, but return error. message error vba: Syntax error (missing operator) in expression ‘t.id_empresa = e.id_empresa LEFT JOIN responsavel AS r ON t.id_respons’

Advertisement