I’ve been given the task of turning the following Excel table into a database table in SQL Server (I have shortened the row count, of course). A car has to go to service every 10.000 kilometers, but for some models there is a fast service that applies only to certain mileages (I don’t know what mileage is called in kilometers
Tag: excel
How to change data type in csv column
Using databricks with SQL, I have to import my csv dataset into a table and analyse data using it. My problem is after I imported csv dataset, all column are String type, but some of these need to be Numeric. How can I solve? How can I define the column types of a csv file? I tried converting file in
How do I create a recordset of nested queries from different databases
The following 2 queries are taken from tables on different databases I’d like to nest these in the following query However, I am getting an error: The connection cannot be used to perform this operation On the following line: rrst.Open mkQry I guess it has to do with MyQuery and MyQuery2, both being from a different database. Is there a
How to check against a DB Table in Mapforce?
The question is about mapping in Mapforce. I have an Excel input file. I also have a table from Oracle DB. What I want to do is the following: Take tournr from Excel and compare it to tournr in Table from DB. When there is a match, take NR column from DB table. How can I do that? Answer I
Can’t do Multiple Left Joins SQL Select (ODBC)
When I run the following SQL select statement with two left joins: I get the following error message in Excel VBA: “Run-time error ‘5’: Invalid procedure call or argument” When I run that exact same SQL without the left joins, it works without issue. I know the first SQL statement above is valid because it works just fine (joins-included) when
SQL query does not work in Excel but works in Access
For the code listed below, it runs fine except for the first SQL query. I’m pulling address and state information from the workbook, and running a query on the information to find the count of how many times the address appears in the table. If I run the code and stop it before the query is sent to Access, I
VBA ADODB error (80040e14) when trying to retrieve data from SQL Server
I am trying to connect to SQL Server from Excel VBA using the following code and with some specific simple queries it actually works like a charm. My problem shows up whenever I try to run the query right below to which I get the following error: ‘-2147217900 (80040e14)’ An expression of non-boolean type specified in a context where a
Split values from many columns accordingly over multiple rows
Firstly i obatin data from Excel and convert them into DataTable in C# project. Secondly i parse this DataTable into JSON string and send it to database as a stored procedure parameter. I want to perform the merge operation on some table with values from this JSON string parameter. Values from this parameter can be represented as such table: EQ
Present URI in database as clickable link
I have a table in a SQL Server 2019 that stores URI’s like this: These values are stored as nvarchar. Is there a way to make these clickable? So that, when this table is for example read by PowerQuery users only have to click the link to open the file? It is assumed that only those filetypes are allowed for
How do I properly input an sql where clause in VBA?
The where clause in the code below is throwing me an error. I just can’t seem to get the syntax right. Answer The values of the variables need to be added to the SQL, not their names, and the values need to be in an appropriate format. The following code will add the dates in yyyy-mm-dd format.