...
i have a table named clusters and it looks like this
I want all my model values to be changed to +1 and -1
whichever model number are postive have to be +1 and whichever model number are negative have to be -1.
The table should look like this
clusters
...
What about records that have "model" value 0 ?
If you want to update those to 0 (in other words, keep them as they are), or if you are sure such values won't occur in your data, then your UPDATE statement could be simply -
tyler_durden
These 2 Users Gave Thanks to durden_tyler For This Post:
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)
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)
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)
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)
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)
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)
Hello people,
as wrote in title I'm going crazy with a "complex" SQL select.
This is the seelct:
select T_ADDRESS, T_MCC,T_MNC,T_MSIN,T_IM_MNC, COUNT(*) FROM TABLETEST
WHERE T_MCC=123 AND (T_MNC=11 OR T_MNC=01)
GROUP BY T_ADDRESS,T_MCC,T_MNC,T_MSIN,T_IM_MNC HAVING count(*) > 5;This select... (7 Replies)
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)
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
LEARN ABOUT DEBIAN
4s-import
4S-IMPORT(1J) 4store 4S-IMPORT(1J)NAME
4s-import -- Import RDF into a 4store KB
SYNOPSIS
4s-import kbname [-v] [-a] [-M default-model] [-m model] [-f format] [rdf-file] ...
-v, --verbose
Increase verbosity (by default success is silent)
-a, --add
Ordinarily importing RDF to a model replaces any previous contents of that model, by using the --add flag this behaviour is
overridden and any triples which were previously in the model are retained.
-M, --model-default
Set a model (graph) URI which is used by default for all imported files
-m, --model
Set a model (graph) URI for the next named file only (overrides -M if it has been used)
-f, --format
Tell the RDF parser the format of the files (if not specified the parser will guess)
SEE ALSO 4s-query(1), 4s-size(1), 4s-httpd(1), 4s-backend(1), 4s-delete-model(1)EXAMPLES
$ 4s-import demo one.ttl two.xrdf
Imports two files into the demo KB, each as a separate model (graph) guessing the RDF format used for each file
$ 4s-import demo -M http://example.com/menu starters.ttl mains.ttl sweets.ttl
Imports three files into a single graph named <http://example.com/menu>
4store May 31, 2019 4store