Hi
I am having three oracle databases running in three different machine. their ip address is different. from one of the DB am able to access both the databases.(means am able to select values and insert values in to tables individually.)
I need to fetch some data from DB1 table(say DB1 ip is... (2 Replies)
Hello there.
I've got the query like that
SELECT count(tour_id) AS cnt
FROM orders
JOIN tours
ON orders.tour_id=tours.id
GROUP BY tour_id
The result Is
cnt
1
4
2
1
1
Now i have to select all records with minimum values in field "cnt"
MySQL function min() returns only one.... (2 Replies)
Anyone have a clue about this?
I have checked the MySQL documentation and it does not seem possible to exclude a row of a table from replication between Master and Slave. It seems that replication in MySQL can only be managed at the table level, not at the row level.
Does anyone know a work... (5 Replies)
Hello Everyone,
My issue is that I want to traverse a database table row by row and do some action on the value retrieved in each row.
I have gone through a lot of shell script questions/posts. I could find row by row traversal of a file but not a database table.
Please help.
Thanks &... (5 Replies)
Hi,
I have a tab-delimited file as follows:
1 1 2 2 3 3 4 4
a a b b c c d d
5 5 6 6 7 7 8 8
e e f f g g h h
9 9 10 10 11 11 12 12
i i j j k k l l
13 13 14 14 15 15 16 16
m m n n o o p p
The output I need is:
1 1 a a 5 5 e e 9 9 i i 13... (5 Replies)
Hi, I want to move a new row to another table if the field from new row doesn't have the first word that I categorized (like: IRC blablabla, PTM blablabla, ADM blablabla, BS blablabla).
I already use this script but doesn't work as I expected.
CHECK_KEYWORD="$( mysql -uroot -p123456 smsd -N... (7 Replies)
Hi, I already succeed moving a new row to another table if the field from new row doesn't have the first word that I categorized (like: IRC blablabla, PTM blablabla, ADM blablabla, BS blablabla).
But it can't delete the old row. Please help me with the script.
my php script:
INSERT INTO... (2 Replies)
Sorry if I repost my question in this section, but I'm really in a hurry since I have to finish my work... :(
Dear community,
I have a table with two rows like:
Row1 Row2
======= =======
7,3 text 1
1,3 text 2
1,2,3 blabla
What i need to do is add/copy... (2 Replies)
Hello,
I need some help to reformat this table-by-row to matrix?
infile:
site1 A:o,p,q,r,s,t
site1 C:y,u
site1 T:v,w
site1 -:x,z
site2 A:p,r,t,v,w,z
site2 C:u,y
site2 G:q,s
site2 -:o,x
site3 A:o,q,s,t,u,z
site3 C:y
site3 T:v,w,x
site3 -:p,routfile:
SITE o p q r s t v u w x y... (7 Replies)
Discussion started by: yifangt
7 Replies
LEARN ABOUT DEBIAN
sql::abstract::tree
SQL::Abstract::Tree(3pm) User Contributed Perl Documentation SQL::Abstract::Tree(3pm)NAME
SQL::Abstract::Tree - Represent SQL as an AST
SYNOPSIS
my $sqla_tree = SQL::Abstract::Tree->new({ profile => 'console' });
print $sqla_tree->format('SELECT * FROM foo WHERE foo.a > 2');
# SELECT *
# FROM foo
# WHERE foo.a > 2
METHODS
new
my $sqla_tree = SQL::Abstract::Tree->new({ profile => 'console' });
$args = {
profile => 'console', # predefined profile to use (default: 'none')
fill_in_placeholders => 1, # true for placeholder population
placeholder_surround => # The strings that will be wrapped around
[GREEN, RESET], # populated placeholders if the above is set
indent_string => ' ', # the string used when indenting
indent_amount => 2, # how many of above string to use for a single
# indent level
newline => "
", # string for newline
colormap => {
select => [RED, RESET], # a pair of strings defining what to surround
# the keyword with for colorization
# ...
},
indentmap => {
select => 0, # A zero means that the keyword will start on
# a new line
from => 1, # Any other positive integer means that after
on => 2, # said newline it will get that many indents
# ...
},
}
Returns a new SQL::Abstract::Tree object. All arguments are optional.
profiles
There are four predefined profiles, "none", "console", "console_monochrome", and "html". Typically a user will probably just use "console"
or "console_monochrome", but if something about a profile bothers you, merely use the profile and override the parts that you don't like.
format
$sqlat->format('SELECT * FROM bar WHERE x = ?', [1])
Takes $sql and "@bindargs".
Returns a formatting string based on the string passed in
parse
$sqlat->parse('SELECT * FROM bar WHERE x = ?')
Returns a "tree" representing passed in SQL. Please do not depend on the structure of the returned tree. It may be stable at some point,
but not yet.
unparse
$sqlat->parse($tree_structure, @bindargs)
Transform "tree" into SQL, applying various transforms on the way.
format_keyword
$sqlat->format_keyword('SELECT')
Currently this just takes a keyword and puts the "colormap" stuff around it. Later on it may do more and allow for coderef based
transforms.
pad_keyword
my ($before, $after) = @{$sqlat->pad_keyword('SELECT')};
Returns whitespace to be inserted around a keyword.
fill_in_placeholder
my $value = $sqlat->fill_in_placeholder(@bindargs)
Removes last arg from passed arrayref and returns it, surrounded with the values in placeholder_surround, and then surrounded with single
quotes.
indent
Returns as many indent strings as indent amounts times the first argument.
ACCESSORS
colormap
See "new"
fill_in_placeholders
See "new"
indent_amount
See "new"
indent_string
See "new"
indentmap
See "new"
newline
See "new"
placeholder_surround
See "new"
perl v5.10.1 2010-12-21 SQL::Abstract::Tree(3pm)