Skip to content
Advertisement

Tag: excel

Having trouble with IF condition using SQL

I cannot seem to get this IF statement to step into the Call Expiry part it goes to the else therefore I can only assume there is something wrong with my condition. I’m trying to fetch the contract status from an access table Investment Data WHERE Customer Number is the Customer Number on the current spreadsheet. (There is only 1

MySQL code to convert Excel datetime

Excel’s datetime values look like 42291.60493, which means MySQL sees them as strings and not as dates. Is there a MySQL code that can convert them to MySQL datetime? (i.e. like in MS SQL) Answer I can think of 2 solutions: Convert your dates within excel to a formatted date string that conforms to mysql’s date and time format using

Import Data into Excel from Access Table

I am trying to import data into Excel from an Access table. I am getting a syntax error This error comes up when I run the line: Select [Time], [Tank], FROM “UnitOneRouting”, WHERE [Date] = ” & RpDate & ORDER BY Tank, Time”, cn, adOpenStatic, adLockOptimistic, adCmdTable In the Access Table there are four columns (in order) Date, Time, Tank,

Data type mismatch on SQL Query in VBA

I am trying to do an SQL query in VBA to retun a specific case number. Whenever I execute the query, it returns an error of “Data Type Mismatch in Criteria Expression”. I am passing the query an integer to use to query an autonumber primary key. Of course the debug hilights the execute command. Any help would be appreciated.

Advertisement