10 More Discussions You Might Find Interesting
1. Programming
Hi All,
I had a query related to sql select replace command.
i have a table named clusters and it looks like this
Code:
name characteristics
sample 1.1 parent
sample 1.2 ... (2 Replies)
Discussion started by: siya@
2 Replies
2. Programming
Hi All,
I had a query related to sql select update replace command.
i have a table named clusters and it looks like this
name model characteristics
sample1.1 +123 parent
sample1.2 -456 clone
sample1.3 +122 ... (5 Replies)
Discussion started by: sonia102
5 Replies
3. Shell Programming and Scripting
I know I know..
for sure one of the easier mysql statements. But somehow I can not figure out this.
I expect to see all distinct items of 'data_12' where 'kwroot' has 'straxx' in, and in the same row 'data_12' ist (not = 'kwsearched' in any existing row)
data_12 ... (6 Replies)
Discussion started by: lowmaster
6 Replies
4. Shell Programming and Scripting
Hi there
I have a database on a remote box and i have been using shell script to insert data into it for example, i could have a script that did this
SN=123456
n=server1
m=x4140
sql="UPDATE main SET hostname='$n',model='$m' WHERE serial='$SN';"
echo $sql |/usr/sfw/bin/mysql -h... (4 Replies)
Discussion started by: hcclnoodles
4 Replies
5. Shell Programming and Scripting
count.sh#!/bin/ksh
SQL1=`sqlplus -s usr/pwd @count.sql $1 $2 $3`
SQL2=`sqlplus -s usr/pwd @selectall.sql $1 $2 $3`
LIST="Count Select_All"
select i in $LIST
do
if
then
echo $SQL1
elif
then
echo $SQL2
fi
done (2 Replies)
Discussion started by: killboy
2 Replies
6. Shell Programming and Scripting
Dear All ,
I have file1.txt contain values like the following:
----------
23
24
25
and I have shell script which has the following :
more file1.txt | awk '{print "select 'DUMP',CODE1||'|'||CODE2||'|'||CODE3 from CODE where CODE1='" $1 "';"}' > file2.sql
all I need is to have the... (6 Replies)
Discussion started by: habuzahra
6 Replies
7. Shell Programming and Scripting
Hi,
I need to get the value from the table using the sql command and store this value into the unix variable so that i can use this value for furthure use..
Please can any body help me in this regards
Thanks & Regards
Abdul Hafeez Shaik (17 Replies)
Discussion started by: abdulhafeez
17 Replies
8. Web Development
I have following.
.
.
.
$userid = 2
.
$query = "select username from users where userid = ".$userid.";";
.
$username = $line;
$data="Some Data Here";
.
$query = "insert into logger (username, data) valuse ($username, $data);";
.
I would like to not have 2 database calls. (3 Replies)
Discussion started by: Ikon
3 Replies
9. Shell Programming and Scripting
Hi,
I have about 12 columns and 15 rows to be retrived from sybase isql command through unix. But when i output the sql into a file and see it, the formatting is going for a toss. can someone please suggest how can i get the result correctly in the output file ?
Thanks,
Sateesh (2 Replies)
Discussion started by: kotasateesh
2 Replies
10. UNIX for Dummies Questions & Answers
Hello
I would like to perform a select from a oracle table and return those values to my shell script
For example:
site=head -1 $infile | cut -c1-15 | awk '{printf "s%", $0}
sqlplus -s /nolog |& #Open pipe to sql
select col1, col2, col3, col4
from oracle_table
where col5 =... (6 Replies)
Discussion started by: houtakker
6 Replies
DBIx::Class::SQLMaker(3) User Contributed Perl Documentation DBIx::Class::SQLMaker(3)
NAME
DBIx::Class::SQLMaker - An SQL::Abstract-based SQL maker class
DESCRIPTION
This module is a subclass of SQL::Abstract and includes a number of DBIC-specific workarounds, not yet suitable for inclusion into the
SQL::Abstract core. It also provides all (and more than) the functionality of SQL::Abstract::Limit, see
DBIx::Class::SQLMaker::LimitDialects for more info.
Currently the enhancements to SQL::Abstract are:
o Support for "JOIN" statements (via extended "table/from" support)
o Support of functions in "SELECT" lists
o "GROUP BY"/"HAVING" support (via extensions to the order_by parameter)
o Support of "...FOR UPDATE" type of select statement modifiers
o The "-ident" operator
o The "-value" operator
OPERATORS
-ident
Used to explicitly specify an SQL identifier. Takes a plain string as value which is then invariably treated as a column name (and is being
properly quoted if quoting has been requested). Most useful for comparison of two columns:
my %where = (
priority => { '<', 2 },
requestor => { -ident => 'submitter' }
);
which results in:
$stmt = 'WHERE "priority" < ? AND "requestor" = "submitter"';
@bind = ('2');
-value
The -value operator signals that the argument to the right is a raw bind value. It will be passed straight to DBI, without invoking any of
the SQL::Abstract condition-parsing logic. This allows you to, for example, pass an array as a column value for databases that support
array datatypes, e.g.:
my %where = (
array => { -value => [1, 2, 3] }
);
which results in:
$stmt = 'WHERE array = ?';
@bind = ([1, 2, 3]);
AUTHORS
See "CONTRIBUTORS" in DBIx::Class.
LICENSE
You may distribute this code under the same terms as Perl itself.
perl v5.12.5 2011-07-27 DBIx::Class::SQLMaker(3)