Login | |
|
 |
ASP/VBScript SQL wierdness. - 4/26/2006 2:52:07 AM
|
|
 |
|
| |
feyrer
Posts: 6
Score: 0
Joined: 4/18/2006
Status: offline
|
This line of code compiles just fine in SQL Query but when I put it into the code as a Recordset it's erroring out, saying office ID (LO_OFFICE.ID, here as E.ID) doesn't exist. Any idea why? A note that import_TITLETRANSFORM M does have an ID field as well,but it isn't queried for the result set. Is that the source of the problem? I remember you saying something about this..thanks. Here's the query: strSQLCNORS1 = "SELECT E.ID, E.DTYPE, E.DNUMBER, E.MCDFIPS, E.COFIPS, M.NEW_TITLE2, E.NextElection, M.ELECTED, M.ASSISTANT, E.ADR, E.ADR2, E.CITY, E.STATE, E.ZIP, E.WPHONE, E.FAX, E.WEMAIL, E.ATC_ZONE, M.WADR FROM LO_OFFICE E INNER JOIN import_TITLETRANSFORM M ON E.DNAME = M.OLD_TITLE WHERE(M.MULTI_TITLE = '1')" And the error: Microsoft OLE DB Provider for ODBC Drivers error '80040e14' [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'ID'. /local_test/newsubroutine.asp, line 7 Any suggestions would be extremely helpful -- Christopher Feyrer
|
|
| |
|
|
|
 |
RE: ASP/VBScript SQL wierdness. - 4/26/2006 3:05:50 AM
|
|
 |
|
| |
feyrer
Posts: 6
Score: 0
Joined: 4/18/2006
Status: offline
|
strSQLCNORS1 = "SELECT E.ID as EID, M.ID AS MID, E.DTYPE, E.DNUMBER, E.MCDFIPS, E.COFIPS, M.NEW_TITLE2, E.NextElection, M.ELECTED, M.ASSISTANT, E.ADR, E.ADR2, E.CITY, E.STATE, E.ZIP, E.WPHONE, E.FAX, E.WEMAIL, E.ATC_ZONE, M.WADR FROM LO_OFFICE E INNER JOIN import_TITLETRANSFORM M ON E.DNAME = M.OLD_TITLE WHERE(M.MULTI_TITLE = '1')" Same error, do I need AS CLAUSES for everything? I assigned M.ID as MID just to be sure..
|
|
| |
|
|
|
| |
|
|
 |
|
 |
|
|