Sponsored Content
Full Discussion: awk cmd for vlookup in Mysql
Top Forums Shell Programming and Scripting awk cmd for vlookup in Mysql Post 302930984 by Shenbaga.d on Friday 9th of January 2015 07:50:44 AM
Old 01-09-2015
awk cmd for vlookup in Mysql

Hi,

Is there possible to do vlookup in Mysql one table from another table based on one column values and placed the data in same table?

if it is possible in mysql itself pls share links for reference.
Here is the ex: i need to vlookup the cus.id in table to and place the cus.name in 4th column of table 1.
Table 1
Code:
Count	date	Cus.id
20	8012015	104.3
25	9012015	104.5
40	9012015	104.3

Code:
Cus.id	Cus.name
104.3	Math
104.5	Visy
104.3	Math

Thanks..

Last edited by Shenbaga.d; 01-09-2015 at 09:00 AM.. Reason: adding info
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Vlookup using awk

Hello, I am trying to use vlookup (Excel function) using awk but there is some problem :( --file1-- ABC123 101F X1 A $P=Z X2 A $P=X X3 B $P=F X4 C $P=G MNK180 END --file2-- X1 A_t $P=Z X2 A_t $P=X X3 B_u $P=F X4 C_o $P=G (2 Replies)
Discussion started by: young
2 Replies

2. Shell Programming and Scripting

awk script to perform an action similar to vlookup between two csv files in UNIX

Hi, I am new to awk/unix and am trying to put together an awk script to perform an action similar to vlookup between the two csv files. Here are the contents of the two files: File 1: Date,ParentID,Number,Area,Volume,Dimensions 2014-01-01,ABC,247,83430.33,857.84,8110.76... (9 Replies)
Discussion started by: Prit Siv
9 Replies

3. Shell Programming and Scripting

Vlookup using awk

Hi folks, awk 'NR==FNR {m=$0; next} $1 in m{$0=m} {print}' file2 file1 Works a charm for a vlookup type query, sourced from https://www.unix.com/shell-programming-and-scripting/215998-vlookup-using-awk.html However my column content has white spaces and numbers. Example file1 The Man... (6 Replies)
Discussion started by: pshields1984
6 Replies

4. Shell Programming and Scripting

Excel vlookup function like value mapping with awk

I have two files File1 175552 st_497858.1 rs86052.1 rs92185.1 st_001022416.1 174841 175552_174841 179912 st_001122967.2 rs90435.1 rs89122.1 st_001022583.1 175545 179912_175545 179912 st_001122967.2 rs90435.1 rs89122.1 st_001022584.1 175545 179912_175545 179967 st_001256606.1 rs93516.2... (1 Reply)
Discussion started by: sammy777888
1 Replies

5. Shell Programming and Scripting

Vlookup using awk without exact match for two colum input

Source file 1 335 R1-snapfound 0098F RDFType:R1 R2-Dev R2-snapfound ,010C0 RemoteSymmetrixID:345 335 R1-snapfound 00990 RDFType:R1 R2-Dev R2-snapfound ,010C1 RemoteSymmetrixID:345 335 R1-snapfound 009C0 RDFType:R1 R2-Dev R2-snapfound ,009C1 RemoteSymmetrixID:345 335 R1-snapfound 009C1... (5 Replies)
Discussion started by: ranjancom2000
5 Replies

6. Shell Programming and Scripting

Vlookup using awk without exact match

Code used to find the server from cloum 3 and update needtotakesnap Output came from above command awk 'NR==FNR{A;next}$3 in A{$3 = "needtotakesnap " $3}1' /home/Others/active-server.txt /home/Others/all-server |grep server1 879 dummy server1_217_silver dummy 00870 TDEV 2071575 831 Tier1... (3 Replies)
Discussion started by: ranjancom2000
3 Replies

7. Shell Programming and Scripting

Vlookup using awk non similar files

I need to vlookup and check the server not found. Source file 1 server1 server2 server3 server4 server5_root server6_silver server7 server7-test server7-temp Source file 2 server1_bronze (6 Replies)
Discussion started by: ranjancom2000
6 Replies

8. Shell Programming and Scripting

Vlookup multiple file and awk

Hello Folks, What I wish to do is: If first column matches in main and new file, then paste $COL2 into output file. Something like vlookup. Please see also bold text in expected output. mainfile 11 22 33 44 55 66 77 88 99 100 101 102 (4 Replies)
Discussion started by: baris35
4 Replies

9. UNIX for Beginners Questions & Answers

Vlookup on 2 files - inserting vlookup command on another command

Hello, i am trying to print group name column(etc/group) on script (etc/passwd) since group name is not listed on etc/passwd columns. Im trying to do a vlookup. but i cant figure out how i can insert the vlookup command FNR==NR inside the print out command or the output. I also tried exporting... (2 Replies)
Discussion started by: joonisio
2 Replies

10. UNIX for Beginners Questions & Answers

Vlookup not using awk

Hi I just want again to ask for help on what command to use to vlookup f1 group name in "/etc/group" matching f3 of it to "/etc/passwd" f4. I do need to display group name in the output of /etc/passwd without using awk or NR==FNR command. thank you while IFS=: read -r f1 f2 f3 f4 f5 f6 f7... (4 Replies)
Discussion started by: joonisio
4 Replies
CINTERNET(1)                                                          SMPPPD                                                          CINTERNET(1)

NAME
cinternet - simple frontend for smpppd DESCRIPTION
cinternet is a simple frontend for the smpppd. OPTIONS
These options are recognized by cinternet. If a long option shows an argument as mandatory, then it is mandatory for the equivalent short option also. The order of the options is relevant except for the --verbose, --only-local, --version and --help options. -I, --interface-list List all configured interfaces of the smpppd. The interfaces are also marked either with `u' or `d' for their status of up or down respectively. The interface names are utf-8 encoded. -i, --interface-name=NAME Specify a interface. A interface must be specified for most of the options below. This option must be given before any option that requires an interface. The name must exactly match one of the interface list. --interface-number=NUM Specify a interface. A interface must be specified for most of the options below. This option must be given before any option that requires an interface. The numbers start at one. -P, --provider-list List all configured providers for the specified interface. The currently active provider is prefixed by a `a', all others by a `i'. The provider names are utf-8 encoded. -p, --provider-name=NAME Select the active provider for the specified interface by name. The name must exactly match one of the provider list. Only works when the interface is down. --provider-number=NUM Select the active provider for the specified interface by number. The numbers start at one. Only works when the interface is down. -A, --start Start the specified interface. -D, --dialin Trigger dialin for the specified interface. The interface must be in dial on demand mode and already started. Not implemented for all connection types. -H, --hangup Trigger hangup for the specified interface. The interface must be in dial on demand mode. Not implemented for all connection types. -O, --stop Stop the specified interface. --add-link Add a link to a multi-link connection. --remove-link Remove a link from a multi-link connection. -s, --status Display the status of the specified interface. -c, --config Display the configuration of the specified interface. -l, --log Displays the log of the specified interface. -d, --debug={on,off} Turn debugging mode of the smpppd on or off. This does not affect connections already up. -L, --main-config List the main config of the smpppd. -L, --main-log List the main log, the log containing general informations not specific to an interface, of the smpppd. -v, --verbose Be more verbose. -o, --only-local Only connect to local smpppd. --script[=STYLE] Format output for script. Known styles are c and sh. --version Show program version and exit. --help Show help information and exit. WIRELESS LAN OPTIONS
The following commands are only valid if the specified interface is a wireless LAN device. --set-essid=ESSID Set ESSID (network name). --set-bitrate=BITRATE Set a specific bitrate (in Mbps units). Use auto or 0 to switch to automatic mode. --set-wep=KEY Enables WEP encryption for the specified interface. KEY can have different formats, see --keytype for more information. --scan Prints scan results, i.e. access points known to the driver. Note that this does not trigger an active scan. --rescan Triggers an active scan and prints the scan results. Note that this can interrupt exiting connections for a while. --keytype={hex,ascii,hash[40,104]} Sets key type for --set-wep command. hex means the key is given has hex digits. You need to enter exactly the amount of digits needed for the key (e.g. 10 hex digits for 40 bit key, 26 hex digits for 104 bit key, etc). ascii means that the ASCII values of the specified string from the key. You need to enter 5 characters for 40 bit keys, 13 for 104 bit keys, etc. And finally hash means the specified key is used as a passphrase to generate a hash from it, which will be the actual WEP key. Append 40 to hash if you want a 40 bit key generated, and 104 if you want 104 bit (aka 64 and 128 bit, depends on whether you count the initialization vector or not). If the appendix is omitted, 104 bit gets assumed. --authmode={open,shared} This option has to be used together with the --set-wep command. It specifies the authentication mode to be used. open means no explicit authentication (this does not neccessarily mean no encryption). shared means shared key authentication. This authentica- tion mode makes your WEP key more attackable, so do not use it if you don't have to. --connection-status Prints some information about your wireless LAN connection status. FILES
/etc/smpppd-c.conf Contains information about remote smpppd. /var/run/smpppd/control Socket to communicate with local smpppd. SEE ALSO
kinternet, qinternet, accounting(1), smpppd-c.conf(5), smpppd(8), smpppd-ifcfg(8). AUTHOR
Arvin Schnell <arvin@suse.de> SuSE December 2002 CINTERNET(1)
All times are GMT -4. The time now is 09:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy