Sponsored Content
Top Forums Programming Query SQL get two values differents from the same columns Post 302889635 by spacebar on Saturday 22nd of February 2014 01:56:27 PM
Old 02-22-2014
Post your table definitions(i.e columns) for your two tables so we can assist you in learning how to join the two tables to produce the output you desire.
 

10 More Discussions You Might Find Interesting

1. 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

2. Shell Programming and Scripting

Query Oracle tables and return values to shell script that calls the query

Hi, I have a requirement as below which needs to be done viz UNIX shell script (1) I have to connect to an Oracle database (2) Exexute "SELECT field_status from table 1" query on one of the tables. (3) Based on the result that I get from point (2), I have to update another table in the... (6 Replies)
Discussion started by: balaeswari
6 Replies

3. Shell Programming and Scripting

Run SQL thru shell script: how to get a new line when run sql query?

Hi, this's Pom. I'm quite a new one for shell script but I have to do sql on shell script to query some information from database. I found a concern to get a new line...When I run my script, it retrieves all data as wondering but it's shown in one line :( What should I do? I'm not sure that... (2 Replies)
Discussion started by: Kapom
2 Replies

4. Shell Programming and Scripting

Adding columns with values dependent on existing columns

Hello I have a file as below chr1 start ref alt code1 code2 chr1 18884 C CAAAA 2 0 chr1 135419 TATACA T 2 0 chr1 332045 T TTG 0 2 chr1 453838 T TAC 2 0 chr1 567652 T TG 1 0 chr1 602541 ... (2 Replies)
Discussion started by: plumb_r
2 Replies

5. UNIX for Dummies Questions & Answers

Getting values of 2 columns from sql query in UNIX variables

Hi, I have connected to oracle database with sqlplus -s / <<EOF select ename, age from emp where empid=1234; EOF I want to save the values of ename and age in unix shell variables. Any pointers would be welcome.. Thanks in advance!!1 Cheers :):):):) (1 Reply)
Discussion started by: gonchusirsa
1 Replies

6. Shell Programming and Scripting

Query the table and return values to shell script and search result values from another files.

Hi, I need a shell script, which would search the result values from another files. 1)execute " select column1 from table_name" query on the table. 2)Based on the result, need to be grep from .wft files. could please explain about this.Below is the way i am using. #!/bin/sh... (4 Replies)
Discussion started by: Rami Reddy
4 Replies

7. Shell Programming and Scripting

Reading values from sql query

I have sql query in shell script. select distinct account_no from adj order by account_no; This query returns account number daily.Sometimes it may return 90 rows sometime it may return 1 row only and someday it may return 0 rows I am storing the output of this query in sql_output.txt. ... (5 Replies)
Discussion started by: rafa_fed2
5 Replies

8. Shell Programming and Scripting

Request: How to Parse dynamic SQL query to pad extra columns to match the fixed number of columns

Hello All, I have a requirement in which i will be given a sql query as input in a file with dynamic number of columns. For example some times i will get 5 columns, some times 8 columns etc up to 20 columns. So my requirement is to generate a output query which will have 20 columns all the... (7 Replies)
Discussion started by: vikas_trl
7 Replies

9. Shell Programming and Scripting

awk - matching on 2 columns for differents lines

Given this file (I separated them in block to make my explanation clearer): 92157768877;Sof_deme_Fort_Email_am_%yyyy%%mm%%dd%;EMAIL;20/02/2015;1;0;0 92157768877;Sof_trav_Fort_Email_am_%yyyy%%mm%%dd%;EMAIL;20/02/2015;1;0;0 91231838895;Sof_deme_faible_Email_am;EMAIL;26/01/2015;1 0;0... (1 Reply)
Discussion started by: Andy_K
1 Replies

10. Shell Programming and Scripting

Asign to variable ksh some values of sql query

Hi, I'm trying to asign to ksh varible some values of a sql query. The output query would be: xxxx 1 yyyy 2 I do: values=`$PATH_UTI/query_sh " select think1||'------'||think2 from some_table where think3 = '$1'; ... (2 Replies)
Discussion started by: mierdatuti
2 Replies
mnesia_registry(3erl)					     Erlang Module Definition					     mnesia_registry(3erl)

NAME
mnesia_registry - Dump support for registries in erl_interface. DESCRIPTION
The module mnesia_registry is usually part of erl_interface , but for the time being, it is a part of the Mnesia application. mnesia_registry is mainly an module intended for internal usage within OTP, but it has two functions that are exported for public use. On C-nodes erl_interface has support for registry tables. These reside in RAM on the C-node but they may also be dumped into Mnesia tables. By default, the dumping of registry tables via erl_interface causes a corresponding Mnesia table to be created with mnesia_registry:cre- ate_table/1 if necessary. The tables that are created with these functions can be administered as all other Mnesia tables. They may be included in backups or repli- cas may be added etc. The tables are in fact normal Mnesia tables owned by the user of the corresponding erl_interface registries. EXPORTS
create_table(Tab) -> ok | exit(Reason) This is a wrapper function for mnesia:create_table/2 which creates a table (if there is no existing table) with an appropriate set of attributes . The table will only reside on the local node and its storage type will be the same as the schema table on the local node, ie. {ram_copies,[node()]} or {disc_copies,[node()]} . It is this function that is used by erl_interface to create the Mnesia table if it did not already exist. create_table(Tab, TabDef) -> ok | exit(Reason) This is a wrapper function for mnesia:create_table/2 which creates a table (if there is no existing table) with an appropriate set of attributes . The attributes and TabDef are forwarded to mnesia:create_table/2 . For example, if the table should reside as disc_only_copies on all nodes a call would look like: TabDef = [{{disc_only_copies, node()|nodes()]}], mnesia_registry:create_table(my_reg, TabDef) SEE ALSO
mnesia(3erl), erl_interface(3erl) Ericsson AB mnesia 4.4.17 mnesia_registry(3erl)
All times are GMT -4. The time now is 07:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy