Sponsored Content
Top Forums Shell Programming and Scripting Extracting data from SQL using a variable from a file Post 302568604 by singas1 on Thursday 27th of October 2011 06:32:16 PM
Old 10-27-2011
Extracting data from SQL using a variable from a file

Though, its not new, I am a newbie to shell scripting. Please help me with the below.

There are two steps.

First one is to read a table and create a file with the distinct values. I am able to get this done.

Second step is to read the file (which has the single value, like a number) and pass it as a variable to the sql with which I have to get that particular set of data to send an email.

I tried to create the script but could not create it without errors.

Can you please help me with a small sample of it so that I can use it to create it as per my requirement.


Thanks a lot for your time and information.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

extracting recursive data file

Hi Gurus, Can awk be able to do this source file: 1|SPFE2027G1|1PFE-7000|T34801188|5066-0844| 2|T34801188|5066-0844|T35002355|5066-0845| 3|T35002355|5066-0845|T35203409|QFBR-7798| 1|SPFE2027H1|1PFE-7000|T34801198|5066-0844| 2|T34801198|5066-0844|T35002365|5066-0845| formatted into:... (1 Reply)
Discussion started by: bbeugie
1 Replies

2. Shell Programming and Scripting

how to assign sql output data to shell script variable

Hi Guys ! I am new to unix and want to find out how we can make sql statement data to shell script variable? Any help/suggestion is greatly appreciated -Chandra (1 Reply)
Discussion started by: kattics
1 Replies

3. UNIX for Advanced & Expert Users

Extracting data from an AFP file

Hello Anybody any idea how to extract data from an AFP file using UNIX commands? I could make the AFP to PDF or if there is any other to change it to to make the extraction simplar. I'm open to ideas. Cheers (4 Replies)
Discussion started by: Dolph
4 Replies

4. Shell Programming and Scripting

Extracting Data from xml file

Hi ppl out there... Can anyone help me with the shell script to extract data from an xml file. My xml file looks like : - <servlet> <servlet-name>FrontServlet</servlet-name> <display-name>FrontServlet</display-name> ... (3 Replies)
Discussion started by: nishana
3 Replies

5. UNIX for Dummies Questions & Answers

Extracting Data from a File

Hi I need to calculate the number of occurrences of a item in a number of files using Perl. The item appears continually throughout the files but in each case I only want to calculate it in certain blocks of the file. Example - Calculalte the number of occurrences of a 'pass' in a block of... (0 Replies)
Discussion started by: oop
0 Replies

6. Shell Programming and Scripting

extracting data from a .csv file

I have a .csv file equipment,bandtype abc,aws def,mmds ghi,umts jkl,mmds I can get the equipment from `hostname`. In my script i want to check what is the hostname. then see if it exists in the.csv file. if it does then i want to store the second parameter(bandtype) for the corresponding... (3 Replies)
Discussion started by: lassimanji
3 Replies

7. Shell Programming and Scripting

How to use sql data file in unix csv file as input to an sql query from shell

Hi , I used the below script to get the sql data into csv file using unix scripting. I m getting the output into an output file but the output file is not displayed in a separe columns . #!/bin/ksh export FILE_PATH=/maav/home/xyz/abc/ rm $FILE_PATH/sample.csv sqlplus -s... (2 Replies)
Discussion started by: Nareshp
2 Replies

8. Shell Programming and Scripting

Extracting specific lines of data from a file and related lines of data based on a grep value range?

Hi, I have one file, say file 1, that has data like below where 19900107 is the date, 19900107 12 144 129 0.7380047 19900108 12 168 129 0.3149017 19900109 12 192 129 3.2766666E-02 ... (3 Replies)
Discussion started by: Wynner
3 Replies

9. UNIX for Dummies Questions & Answers

Extracting data from file

I am trying to compare the data in lines 3 & 5 to see if they match up to the '-S570' (see first code set, all proprietary information has been removed from code set) spawn telnet Trying ... Connected to CA-LOS1234-ASE-S570.cl . Escape character is '^]'. CA-LOS1234-ASE-S570 Username: ... (1 Reply)
Discussion started by: slipshft
1 Replies

10. Shell Programming and Scripting

Need Help in extracting data from XML File

Hi All My input file is an XML and it has some tags and data rows at end. Starting of data rows is <rs:data> and ending of data rows is </rs:data>. Within sample data rows (2 rows) shown below, I want to extract data value after equal to sign (until space or "/" sign). So if XML data... (7 Replies)
Discussion started by: vx04
7 Replies
XtCreatePopupShell(3)						   XT FUNCTIONS 					     XtCreatePopupShell(3)

NAME
XtCreatePopupShell, XtVaCreatePopupShell - create a popup shell SYNTAX
Widget XtCreatePopupShell(String name, WidgetClass widget_class, Widget parent, ArgList args, Cardinal num_args); Widget XtVaCreatePopupShell(String name, WidgetClass widget_class, Widget parent, ...); ARGUMENTS
args Specifies the argument list to override the resource defaults. name Specifies the text name for the created shell widget. num_args Specifies the number of arguments in the argument list. parent Specifies the parent widget. widget_class Specifies the widget class pointer for the created shell widget. ... Specifies the variable argument list to override the resource defaults. DESCRIPTION
The XtCreatePopupShell function ensures that the specified class is a subclass of Shell and, rather than using insert_child to attach the widget to the parent's children list, attaches the shell to the parent's pop-ups list directly. A spring-loaded pop-up invoked from a translation table already must exist at the time that the translation is invoked, so the translation manager can find the shell by name. Pop-ups invoked in other ways can be created ``on-the-fly'' when the pop-up actually is needed. This delayed creation of the shell is particularly useful when you pop up an unspecified number of pop-ups. You can look to see if an appropri- ate unused shell (that is, not currently popped up) exists and create a new shell if needed. SEE ALSO
XtCreateWidget(3), XtPopdown(3), XtPopup(3) X Toolkit Intrinsics - C Language Interface Xlib - C Language X Interface X Version 11 libXt 1.1.4 XtCreatePopupShell(3)
All times are GMT -4. The time now is 11:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy