Sponsored Content
Full Discussion: Need Help (Select query)
Top Forums Shell Programming and Scripting Need Help (Select query) Post 302166432 by Sathy153 on Tuesday 12th of February 2008 12:59:29 AM
Old 02-12-2008
Try this..

May be you can try this..

Solution(1)
=========
(1) Create a temp table with coln : ID
(2) Copy 100 Ids.
If you are using isql, then BCP 100 ids to temp table
(3) Modify the query

select * from
xyz x,
temp t
where x.ID= t.ID

Solution(2)
=========
(1) Use excel spread sheet & paste the 100 Ids
(2) use spread sheet macro & add "," for each ID
Example:

1000,
1001,
1002, and so on

(3) Use the below query..( paste Ids from spread sheet)

select * from xyz
where ID in (
1000,
1001,
1002, -- paste from spread sheet
...
)

Hope above solution helps Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Select a portion of file based on query

Hi friends :) I am having a small problem and ur help is needed... I have a long file from which i want to select only some portions after filtering (grep). My file looks like : header xxyy lmno xxyy wxyz footer header abcd xy pqrs footer . . (14 Replies)
Discussion started by: vanand420
14 Replies

2. Shell Programming and Scripting

Displaying the data from the select query in a particular format

Hi, I have a shell script that returns 10 records for the column Name and age from a select query. Where when i store those data in retrieve_list.txt file i need to store the data in a particular format like:- $Jason$30 $Bill$23 $Roshan$25 Here is my script: 1)... (15 Replies)
Discussion started by: sachin.tendulka
15 Replies

3. Shell Programming and Scripting

How to store the data retrived by a select query into variables?

Hi Friends, Can u please help mw with the following query . I need to run a database sql statement to select particular fields from a table.I need to store the retrieved filed values into variables so that i can print it in a specific format. But the particular select query retrieves more... (12 Replies)
Discussion started by: jisha
12 Replies

4. UNIX for Dummies Questions & Answers

Reading from a file and passing the value to a select query

Hi all, Here is my problem. I want to read data from a file and pass the variable to a select query. I tried but it doesn't seem to work. Please advise. Example below. FileName='filekey.txt' while read LINE do var=$LINE print "For File key $var" ${ORACLE_HOME}/bin/sqlplus -s... (1 Reply)
Discussion started by: er_ashu
1 Replies

5. Shell Programming and Scripting

Redirect Postgresql Select Query to Variable

How to redirect postgresql select query to a variable using shell scripts? I tried to use psql -c "select ip from servers" db | egrep '+\.+\+\+' | sed 's/^ *\(.*\) *$/\1/' Output: 10.10.10.180 10.10.10.181 It display ip addresses from the databasem, but how could i redirect the... (3 Replies)
Discussion started by: uativan
3 Replies

6. Shell Programming and Scripting

Select query implement in a shell

I have been asked to create a shell script that accepts a number of SQL select queries as input, runs them in sequence, spools the output to an EXCEL workbook, where, each worksheet is an output of a Select statement run above. The workbook should be in a .XLS format. If a particular select... (2 Replies)
Discussion started by: ShellNovice1
2 Replies

7. Shell Programming and Scripting

mysql select query optimization..

hi.. i need to optimize my select query .. my situation is like this .. i have 15 lac recors in my table.. the following query takes nine seconds to give the required output.. SELECT max(ah.AUC_AMT), SUBSTRING_INDEX(GROUP_CONCAT(SUBSTRING_INDEX(ah.AUC_CUS_NAME,'@',1) order by AUC_AMT... (0 Replies)
Discussion started by: senkerth
0 Replies

8. UNIX for Advanced & Expert Users

mysql select query optimization..

hi.. i need to optimize my select query .. my situation is like this .. i have 15 lac recors in my table.. the following query takes nine seconds to give the required output.. SELECT max(ah.AUC_AMT), SUBSTRING_INDEX(GROUP_CONCAT(SUBSTRING_INDEX(ah.AUC_CUS_NAME,'@',1) order by AUC_AMT... (1 Reply)
Discussion started by: senkerth
1 Replies

9. Shell Programming and Scripting

Help in executing select query from perl script

Hi, I have a perl snippet that call a select query with a bind variable,when i compile the script I'm unable to get the query output. The same query when i fire in sqlplus fetches few rows. The query takes bit time to fetch results in sqlplus. my $getaccts = $lda->prepare("select distinct ... (1 Reply)
Discussion started by: rkrish
1 Replies

10. Programming

Query to SELECT only Column Names that Contain a Specific String?

Hey Guys, I'm using SQuirreL SQL v3.5 GUI to fetch some data that I need for something I'm working on. I'm also using the IBM Informix Driver (*Version 3.5) to connect to the Database. What I want to do, if it's even possible, is to show all COLUMNS if they contain the word "Email". So in... (2 Replies)
Discussion started by: mrm5102
2 Replies
FRONTEND-SPEC(7)														  FRONTEND-SPEC(7)

NAME
frontend-spec - interface between jw and its frontends DESCRIPTION
jw(1) calls frontends like frontends/docbook to get the informations specific to a given input format. The frontend knows which information to return from the first command line parameter. It gets all necessary data via environment variables ready to use. This document describes that command line parameter and those environment variables. The frontend should return 0 if there weren't any problem, and return a positive value otherwise. VARIABLES
$1 The command line parameter, specifying which information to return. It can take the following values: centralized-catalog The frontend must return the DTD-specific centralized catalog name. Centralized catalogs normally reside in /etc/sgml and provide the location of all the catalog files useful for handling this input type (the catalog for the DTD, the catalog for the stylesheets, the catalog for the entities, ...) style-sheet The frontend must return the filename of the style sheet to be used for this document type and with the chosen backend. SGML_CATALOGS_DIR The directory where the centralized catalogs reside. It is normally /etc/sgml. (This variable is valid only while determining the centralized catalog to use.) SGML_BASE_DIR The base directory of the SGML system. It is normally /usr/share/sgml. (This variable is valid only while determining the style sheet to use.) SGML_FILE The name of the file to convert. (This variable is valid only while determining the centralized catalog to use.) SGML_TYPE The type of the backend to use, whether it produces output files to be displayed online or to be printed out. It can take the value html or print. (This variable is valid only while determining the style sheet to use). SGML_STYLESHEETS The desired custom stylesheet type, either none or default. If none, the frontend must return the file name of the style sheet pro- vided by the system beneath the docbook-utils. If default, the frontend must return the custom stylesheet provided by the docbook- utils. (This variable is valid only while determining the style sheet to use). SGML_XML The metalanguage of the file to convert, either sgml or xml. (This variable is valid only while determining the centralized catalog to use). FILES
SEE ALSO
backend-spec(7) AUTHORS
Jochem Huhmann <joh@revier.com> 05 February 2003 FRONTEND-SPEC(7)
All times are GMT -4. The time now is 07:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy