09-16-2019
Normally we write the processing of SQL statements in a server-side scripting language meant for the web, using "created for the web languages" like PHP or Javascript.
Also, depending on how you write your SQL select query, the results of the select query are generally in an array and so the script generally needs to process an array, not a simple string or text file.
However, if you are looking for a single element only from the SQL select query, the results of the SQL query are often still in an array, a single element array.
So, in the general case, you should write your script to process an array as the input to your script which is the output of the SQL query.
This User Gave Thanks to Neo For This Post:
10 More Discussions You Might Find Interesting
1. Programming
helo i want to implement the following concept in my project
write a c/c++ algorithm for : accept a number from the user not greater than 6 digits and display the number in words i.e. if the input from the user is 18265 then the output should be Eighteen Thousand Two Hundred Sixty Five. if the... (3 Replies)
Discussion started by: amitpansuria
3 Replies
2. Shell Programming and Scripting
Hi..
How to search for multiple words in a single line using grep?.
Eg: Jack and Jill went up the hill
Jack and Jill were best friends
Humpty and Dumpty were good friends too
----------
I want to extract the 2nd statement(assuming there are several statements with... (11 Replies)
Discussion started by: anduzzi
11 Replies
3. Shell Programming and Scripting
Dear All,
I have a final output files as
736645|0|
13879|1|
495563|10|
127933|14|
4975|16|
49038|6|
53560|7|
135115|8|
178857|9|
Now I want to replace second column with respective tag as per the value (4 Replies)
Discussion started by: jojo123
4 Replies
4. UNIX Desktop Questions & Answers
well, i am so not familiar with this kind of things but i am gonna explain extactly what i am looking for so hopfully someone can figure it out :)
i have a command that shows memory usage besides the process name, for example(the command output):
500 kb process_1
600 kb process_2
700 kb... (4 Replies)
Discussion started by: Portabello
4 Replies
5. Shell Programming and Scripting
Hi,
I have a requirement with,
No~Dt~Notes
1~2011/08/1~"aaa
bbb
ccc
ddd
eee
fff
ggg
hhh"
Single column alone got splitted into multiple lines.
I require the output as
No~Dt~Notes
1~2011/08/1~"aaa<>bbb<>ccc<>ddd<>eee<>fff<>ggg<>hhh"
mean to say those new lines to be... (1 Reply)
Discussion started by: Bhuvaneswari
1 Replies
6. Shell Programming and Scripting
Hello All,
I'm a newbie/rookie in Shell scipting. I've done oracle export of a table using Export utility. When I do export, it generates 2 files.
1> .dmp file
2> .dmp.log file.
In .dmp.log file I have to search for a sentence which goes like '0 records have been inserted' and then... (2 Replies)
Discussion started by: samfisher
2 Replies
7. Shell Programming and Scripting
I want to basically do the below thing. Suppose there is a tag called object1. I want to display an output for all similar tag values under heading of Object 1 and the count of the xmls. Please help
File:
<xml><object1>house</object1><object2>child</object2>... (9 Replies)
Discussion started by: srkmish
9 Replies
8. Shell Programming and Scripting
Hi All,
I am working with a XML file.
Below is part for the file.
<Emp:Profile>
<Emp:Description>Admin</Emp:Description>
<Emp:Id>12347</Emp:Id>
</Emp:Profile>
<Emp:Profile>
... (7 Replies)
Discussion started by: Girish19
7 Replies
9. Shell Programming and Scripting
I have the input file like this.
Input file: 12.txt
1) There are one or more than one <tr> tags in same line.
2) Some tr tags may have one <td> or more tna one <td> tags within it.
3) Few <td> tags having "<td> </td>". Few having more than one " " entry in it.
<tr> some td... (4 Replies)
Discussion started by: thomasraj87
4 Replies
10. Shell Programming and Scripting
Greetings all,
I have an XML file that is being generated from my application, here is a sample of the first tag (That I am trying to remove and display in a list..)
Example-
<tag one= "data" data="1234" updateTime="1300">
<tag one= "data1" data="1234" updateTime="1300">
<tag... (5 Replies)
Discussion started by: jeffs42885
5 Replies
LEARN ABOUT DEBIAN
normalize::text::music_fields
Normalize::Text::Music_Fields(3pm) User Contributed Perl Documentation Normalize::Text::Music_Fields(3pm)
NAME
Normalize::Text::Music_Fields - normalize names of people's and (musical) works.
SYNOPSIS
$name = $obj->Normalize::Text::Music_Fields::normalize_person($name);
$work = $obj->Normalize::Text::Music_Fields::normalize_piece($work);
# $obj should have methods `name_for_field_normalization', 'shorted_person'
DESCRIPTION
Databases of names and of works-per-name are taken from plain-text files (optionally in mail-header format). Names are stored in *.lst
files. Works are stored in .comp files named after the shortened name of the composer.
The directories of these files are looked in the environment variable "MUSIC_FIELDS_PATH" (if defined, split the same way as "PATH"), or in
"$ENV{HOME}/.music_fields", and "-" (and "-" is replaced by the directory named as the module file with .pm dropped). At runtime, one can
replace the list by calling function Normalize::Text::Music_Fields::set_path() with the list of directories as the argument.
(Since parsed files are cached, replacing the directory list should be done as early as possible.)
Files may be managed with utility subroutines provided with the module:
# Translate from one-per-line to mail-header format:
perl -wple "BEGIN {print q(# format = mail-header)} s/#s*normalizeds*$//; $_ = qq(Title: $_) unless /^s*(#|$)/; $_ = qq(
$_) if $p and not /^##/; $_ .= qq(
) unless $p = /^##/" Normalize::Text::Music_Fields-G_Gershwin.comp >Music_Fields-G_Gershwin.comp-mail
# (inverse transformation:) Dump pieces listed in mail-header format
perl -MNormalize::Text::Music_Fields -wle "print for Normalize::Text::Music_Fields::read_composer_file(shift, shift)" gershwin Music_Fields-G_Gershwin.comp-mail > o
# Normalize data in 1-line-per piece format
perl -MNormalize::Text::Music_Fields -wle "Normalize::Text::Music_Fields::prepare_tag_object_comp(shift)->Normalize::Text::Music_Fields::normalize_file_lines(shift)"
# Create a mail-header file from a semi-processed (with "bold" fields)
# mail-header file (with xml escapes, preceded by opus number)
perl -MNormalize::Text::Music_Fields -00wnle "BEGIN {$tag = Normalize::Text::Music_Fields::prepare_tag_object_comp(shift @ARGV); print q(# format = mail-header)} print Normalize::Text::Music_Fields::emit_as_mail_header($tag,$_, q(bold,xml,opus),$pre)" shostakovich o-xslt-better >Music_Fields-D_Shostakovich.comp-mail1
# Likewise, from work-per-line with opus-numbers:
perl -MNormalize::Text::Music_Fields -wnle "BEGIN {$tag = Normalize::Text::Music_Fields::prepare_tag_object_comp(shift @ARGV); print qq(# format = mail-header
)} print Normalize::Text::Music_Fields::emit_as_mail_header($tag,$_, q(opus), $pre)" schnittke o-schnittke-better >Music_Fields-A_Schnittke.comp-mail2
# A primitive tool for merging additional info into the database:
perl -MNormalize::Text::Music_Fields -wnle "BEGIN {$tag = Normalize::Text::Music_Fields::prepare_tag_object_comp(shift @ARGV); print qq(# format = mail-header
)} next unless s/^s*++s*//; print Normalize::Text::Music_Fields::merge_info($tag,$_, q(opus,xml), qr(^(58|70|76|116|118|119)($|-)))" brahms o-brahms-op-no1-xslt
# Minimal consistency check of persons database.
perl -MNormalize::Text::Music_Fields -wle "BEGIN{binmode $_, ':encoding(cp866)' for *STDIN, *STDOUT, *STDERR} print Normalize::Text::Music_Fields->check_persons"
# Minimal testing code:
perl -MNormalize::Text::Music_Fields -e Normalize::Text::Music_Fields::test_normalize_piece
It may be easier to type these examples if one uses "manage_M_N_F.pm", which exports the mentioned subroutines to the main namespace
(available in examples directory of a distribution of "MP3::Tag"). E.g., the last example becomes:
perl -Mmanage_M_N_F -e test_normalize_piece
perl v5.14.2 2009-05-08 Normalize::Text::Music_Fields(3pm)