Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
46 views

How to get my result from Procedure

How can i get my out parameters from my procedure. My stl_mbc_cdr table has over 100 records and i cant see my results. declare call_charge VARCHAR(10); MSG_OUT VARCHAR(50); BEGIN FOR ...
Dulguun's user avatar
1 vote
1 answer
143 views

Batch altering profiles of users

I currently have a list of databases where the profiles of users are out of date. A lot are listed under default where we want them to be either USR_PROFILE or DBA_PROFILE. I have a list of all the ...
OllyhatesFYP's user avatar
-2 votes
1 answer
716 views

Generate testing data with PL/SQL

I need to fill a partitioned table with 100 000 of records generated by PL/SQL. I am thinking about creating a procedure with a loop that will iterate 100000 times. To generate the strings I want to ...
kozlone's user avatar
  • 31
1 vote
2 answers
6k views

Compile a PLSQL package code that was passed to an sqlplus session via a shell script?

I have two files: (1) and (2) (1) A Shell script - wrapper.sh #!/bin/sh echo "start of shell script" FILE_NAME="XX_PKGb.sql" sqlplus user/password @sql_deploy.sql $FILE_NAME echo "end of shell ...
user avatar
0 votes
2 answers
1k views

Oracle: How to split records across days

I have data with two timestamp columns startdate and enddate. The data is produced continuously everyday and some records are such that the startdate is one day and the enddate is the nextday as it ...
sfactor's user avatar
  • 111
0 votes
0 answers
11k views

execute .sql script inside an anonymous pl/sql block which is invoked by a shell script

I got a shell script which connects to SQLPLUS and executes the .sql file like below: read a x=`echo $a | cut -d , -f 1` y=`echo $a | sed 's/.*,//'` c=`echo $USER | cut -c -2`"OPR"`echo $USER | ...
SSS1's user avatar
  • 11
4 votes
1 answer
5k views

Does SQL Server 2008 have an equivalent to Oracle's “table%rowtype” syntax or (Data Type)?

In Oracle PL/SQL scripts, you can declare a variables using the syntax tablename%rowtype for its type. This will make that variable have the same "type" as a row of that table (i.e. a it will be a ...
Harry Sarshogh's user avatar
6 votes
2 answers
82k views

How to store single result in variable and reuse it in a query (Oracle)?

I have a query like SELECT id FROM xyz WHERE ...; which has a more or less complex WHERE clause and returns exactly one row with one column (ID). I need this ID for several later queries in a script....
cljk's user avatar
  • 167
1 vote
2 answers
549 views

ORM-style server-side programming languages (OO replacement for PL/SQL?)

Good evening, Is there an Object Oriented replacement for PL/SQL, allowing server side procedures to be written [and then called client or server side]? (for MySQL, PostgreSQL, Oracle or etc.)
A T's user avatar
  • 391