Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you are getting an error regarding too many _ try building the SQL
like this. strSQL = "SELECT * " strSQL = strSQL & "FROM mytbl " strSQL = strSQL & "INNER JOIN mytbl2 ON mytbl.a=mytbl2.a;" You can also use this syntax to make the code more readable, but be careful to add spaces where needed for the SQL. On Jun 19, 9:23*pm, joemeshuggah wrote: i have a macro that automatically runs a query in an external database (teradata) and puts the results in excel...the query is very simple...e.g.. query = "select * from mytbl" i would like to use the same idea for more complex queries (multiple joins and conditions, etc), however when i paste the query into the macro, the formatting causes issues (e.g. the query text is highlighted in red). *how do i incorporate the new query? *i tried using _ to connect, but at one point i received a message that too many were used. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Importing data via an external database query | Excel Discussion (Misc queries) | |||
Tool bar: Data/Import external data/New database query | Setting up and Configuration of Excel | |||
database query not showing foxpro database How I import data | New Users to Excel | |||
Anyone Else Use Database Query to Query Another Sheet in the Same Excel Workbook? | Excel Discussion (Misc queries) | |||
Anyone Else Use Database Query to Query Another Sheet in the Same Excel Workbook? | Excel Discussion (Misc queries) |