• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

PL / SQL BLOCK EXECUTION

 
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have written a PL SQL block of code and tried to execute it with a /.

My SQL file had a space before the / and it resulted in syntax error.

The same file worked in another environment. I am not sure if both the environments are having same version for oracle client.

My questions are

-- Is it a violation of SQL to have a space before /

-- if any one version of oracle client does remove the space before /

Any thoughts / suggestions will be appreciated.
 
Ranch Hand
Posts: 338
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you need to be asking this in the oracle forum... but are you trying to execute the block in sqlplus?

a line with a single . followed with a line that says run; works for me.

could you post your code and how you're executing it?
 
Vicky Mohan
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the response.

I think there are two ways to execute a block of code.

I was having the SQL block following by a / in a new line.

My only issue was there was a space before / and it failed.

I am using oracle client 8.1.7.

my question is, i want to know if a space before / is a problem.

I ran in SQL PLUS also and it resulted in error when i had a space before /
 
Paul Campbell
Ranch Hand
Posts: 338
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
in sqlplus it is a slash (/) on the line with no spaces.
 
Vicky Mohan
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks.

But it was working in one environment and not working in another environment.

so, i was wondering if this has got to do with different version of oracle.
 
Paul Campbell
Ranch Hand
Posts: 338
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Vicky Mohan:
Thanks.

But it was working in one environment and not working in another environment.

so, i was wondering if this has got to do with different version of oracle.



I don't have an answer except that is quite possibly an issue with using an old Oracle release (8 is no longer supported)... It isn't really anything I think is going to be terribly worthwhile in getting a definitive answer for what is probably an 8x issue. I would just go with the code that worked in both environments.

here is the link to the command reference for sqlplus.

http://download.oracle.com/docs/cd/B10501_01/server.920/a90842/ch13.htm#1011097
[ October 07, 2008: Message edited by: Paul Campbell ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic