I have defined a procedure in my module, returning the path of the database and I want to use that path in my sql query. Procedure in module : I am using the function above in my sql query : It is giving me the error: “error in from clause” but when I am using it in vba code ,
Tag: vba
Not possible to use HAVING clause in transform sql statement?
Is it possible to use the HAVING clause with the transform statement in MS Access 2010? I keep getting “Syntax error in transform statement” My sql is I tried testing the select statement by itself and it works fine Is what I’m trying to do not supported by access? Answer Indeed, Having is not available when executing a Pivot. A
What does the following SQL query do?
The drawing logs at that the company I work for use are written in MS Access VBA. The original code was written 15+ years ago by someone else, and we’re now running into errors with the reporting functionality that we can’t find a solution for. The query I’m having an issue with is the following: Does anyone know what the
Return sums even if no data exist in given day
I have a table with amounts only on some days, e.g.: How can I query the data and get: I tried like: But still it doesn’t return 0s for days without data, any ideas? Answer In Access, you can create a series of dates between the first and the last date, and then create an outer join to your summed
SQL Insert Into New Table from Old Table
I’ve got two table which are near identical, the only difference is the newer one has different field names. Basically the old table was outdated and needed to be re-worked; I’m trying to extract all the field where the VendorNumber = Vendor_ID all the field that are being copied to are guaranteed empty. The below SQL code if very large,
Custom String Conversion
I want to convert a string that can have two formats. Example 1090512300 to 9.5.123 1090501300 to 9.5.13 The first string (1090512300) will always have the same length but the second(9.5.123) string won’t. The conversion logic is as follows 1 xx yy zzz 00 So string 1 will be 1xxyyzzz00 and string 2 xx.yy.zzz where all zeros have been removed.
Run-time Error 3131 Syntax Error in FROM clause
Tried scouring the forums for threads similar to mine but couldn’t really find anything that would lead me in the right direction. Basically I have a table that has the QA scores for each of the 10 regions and I am trying to populate a text box with a specific region’s score depending on the month. I was trying to
Access VBA: SQL String with string tablefield converted as date
Normally I figure out my DateTime issues in VBA and SQL by trial and error, but in this case I have hit a wall. I am not even sure I can do what I want. I have a temporary table with fields F1, F2, etc. Field F7 contains a date as a string n the format dd/MM/yyyy. Now, I want
Can I convert my query to use select .. like .. or?
Can the query in the code below be converted to Select / Like / Or ? Answer Yes:
How to use custom VBA function in WHERE IN condition
I am trying to use a custom VBA function to populate the list for the WHERE IN function of an access SQL query however I can’t seem to get it working. A simplified version of the query is shown below The code for the getList() function is I have tried playing around with the quotes like missing the leading and