When using left join in a select statement, the table is referenced and then a period, then the field id. I am trying to create a Select statement in VB using a variable as the table name, and trying to concatenate the variable with ".fieldname". The select statement doesn't like this. Is there a way to code this with extra quotes or something?
For example, typical select statement might read "Select table1.field1, table1.field2, table1.field3 FROM table1"
What I want to do is replace the table1 references within the quotes with a variable name. The table needs to be variable, and I can't just code it like this "Select " & variable & ".field1," & variable & ".field2," & variable & ".field3 FROM " & variable
Codes seems to stumble on the period before field identifiers. Is there another way to code this.
Thanks
For example, typical select statement might read "Select table1.field1, table1.field2, table1.field3 FROM table1"
What I want to do is replace the table1 references within the quotes with a variable name. The table needs to be variable, and I can't just code it like this "Select " & variable & ".field1," & variable & ".field2," & variable & ".field3 FROM " & variable
Codes seems to stumble on the period before field identifiers. Is there another way to code this.
Thanks