Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Perl DBD::Oracle

Status
Not open for further replies.

godspeed06

Vendor
Apr 7, 2006
34
US
I have successfully installed DBD::Oracle, however when running the query below I am seeing errors, can anyone tell me what Perl is complaining about?

SQL:
my $sql = qq{SELECT FROM sched_table from def_tables where user_daily=’SYSTEM’};

Error:
DBD::Oracle::db prepare failed: ORA-00936: missing expression (DBD ERROR: error possibly near <*> indicator at char 7 in 'SELECT <*>FROM sched_table from def_tables where user_daily=’SYSTEM’') [for Statement "SELECT FROM sched_table from def_tables where user_daily=’SYSTEM’"] at ./dbscript.pl line 26.


Many Thanks,
 
mbrooks, this is what I thought the sql above was doing, so yes this is what I am attempting to do.
 
There is 2 SQL syntax error:

It should be smething like.

Have a look at one sql tutorial.It would be useful

Code:
my $sql = qq{SELECT * FROM sched_table, def_tables where user_daily=’SYSTEM’ and (sched_table.columnX = def_tables.columnX)};


dmazzini
GSM System and Telecomm Consultant

 
Actually, of a sudden, which I can't explain the SQL starting working! I am getting what I expect from the sql below.

SQL:
my $sql = qq{SELECT sched_table FROM def_tables where user_daily='SYSTEM'};
 
This query

SELECT FROM sched_table from def_tables where user_daily=’SYSTEM’

is definitely different than this

SELECT sched_table FROM def_tables where user_daily='SYSTEM'

M. Brooks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top