Sponsored Content
Top Forums Shell Programming and Scripting How to print multiple rows from database query? Post 302908892 by bhaskar v on Friday 11th of July 2014 06:42:43 AM
Old 07-11-2014
hi,


when i have used same syntax in my script it just creating empty file only
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to handle the Multiple Rows in the Database

Hi All, I have problem with database validations, actually my requirement is, my code will generate some seqno;s, which i have to check in database, whether the generated seqno;s are present in database or not, if the generated seqno;s are present in the database means, i need to generate... (2 Replies)
Discussion started by: hsekol
2 Replies

2. Shell Programming and Scripting

storing database query in a variable

I am executing a SQL query in Unix Server: select status,location from user_information where request_id='DS-43720' In shell script I am writing this query in the below manner: echo "select status,location from user_information where request_id='DS-43720' ;" >> $directory/info.sql ... (3 Replies)
Discussion started by: debu
3 Replies

3. Shell Programming and Scripting

query to get a value from database

Hi friends, I have written a script which retrieves one value from the database. It takes time for the sql query to get the desired output. So the query runs fine from TOAD or from UNIX console. However if I put this in a script it doesn't work. The script is as below. #! /bin/ksh... (2 Replies)
Discussion started by: vivek_damodaran
2 Replies

4. Shell Programming and Scripting

Database Query

Hi, Am using informix database. When i give "isqlrf <database name> - " from the command prompt , i get connected to the database and i can run sql queries.. I am moving to freeBSD and when i give the same command at the prompt i get an error : Index already exists on column Why is this... (0 Replies)
Discussion started by: jisha
0 Replies

5. Shell Programming and Scripting

To spool output from a database query

Hi all, I would want to spool file for a database query, however by using crontab, the file is not spooled. Below shows my script: ORACLE_HOME="/u01/oraprod/perpdb/10.1.0/db_1" OUTFILE="/tmp/invalid.out" FILE="$HOME/admin/scripts" $ORACLE_HOME/bin/sqlplus -s "/as sysdba"... (0 Replies)
Discussion started by: *Jess*
0 Replies

6. Programming

Oracle Database Query

How can i modify the below to search for the things i'm looking for during a certain time frame? select Node, NodeAlias, Summary, Tally, AlertKey, AlertGroup, Manager, Agent from mrtg_alerts where LastOccurrence > '5-Dec-2010' order by Manager desc; In this particular case, this query is... (3 Replies)
Discussion started by: SkySmart
3 Replies

7. Shell Programming and Scripting

Split single rows to multiple rows ..

Hi pls help me out to short out this problem rm PAB113_011.out rm: PAB113_011.out: override protection 644 (yes/no)? n If i give y it remove the file. But i added the rm command as a part of ksh file and i tried to remove the file. Its not removing and the the file prompting as... (7 Replies)
Discussion started by: sri_aue
7 Replies

8. Shell Programming and Scripting

How to run a remote database query?

Thank you for taking the time to read my issue. I need to set up a script to run from a wagon wheel type toplogy where 1 server needs to query about 10 to 15 remote servers for duplicate values in a database table. If a duplicate value is found, send an email to me( or wall command to console).... (5 Replies)
Discussion started by: lutador72
5 Replies

9. Programming

Database query

I am getting an error function in date formate while importing the date ccolumn in oracle sql developer tool My date format in table is 6-Nov-14 and while importing its converted to 6/11/14 eventhough the format is as 6-Nov-14 in excel. could you please let help me out what I need to change... (6 Replies)
Discussion started by: ramkumar15
6 Replies

10. Programming

Hierarchical Query for Sybase database

Team I am using DBartisan tool for sybase database. I have a table that has below fields Employee_ID,EMP_Name,First_Nm,Last_Nm,Emp_Designation,Employee's_Manager is it possible to retrieve hierarchical data based on below fields Emp_Designation will have Soft Engg,SSE,Team Lead,... (6 Replies)
Discussion started by: Perlbaby
6 Replies
SQLITE_CHANGES(3)														 SQLITE_CHANGES(3)

sqlite_changes - Returns the number of rows that were changed by the most recent SQL statement

SYNOPSIS
int sqlite_changes (resource $dbhandle) DESCRIPTION
Object oriented style (method): int SQLiteDatabase::changes (void ) Returns the numbers of rows that were changed by the most recent SQL statement executed against the $dbhandle database handle. PARAMETERS
o $dbhandle - The SQLite Database resource; returned from sqlite_open(3) when used procedurally. This parameter is not required when using the object-oriented method. RETURN VALUES
Returns the number of changed rows. EXAMPLES
Example #1 Procedural style <?php $dbhandle = sqlite_open('mysqlitedb'); $query = sqlite_query($dbhandle, "UPDATE users SET email='jDoe@example.com' WHERE username='jDoe'"); if (!$query) { exit('Error in query.'); } else { echo 'Number of rows modified: ', sqlite_changes($dbhandle); } ?> Example #2 Object oriented style <?php $dbhandle = new SQLiteDatabase('mysqlitedb'); $query = $dbhandle->query("UPDATE users SET email='jDoe@example.com' WHERE username='jDoe'"); if (!$query) { exit('Error in query.'); } else { echo 'Number of rows modified: ', $dbhandle->changes(); } ?> SEE ALSO
sqlite_open(3). PHP Documentation Group SQLITE_CHANGES(3)
All times are GMT -4. The time now is 08:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy