02-28-2014
Stored procedures are also a possibility.
9 More Discussions You Might Find Interesting
1. Solaris
All,
We are contemplating a port of an existing software product and would like to expend as little effort as possible. Our new database would be MS-SQL, and we would write stored procedures to perform common db operations. We'd like to call these stored procedures from C or C++ code running... (3 Replies)
Discussion started by: mparks
3 Replies
2. Shell Programming and Scripting
Hi-
I am trying to achieve the following in a script so I can schedule it on a cron job. I am fairly new to the unix environment...
I have written a shell script that reads a flat file and loads the data into an Oracle table (Table1) via SQLLDR. This Works fine. Then, I run a nested insert... (5 Replies)
Discussion started by: rajagavini
5 Replies
3. Shell Programming and Scripting
Hi all,
I have sql query as follows. Please write a pro*c program for the following query.
select
sp1.cost_change
||','|| sp1.cost_change_desc
||','|| sp1.reason
||','|| to_char(sp1.active_date,'DD-MON-YYYY HH24:MI:SS')
||','|| sp1.status
||','|| sp1.cost_change_origin... (0 Replies)
Discussion started by: user71408
0 Replies
4. UNIX for Dummies Questions & Answers
Hi All,
I have written 4 SQL queries. I want to write PRO*C program for this. I want to put these 4 queries in a single PR*C program using threading concept. Please guide me to write the pogram.
the queries are as follows.
1. select * from head;
2. select * from details;
3. delete from head... (0 Replies)
Discussion started by: user71408
0 Replies
5. UNIX for Dummies Questions & Answers
Hi guys,
I am new on here, I have a function in oracle that returns a specific value:
create or replace
PACKAGE BODY "CTC_ASDGET_SCHED" AS
FUNCTION FN_ASDSCHEDULE_GET
RETURN VARCHAR2
AS
BEGIN
DECLARE
ASDSchedule varchar2(6);
ASDComplete... (1 Reply)
Discussion started by: reptile
1 Replies
6. Shell Programming and Scripting
Hi!
I would like to do a single connection to sqlplus and execute some querys.
Actually I do for every query one connection to database
i.e
echo 'select STATUS from v$instance;
exit' > $SQL_FILE
sqlplus user/pass@sid @$SQL_FILE > $SELECT_RESULT
echo 'select VERSION from v$instance;... (6 Replies)
Discussion started by: guif
6 Replies
7. UNIX for Advanced & Expert Users
Hi Experts:
I have a shell script that's kicked off by cron. Inside this shell script, I need to kick off two or more oracle sql scripts to process different groups of tables. And when both sql scripts are done, I will continue in the shell script to do other things like checking processing... (3 Replies)
Discussion started by: huasheng8
3 Replies
8. Shell Programming and Scripting
Hello,
I have a Pro*C program which contains SQL sentences, such as:
....
Pro*C sentences
....
/*SQL 1*/
EXEC SQL SELECT t1.field1, t1.field2
INTO :w_field
FROM TABLE1 t1, TABLE1 t2
WHERE t1.field1 = t2.field1
AND t1.ID = :wl_id;
....
Pro*C sentences
....
/*SQL 1*/
EXEC... (11 Replies)
Discussion started by: mvalonso
11 Replies
9. Shell Programming and Scripting
Hi All,
I want to run multiple sql queries and store the data in variable but i want to use sql command only once. Is there a way without running sql command twice and storing.Please advise.
Eg :
Select 'Query 1 output' from dual;
Select 'Query 2 output' from dual;
I want to... (3 Replies)
Discussion started by: Rokkesh
3 Replies
LEARN ABOUT DEBIAN
tangram::type::hash::scalar
Tangram::Type::Hash::Scalar(3pm) User Contributed Perl Documentation Tangram::Type::Hash::Scalar(3pm)
NAME
Tangram::Type/Hash/Scalar - map Perl hash of scalar keys and values
SYNOPSIS
use Tangram::Core;
use Tangram::Type/Hash/Scalar; # always
$schema = Tangram::Schema->new(
classes => { NaturalPerson => { fields => {
flat_hash =>
{
opinions =>
{
table => 'NP_ops',
key_sql => 'VARCHAR(10)',
type => 'int',
sql => 'NUMERIC(1)',
},
lucky_numbers => 'int', # use defaults
}
DESCRIPTION
Maps references to a Perl hash. The persistent fields are grouped in a hash under the "flat_hash" key in the field hash.
The hash may contain as keys and values only 'simple' scalars like integers, strings or real numbers. It may not contain references. For
hashs of objects, see Tangram::Type::Hash::FromMany and Tangram::Type::Hash::FromOne.
Tangram uses a table to save the state of the collection. The table has three columns, which contain
* the id of the container object
* the key of the element in the hash
* the value of the element
The field names are passed in a hash that associates a field name with a field descriptor. The field descriptor may be either a hash or a
string. The hash uses the following fields:
* key_type
* key_sql
* type
* sql
* table
The optional fields "key_type" and "type" specify the key and value types of the hash. If the type is "string" Tangram quotes the values as
they are passed to the database. Not specifying a "type" is exactly equivalent to specifying "string".
Optional field "table" sets the name of the table that contains the elements. This defaults to 'C_F', where C is the class of the contain-
ing object and F is the field name.
The optional fields "key_sql" and "sql" specify the type that deploy() (see Tangram::Deploy) should use for the column containing the key
and value of the hash. If this field is not present, the SQL type is derived from the "type" field: if "type" is "string" (or is absent)
VARCHAR(255) is used; otherwise, the "type" field is interpreted as a SQL type.
If the descriptor is a string, it is interpreted as the value of the "type" field and all the other fields take the default value.
AUTHOR
This mapping was contributed by Gabor Herr <herr@iti.informatik.tu-darmstadt.de>
perl v5.8.8 2006-03-29 Tangram::Type::Hash::Scalar(3pm)