Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Forming a query in unix level Post 302571058 by pandeesh on Sunday 6th of November 2011 12:35:32 AM
Old 11-06-2011
Forming a query in unix level

Hi,

I will execute a query in sqlplus and redirect to a file.
The file will contains the date value such as 2011-04-12 02:00:00.
i want to make the content of the file such as,
Code:
select * from table where col1>to_date('2011-04-12 02:00:00','yyyy-mm-dd HH24:MI:SS').

Apar from the bold one(which we got the result from query), the remaining text are always constant.
How i can do this in unix script?

Thanks

Last edited by vbe; 11-06-2011 at 05:43 AM.. Reason: code tags
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Oot: Level 2 Unix Support? meaning

Hi all, I am sorry, I know this is not correct forum/silly question (usually this is requirement in some vacancies), but i hope someone can explain to me, what is the meaning of : SUN Tier 3 Support Tier 3 Application Installation Level 2 Solaris Level 2 AD MOM + DBA Thank you. (0 Replies)
Discussion started by: blesets
0 Replies

2. UNIX for Advanced & Expert Users

How to disable application level logs in Unix?

Hi, I'm working in an application and the related Java code and the envrionment is in Unix server. We are generating the log messages using loggers of Java.util.log . But, the logs are not getting generated in the log files. We feel that the people who developed the system might have done some... (6 Replies)
Discussion started by: kelangovan
6 Replies

3. UNIX for Dummies Questions & Answers

How to determine the level of OS in HP-UNIX

How can you determine the level ot the operating system on an HP UNIX System? (2 Replies)
Discussion started by: aschmid
2 Replies

4. Solaris

Difference between run level & init level

what are the major Difference Between run level & init level (2 Replies)
Discussion started by: rajaramrnb
2 Replies

5. UNIX for Dummies Questions & Answers

forming duplicate rows based on value of a key

if the key (A or B or ...others) has 4 in its 3rd column the 1st A row has to form 4 dupicates along with the all the values of A in 4th column (2.9, 3.8, 4.2) . Hope I explain the question clearly. Cheers Ruby input "A" 1 4 2.9 "A" 2 5 ... (7 Replies)
Discussion started by: ruby_sgp
7 Replies

6. Shell Programming and Scripting

Forming an insert query using awk

Hi, I'm trying to form an insert sql query using shell programming. I have table named company with four columns 'company name', 'company id', 'company code' and 'last change id' I have to read the company name, company code and last change id from a file delimited by | which has around 10... (4 Replies)
Discussion started by: rakesh_s
4 Replies

7. Shell Programming and Scripting

forming group script from a text file

I am trying to make group of number of ID's. I have prepared following perl script but it does not provide any output. INPUT File 0174 0175 0176 0177 CODE: #!/usr/bin/perl -w $memlst = "/tmp/test.txt"; $membercnt = `wc -l $memlst`; $memhd = `head -1 $memlst`; $memcnt1 = 1; $class... (1 Reply)
Discussion started by: dynamax
1 Replies

8. UNIX for Dummies Questions & Answers

Online UNIX intermediate level documentation

Hi, Can maybe some of the UNIX-guys recommend an online UNIX intermediate level documentation with examples (not too dry :-). More the post-beginner level, for someone who has to play around with files and directories, with chmod, grep, sed, a little awk maybe... bw, Omar KN (once tasted... (2 Replies)
Discussion started by: OmarKN
2 Replies

9. Red Hat

SSL certificate generation on OS level or application level

We have a RHEL 5.8 server at the production level and we have a Java application on this server. I know of the SSL certificate generation at the OS (RHEL) level but it is implemented on the Java application by our development team using the Java keytool. My doubt is that is the SSL generation can... (3 Replies)
Discussion started by: RHCE
3 Replies

10. Red Hat

Query about Block Level Migration

Hi We are planning to migrate to a new SAN storage environment. Our RHEL5.5 servers boot over SAN. 1. I was wondering if using "lvm mirroring" or "pvmove" would be a solution. 2. Do they do block level transfer? Thanks (1 Reply)
Discussion started by: ikn3
1 Replies
IFX_PREPARE(3)								 1							    IFX_PREPARE(3)

ifx_prepare - Prepare an SQL-statement for execution

SYNOPSIS
resource ifx_prepare (string $query, resource $link_identifier, [int $cursor_def], mixed $blobidarray) DESCRIPTION
Prepares a $query for later use with ifx_do(3). For "select-type" queries a cursor is declared and opened. Non-select queries are "execute immediate". For either query type the number of (estimated or real) affected rows is saved for retrieval by ifx_affected_rows(3). If the contents of the TEXT (or BYTE) column allow it, you can also use ifx_textasvarchar(1) and ifx_byteasvarchar(1). This allows you to treat TEXT (or BYTE) columns just as if they were ordinary (but long) VARCHAR columns for select queries, and you don't need to bother with blob id's. With ifx_textasvarchar(0) or ifx_byteasvarchar(0) (the default situation), select queries will return BLOB columns as blob id's (integer value). You can get the value of the blob as a string or file with the blob functions (see below). PARAMETERS
o $query - The query string. o $link_identifier - The link identifier. o $cursor_def - This optional parameter allows you to make this a scroll and/or hold cursor. It's a bitmask and can be either IFX_SCROLL, IFX_HOLD, or both or'ed together. o $blobidarray - If you have BLOB (BYTE or TEXT) columns in the query, you can add a $blobidarray parameter containing the corresponding "blob ids", and you should replace those columns with a "?" in the query text. RETURN VALUES
Returns a valid result identifier for use by ifx_do(3), or FALSE on errors. SEE ALSO
ifx_do(3). PHP Documentation Group IFX_PREPARE(3)
All times are GMT -4. The time now is 02:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy