- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- SQL scripts
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-05-2002 08:02 AM
тАО06-05-2002 08:02 AM
SQL scripts
sqlplus user/passw << END_SQL
select *
from table
EMD_SQL
I found that this doesn't work, mostly if there are multiple calls from the same script
Does any one know the conditions?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-05-2002 08:08 AM
тАО06-05-2002 08:08 AM
Re: SQL scripts
One point though... I'd always end each SQL statement with a ';' as in:
sqlplus user/passw << END_SQL
select *
from table ;
END_SQL
HTH
Duncan
I am an HPE Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-05-2002 08:09 AM
тАО06-05-2002 08:09 AM
Re: SQL scripts
Use perl:
http://www.bookpool.com/.x/3dp5s6acd6/sm/1565926994
examples:
http://www.oreilly.com/catalog/perldbi/chapter/ch04.html
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-05-2002 08:25 AM
тАО06-05-2002 08:25 AM
Re: SQL scripts
I fI cut and paste it all in a new file, it works.
It's like after x number of runs, it wont work
P.S. If I lived in a better place, then I would be allowed PERL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-05-2002 06:27 PM
тАО06-05-2002 06:27 PM
Re: SQL scripts
sqlscript.sql
connect scott/tiger
select * from table;
exit;
---
sqlplus /nolog @sqlscript.sql
-or-
sqlplus scott/tiger @sqlscript.sql
Either way will get you out of piping information directly to the command. One thing that I have found that can cause problems in the past (for me) is not outputting the information to something.
ie:
sqlplus <> /dev/null
connect internal
select * from table;
!
Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-05-2002 10:43 PM
тАО06-05-2002 10:43 PM
Re: SQL scripts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-06-2002 06:31 AM
тАО06-06-2002 06:31 AM
Re: SQL scripts
I actually work around it by creating a sql file and call it from sql.