Sponsored Content
Full Discussion: Oracle TRICk Question
Top Forums Programming Oracle TRICk Question Post 302744513 by Perlbaby on Friday 14th of December 2012 11:33:24 AM
Old 12-14-2012
Hi BIPI ,

Code:
select '(STATE=' || regexp_replace(state,'([[:alpha:]]{2})',q'['\1']') || ' AND 
ITEMS in (' || regexp_replace(rtrim (xmlagg (xmlelement (e, items || ',')).extract ('//text()'), ','),'([[:alnum:]]{3,4})',q'['\1']') || ')'
from tmp_state_items group by state;

whare should i keep ITEMS values of '1234','ghyt','DDD','GHTD','ABF' in above query ??
Also add OR inbetween two outputs . Like
Code:
(STATE='DF' and ITEMS in ('2345','ggdh','k5tg','dgyt','hFF') OR STATE='PQ' and ITEMS in ('1234','ghyt','DDD','GHTD','ABF') )


Last edited by Scott; 12-14-2012 at 01:19 PM.. Reason: Code tags
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Stupid find trick

At work, we use a software development product (from a company that will remain nameless, but whose name may be considered a synonym for "logical"). The development trees are organized beneath a top directory, let's call it "$rat". The first level under $rat contains the major system names, and... (2 Replies)
Discussion started by: criglerj
2 Replies

2. UNIX for Dummies Questions & Answers

Looking for tips ant trick extend vi

Hello im looking for sites or tutorials how to extend vi (not vim) for programming and scripting beyond simple editing . Thanks allot (0 Replies)
Discussion started by: umen
0 Replies

3. Shell Programming and Scripting

Any trick to speed up script?

Hi Guys, I have a script that I am using to convert some text files to xls files. I create multiple temp. files in the process of conversion. Other than reducing the temp. files, are there any general tricks to help speed up the script? I am running it in the bash shell. Thanks. (6 Replies)
Discussion started by: npatwardhan
6 Replies

4. UNIX and Linux Applications

Oracle DB Question

Hi, Where do i post Oracle DB related questions?? I basically have 2 questions - 1. What is pmon and smon? Difference between them? If either or both process fail then how can we monitor them? 2. Is lsnrctl same as tnslsnr? if i want to check for listener status then how would i do... (2 Replies)
Discussion started by: Mr. Zer0
2 Replies

5. UNIX for Dummies Questions & Answers

A trick to avoid ESC in vim

Hello, I find a trick to avoid pressing ESC without key-maping in vim. I am pleasure using this method, because ALT key is very comfortble for thumb to press. What's the trick? the ALT key. When you are in INSERT mod, press ALT+l switch to COMMAND mod without... (2 Replies)
Discussion started by: vistastar
2 Replies

6. UNIX for Dummies Questions & Answers

alternative to the grep trick

Hi, We used to use the below commands often. ps -ef|grep bc ps -ef|grep abc|grep -v grep Both fairly returns the same result. For example, the process name is dynamic and we are having the process name in a variable, how we can apply the above trick. For example "a" is the... (11 Replies)
Discussion started by: pandeesh
11 Replies

7. UNIX for Dummies Questions & Answers

Vi search starting from line n --- any trick for this ???

Hi all, It does not seem to be possible to use vi to search from text from line n forward or backward or is there a not well known vi trick to do that? What I am trying to do is for example I am on line 100 and I want to search from line 100 backward or forward for a specific text. Using /... (3 Replies)
Discussion started by: newbie_01
3 Replies

8. UNIX for Beginners Questions & Answers

UNIX trick or command

Hi, Is there any command to do this -- Input is -- Ant Bat Cat Dog Output is -- A_Ant B_Ant A_Bat B_Bat A_Cat B_Cat A_Dog B_Dog (12 Replies)
Discussion started by: Indra2011
12 Replies
PAPS(1) 						      General Commands Manual							   PAPS(1)

NAME
paps - UTF-8 to PostScript converter using Pango SYNOPSIS
paps [options] files... DESCRIPTION
paps reads a UTF-8 encoded file and generates a PostScript language rendering of the file. The rendering is done by creating outline curves through the pango ft2 backend. OPTIONS
These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. --landscape Landscape output. Default is portrait. --columns=cl Number of columns output. Default is 1. --font=desc Set the font description. Default is Monospace 12. --rtl Do rtl layout. --paper ps Choose paper size. Known paper sizes are legal, letter, a4. Default is A4. --bottom-margin=bm Set bottom margin in postscript points (1/72 inch). Default is 36. --top-margin=tm Set top margin. Default is 36. --left-margin=lm Set left margin. Default is 36. --right-margin=rm Set right margin. Default is 36. --help Show summary of options. --header Draw page header for each page. --markup Interpret the text as pango markup. --encoding=ENCODING Assume the documentation encoding is ENCODING. --lpi Set the lines per inch. This determines the line spacing. --cpi Set the characters per inch. This is an alternative method of specifying the font size. --stretch-chars Indicates that characters should be stretched in the y-direction to fill up their vertical space. This is similar to the texttops behaviour. AUTHOR
paps was written by Dov Grobgeld <dov.grobgeld@gmail.com>. This manual page was written by Lior Kaplan <kaplan@debian.org>, for the Debian project (but may be used by others). April 17, 2006 PAPS(1)
All times are GMT -4. The time now is 10:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy