like the below
there are many columns.. so how can i extract only column name from this.. column name changes everytime and differs it specification
consider the above 1st or 2nd or 3rd line will be in a variable called var i want to extract only reserved2 or reserved3 or server to a variable. can you plz help me how to do that.. :-/
---------- Post updated at 05:45 PM ---------- Previous update was at 05:44 PM ----------
i am getting this error... :-/ if you go through the code in the hyper link you might be able to understand
Is it possible to pass a variable name, as a parameter to a function, so it can be created within this function ?
Something like this:
func_uppercase abcdefgh var_name
where the 1st parameter is the string I want to convert and the 2nd is the desired variable name...
$2=`echo "$1" |... (2 Replies)
Hi,
I am trying to sum up numbered columns and in order to tidy up the program I have wrote a function to do the adding of some numbers. I have a problem though with passing a variable to the function in the UNIX bash shell. The function only gives the first number in the variable list and does... (4 Replies)
Suppose I have a unix variable called RGNM which is holding a value. Now I want to call a plsql function in my script. THis plsql function takes one IN parameter. I want to pass my UNIX VARIABLE Value to the plsql function. Can i just give it by giving $RGNM in the function after calling sqlplus... (1 Reply)
I would like to know how to pass a variable inside a variable to a function.
sample code below
--------------
for x in 1 9
do
check_null $C$x ##call function to check if the value is null
if
then
echo "line number:$var_cnt,... (2 Replies)
Hi ,
I have three funcions f1, f2 and f3 .
f1 calls f2 and f2 calls f3 .
I have a global variable "period" which i want to pass to f3 .
Can i pass the variable directly in the definition of f3 ?
Pls help .
sars (4 Replies)
Hi All,
I am new to shell scripting required some help in passing the parameter value to the shell script.
I am writing a shell script, in the script I have created two functions as below.
first function
get_trend_ids () {
Here I am connecting to the database and getting all the... (3 Replies)
All,
I have a log file containing lots of data now i want to extract all text between block below(names) without the title or end pattern but only names,
++++START++++
SCOTT TIGER
HENRY PAUL
JARED OTIENO
OMOLLO JA NIGERIA
++++END++++
the names i want to return and store in a variable in... (1 Reply)
I have a below syntax its working fine...
var12=$(ps -ef | grep apache | awk '{print $2,$4}')
Im getting expected output as below:
printf "%b\n" "${VAR12}"
dell 123
dell 456
dell 457
Now I wrote a while loop.. the output of VAR12 should be passed as input parameters to while loop and results... (5 Replies)
Hello All,
I would like to ask help from you on how to pass variable value from a function that has been called inside the function. I have created below and
put the variables in " ". Is there another way I can do this? Thank you in advance.
readtasklist() {
while read -r mod ver... (1 Reply)
Discussion started by: aderamos12
1 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)