Solved

ASP SQL Problems

Posted on 2000-03-20
3
254 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 …
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

830 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