How can I create a column with time HH:MM from a timestamp column with time HH:MM:SS in my dataset
Tag: excel
Nested SQL Select query in Excel with VBA
I’m trying to make SQL query on multiple Excel worksheets. I have setup like this (each table is a separate worksheet): Three worksheets – one with condition, second with source data and third with the output. In the Output I need all records from the Source where value in the ColumnA is present in the Condition next to a positive
Joining on 3 csv files
I need to retrieve data from 3 different CSV files (Adres.CSV, ID.CSV and Regios.CSV) and combine this in an Excel table. This SQL statement works fine, StrSQL = “SELECT ID.[ID], Adres.[Naam], …
Concatenating variables into a string for a query url
I am trying to program a dynamic url that changes as the day changes. I can get the query to run if I hardcode the date into the string but it will not run when “todaysDate” is used at the end of the url. I looked in the locals window and the variable url returns the correct string needed to
Join two columns as a date in sql
I am currently working with a report through Microsoft Query and I ran into this problem where I need to calculate the total amount of money for the past year. The table looks like this: How would you calculate the total amount from 02-2019 to 02-2020 for the item number 12345? Answer Assuming that you are running SQL Server, you
Writing Query statement with a String and a Date in Excel VBA
Using an ADODB connection, I have an excel database where I store data, and I am trying to make a query in one of the sheets(db_Reports). Values for Lastname and Birthday are entered in textboxes (tb_Lastname & tb_bday, respectively) from a userform. My problem is that the first two query statements work (commented in this case): one queries Lastname which
Wrong data types when loading sql query with vba in excel
I have a SQL Query, which I want to use in VBA to load the data into Excel, the problem is that when the load is done the data in Excel is with the wrong type. For example, where it needs to be a date,…
Is there a way to count all the trailing zeros in a column in MySQL?
I am looking to find out if there is a way to count the number of trailing zeros in a column. The column is made up of a maximum of 13 numbers as shown below and I want to count all the zeros before …
How can I import data from excel to postgres- many to many relationship
I’m creating a web application and I encountered a problem with importing data to a table in a postgress database. I have excel with id_b and id_cat(books id and categories id) books have several categories and categories can be assigned to many books, excel looks like this: excel data It has 30 000 records. I have a problem how to
Moving Data from SQL Server to Excel, Views or Query?
I have an Excel spreadsheet that pulls data from a view (that’s pulling from another view) in SQL Server, this was created by someone other than myself. Due to recent changes in how we are storing data in SQL Server, the views no longer actively reflect the data needed. The current Excel spreadsheet use a command to simply pull the