Link to home
Start Free TrialLog in
Avatar of anisotropic
anisotropic

asked on

ASP SQL Problems

I'm trying to get some data out of an Oracle DB using some SQL in an ASP. When I view the page, it returns this:

Microsoft OLE DB Provider for Oracle error '80040e14'

ORA-00923: FROM keyword not found where expected

/forddict/Java/showDM.asp, line 30


here's my code:

<%
      Owner = Request("Owner")
      TableName = Request("TableName")
      
    Set cnnDD = Server.CreateObject("ADODB.Connection")
      cnndd.Open Application("Forest_ConnectionString")
      Set rsItems = Server.CreateObject("ADODB.Recordset")
      SQL="SELECT all_tab_columns.owner Owner, all_tab_columns.table_name TableName," & _
"all_tab_columns.column_name ColumnName, all_tab_columns.data_type DataType," & _
"all_tab_columns.nullable Nullable," & _
      "substr(ind_col.index_name,1,3) PK" & _
      
      "FROM all_tab_columns," & _
      
      "(" & _
        "SELECT all_ind_columns.column_name," & _
            "all_ind_columns.table_name," & _  
            "all_ind_columns.index_name" & _
        "FROM all_ind_columns" & _
                  "Where  instr(all_ind_columns.index_name,'XPK')=1" & _
     ")  ind_col" & _
      
       
       
"WHERE all_tab_columns.column_name = ind_col.column_name (+)" & _
"AND   all_tab_columns.table_name = ind_col.table_name (+)" & _
"AND   all_tab_columns.owner = 'FOREST'" & _
"Order by all_tab_columns.owner ASC, all_tab_columns.table_name ASC, PK ASC"
      Set rsItems = cnndd.Execute(SQL)
      Response.Expires=0
%>
ASKER CERTIFIED SOLUTION
Avatar of samopal
samopal

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of anisotropic
anisotropic

ASKER

thanks, man - works great (doh!)
Glad to help you