Solved

ASP SQL Problems

Posted on 2000-03-20
3
256 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
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 informatio…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

636 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