06-05-2015
Thank you.... works great
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi!
I've a text file programme1.out :
CONNECT TO ORACLE (&CONXORA);
CREATE TABLE TABLE1 AS
SELECT ID_PERS
FROM CONNECTION TO ORACLE
(
SELECT DISTINCT PERS.ID_PERS
FROM TAB_GRP GRP , TAB_PERS PERS
WHERE DATE_DEB_GRP <=... (0 Replies)
Discussion started by: stagebi
0 Replies
2. 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
3. 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
4. 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
5. Shell Programming and Scripting
Hi everyone,
another question while using sed.
my sed statement should parse every line in a file and store all "i" variable item a a new file.
any wrong arguments here?
Thanks a million.
task_name => name,
object_type => 'TABLE',
attr1 => 'TestR3',
attr2 => '$i',
for i... (4 Replies)
Discussion started by: sundaygeek
4 Replies
6. Shell Programming and Scripting
Hello all, I tried searching for something similiar before posting but couldn't come up with anything that fit what I need.
In Linux, I'm trying to parse through a number of files and take the info in them and put it into mysql. My file is a dump from an expect script:
---filename... (3 Replies)
Discussion started by: hamanjam
3 Replies
7. Shell Programming and Scripting
Hi Forum.
Need your expertise on the following question.
I have the following file which I would like to parse, find first block of SELECT statment and concatenate all input fields as 1 field (~ delimited):
Old File:
SELECT /*+ USE_HASH(CCOMM ICAR IMAP IAS IP IMAS IMPS IAP SPCA) */
... (5 Replies)
Discussion started by: pchang
5 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
Hello All,
I have a requirement in which i will be given a sql query as input in a file with dynamic number of columns. For example some times i will get 5 columns, some times 8 columns etc up to 20 columns.
So my requirement is to generate a output query which will have 20 columns all the... (7 Replies)
Discussion started by: vikas_trl
7 Replies
10. 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
sql::translator::parser::xml::sqlfairy
SQL::Translator::Parser::XML::SQLFairy(3pm) User Contributed Perl Documentation SQL::Translator::Parser::XML::SQLFairy(3pm)
NAME
SQL::Translator::Parser::XML::SQLFairy - parser for SQL::Translator's XML.
SYNOPSIS
use SQL::Translator;
my $translator = SQL::Translator->new( show_warnings => 1 );
my $out = $obj->translate(
from => 'XML-SQLFairy',
to => 'MySQL',
filename => 'schema.xml',
) or die $translator->error;
print $out;
DESCRIPTION
This parser handles the flavor of XML used natively by the SQLFairy project (SQL::Translator). The XML must be in the namespace
"http://sqlfairy.sourceforge.net/sqlfairy.xml." See SQL::Translator::Producer::XML::SQLFairy for details of this format.
You do not need to specify every attribute of the Schema objects as any missing from the XML will be set to their default values. e.g. A
field could be written using only;
<sqlf:field name="email" data_type="varchar" size="255" />
Instead of the full;
<sqlf:field name="email" data_type="varchar" size="255" is_nullable="1"
is_auto_increment="0" is_primary_key="0" is_foreign_key="0" order="4">
<sqlf:comments></sqlf:comments>
</sqlf:field>
If you do not explicitly set the order of items using order attributes on the tags then the order the tags appear in the XML will be used.
default_value
Leave the attribute out all together to use the default in Schema::Field. Use empty quotes or 'EMPTY_STRING' for a zero lenth string.
'NULL' for an explicit null (currently sets default_value to undef in the Schema::Field obj).
<sqlf:field default_value="" /> <!-- Empty string -->
<sqlf:field default_value="EMPTY_STRING" /> <!-- Empty string -->
<sqlf:field default_value="NULL" /> <!-- NULL -->
ARGS
Doesn't take any extra parser args at the moment.
LEGACY FORMAT
The previous version of the SQLFairy XML allowed the attributes of the the schema objects to be written as either xml attributes or as data
elements, in any combination. While this allows for lots of flexibility in writing the XML the result is a great many possible XML formats,
not so good for DTD writing, XPathing etc! So we have moved to a fixed version described in SQL::Translator::Producer::XML::SQLFairy.
This version of the parser will still parse the old formats and emmit warnings when it sees them being used but they should be considered
heavily depreciated.
To convert your old format files simply pass them through the translator :)
$ sqlt -f XML-SQLFairy -t XML-SQLFairy schema-old.xml > schema-new.xml
BUGS
Ignores the order attribute for Constraints, Views, Indices, Views, Triggers and Procedures, using the tag order instead. (This is the
order output by the SQLFairy XML producer).
SEE ALSO
perl, SQL::Translator, SQL::Translator::Producer::XML::SQLFairy, SQL::Translator::Schema.
TODO
o Support options attribute.
o Test foreign keys are parsed ok.
o Control over defaulting.
AUTHOR
Mark D. Addison <mark.addison@itn.co.uk>, Jonathan Yu <frequency@cpan.org>
perl v5.14.2 2012-01-18 SQL::Translator::Parser::XML::SQLFairy(3pm)