Solved

ASP SQL Problems

Posted on 2000-03-20
3
250 Views
Last Modified: 2012-06-27
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
%>
0
Comment
Question by:anisotropic
  • 2
3 Comments
 
LVL 9

Accepted Solution

by:
samopal earned 50 total points
ID: 2637614
<"substr(ind_col.index_name,1,3) PK" & _
<"FROM all_tab_columns," & _
There is no space between PK and FROM

HTH

0
 

Author Comment

by:anisotropic
ID: 2637747
thanks, man - works great (doh!)
0
 
LVL 9

Expert Comment

by:samopal
ID: 2637808
Glad to help you
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now