Solved

ASP SQL Problems

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

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 …
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

760 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

22 Experts available now in Live!

Get 1:1 Help Now