error in rails 1.2.3 activerecord

i'm a rails nuby so i don't know where to fix this in the activerecord
module....

there is no such column in the sys.view.user_constraints.
SELECT uc.index_name FROM user_constraints uc WHERE uc.constraint_type =
'P'

It would help to see the source from which the tables are constructed
(SQL, migrations,...)

this prevents me from doing a rake test:functionals ...as in below....

C:\railsspace>c:\ruby186\ruby\bin\ruby c:\ruby186\ruby\bin\rake
test:functionals --trace
(in C:/railsspace)
** Invoke test:functionals (first_time)

        [...]

** Execute db:schema:load
rake aborted!
./db/schema.rb:9: syntax error, unexpected tIDENTIFIER, expecting kDO or
'{' or
'('
c:/ruby186/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/de

        [...in rake...]

`run'
c:/ruby186/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/bin/rake:7
c:/ruby186/ruby/bin/rake:16:in `load'
c:/ruby186/ruby/bin/rake:16

So this is your schema.rb??

# This file is autogenerated. Instead of editing this file, please use
the
# migrations feature of ActiveRecord to incrementally modify your
database, and
# then regenerate this schema definition.

ActiveRecord::Schema.define(:version => 2) do

# Could not dump table "users" because of following
ActiveRecord::StatementInvalid
# OCIError: ORA-00904: invalid column name: SELECT

This is Oracle? I'm unfamiliar with that.

lower(i.index_name) as index_name, i.uniqueness, lower(c.column_name) as
column_name
              FROM user_indexes i, user_ind_columns c
             WHERE i.table_name = 'USERS'
               AND c.index_name = i.index_name
               AND i.index_name NOT IN (SELECT uc.index_name FROM
user_constraints uc WHERE uc.constraint_type = 'P')
              ORDER BY i.index_name, c.column_position

end

It's hard (for me) to tell where this is coming from without a bit more
info on how your tables are declared.

        Hugh