|
|
|
ช่วยดู error code Incorrect syntax near the keyword 'SELECT'. |
|
|
|
|
|
|
|
Incorrect syntax near the keyword 'SELECT'.
/export_data/date/test.asp, line 98
ทำไมerror แบบนี้ฝากผู้รู้ช่วยดูให้หน่อยค่ะ
code เป็นแบบนี้ค่ะ
strsql = " Select Material, "
strsql = strsql & " Material_Description, "
strsql = strsql & " Cost_Center, "
strsql = strsql & " GL_Account,"
strsql = strsql & " Material_Type,"
strsql = strsql & " Material_Group"
strsql = strsql & " From "
strsql = strsql & " Material_Master INNER JOIN"
strsql = strsql & " SAP_GI ON Material_Master.Material_Description= SAP_GI.Material_Description "
strsql = strsql & " Group By "
strsql = strsql & " SAP_GI.Masterial,"
strsql = strsql & " Material_Master.Material_Description,"
strsql = strsql & " SAP_GI.Cost_Center,"
strsql = strsql & " SAP_GI.GL_Account,"
strsql = strsql & " Material_Master.Material_Type,"
strsql = strsql & " Material_Master.Material_Group"
'strsql = strsql & " Where "
'strsql = strsql & " Posting_Date >= '03/01/2010' "
'strsql = strsql & " And Posting_Date <= '03/31/2010'"
'strsql = strsql & " HAVING "
'strsql = strsql & " Cost_Center like '%" & vcost_center & "%' "
'strsql = strsql & " And GL_Account like '%" & vgl_account & "%' "
strsql = strsql & " HAVING "
strsql = strsql & " SAP_GI.Material = ANY SELECT Material "
strsql = strsql & " FROM "
strsql = strsql & " SAP_GI "
strsql = strsql & " WHERE "
strsql = strsql & " (Cost_center like '%" & vcost_center & "%')AND('GL_Account like '%" & vgl_account & "%' )AND(Posting_Date>='03/10/2010"&"<=03/31/2010') "
strsql = strsql & " GROUP BY "
strsql = strsql & " Material AND(SAP_GI.Cost_Center like '%" & vcost_center & "%')AND(SAP_GI.GL_Account like '%" & vgl_account & "%') "
RS.OPEN strsql ,CON ,1,3
Tag : - - - -
|
|
|
|
|
|
Date :
2010-05-17 14:56:14 |
By :
nok |
View :
1846 |
Reply :
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ถ้าใช้ SUB SELECT ให้ใช้วงเล็บด้วยน่ะครับ
|
|
|
|
|
Date :
2010-05-17 21:03:25 |
By :
webmaster |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 01
|