Please help! SQL script

‘41’ institution_code,

c.ssn,

c.last_name,

c.first_name,

c.middle_initial,

k.annual_sch_completed,

y.fafsa_received,

y.cost_of_education,

w.tuition,

y.fee_residence,

v.room_board_charges,

x.other_charges,

y.dependency_status,

y.parent_contribution,

y.student_contribution,

y.parent_income,

y.student_income,

max(decode(z.seq, 2, z.fund || ’ ’ || z.amount, null)) fund2,

max(decode(z.seq, 4, z.fund || ’ ’ || z.amount, null)) fund4,

max(decode(z.seq, 6, z.fund || ’ ’ || z.amount, null)) fund6,

max(decode(z.seq, 8, z.fund || ’ ’ || z.amount, null)) fund8,

max(decode(z.seq, 10, z.fund || ’ ’ || z.amount, null)) fund10,

max(decode(z.seq, 12, z.fund || ’ ’ || z.amount, null)) fund12

inner

Hi all,

I have this SQL statement below. It throws an error saying “FROM not found where expected.” If the script below is too messy. I have attach a txt file of the script.

Please enlighten me why it would do throw an error.

KEVIN

select distinct c.pidm_key,‘2010’ finaid_year_begin,‘C’ commuter_status,‘0’ annual_contact_hrs_completed,max(decode(z.seq, 1, z.fund || ’ ’ || z.amount, null)) fund1,max(decode(z.seq, 3, z.fund || ’ ’ || z.amount, null)) fund3,max(decode(z.seq, 5, z.fund || ’ ’ || z.amount, null)) fund5,max(decode(z.seq, 7, z.fund || ’ ’ || z.amount, null)) fund7,max(decode(z.seq, 9, z.fund || ’ ’ || z.amount, null)) fund9,max(decode(z.seq, 11, z.fund || ’ ’ || z.amount, null)) fund11,from as_student_enrollment_summary c
TOAD FORUM.txt (5.49 KB)

This parses fine for me when using an native Oracle parser. What db platform are you connected to? And how are you connected? If using ODBC to Oracle, please change to use a native Oracle connection.

Also, let me know what version of the product you are using.

Debbie

Yea, I’m connected using an ODBC to Oracle. I will asked by DBA for the native Oracle connection.

TOAD for Data Analysts 2.70

Yes. That will be the best thing. An instant client will work fine and the help file explains how to set up.

The only thing is that the ODBC driver needs to use an oci client to run so you must already have a client installed.

Have you tried making a connection using the connection type called ‘Oracle’?

Debbie

In your original SQL you have seqfrom run together. I ran it through an online utility here (http://www.dpriver.com/pp/sqlformat.htm) & it barked at that point. (Never hurts to try another parser, I say.)

HTH, Jeff