Sponsored Content
Full Discussion: SQL Select inside Insert
Top Forums Web Development SQL Select inside Insert Post 302234447 by Ikon on Tuesday 9th of September 2008 05:45:11 PM
Old 09-09-2008
I figured it out...

Code:
insert into logging 
(type,who,data,ipaddress) 
values 
("testing",(select username from users where id = 2),"data here","1.1.1.1");

Was using wrong quotes.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Supress ' quotes in a select statement inside Shell Script

Hi I have a shell script in which a string variable is saving following query. SqlQuery="select a||'|'||b||'|'||c from dual" I am trying to pass above query as a parameter to some script but its giving me error for "single quote". I tried suppressing it using \' instead of just ' but it... (1 Reply)
Discussion started by: mahabunta
1 Replies

2. Shell Programming and Scripting

formatting the sql select result

Hi, I have about 12 columns and 15 rows to be retrived from sybase isql command through unix. But when i output the sql into a file and see it, the formatting is going for a toss. can someone please suggest how can i get the result correctly in the output file ? Thanks, Sateesh (2 Replies)
Discussion started by: kotasateesh
2 Replies

3. Shell Programming and Scripting

SQL Select and awk

Dear All , I have file1.txt contain values like the following: ---------- 23 24 25 and I have shell script which has the following : more file1.txt | awk '{print "select 'DUMP',CODE1||'|'||CODE2||'|'||CODE3 from CODE where CODE1='" $1 "';"}' > file2.sql all I need is to have the... (6 Replies)
Discussion started by: habuzahra
6 Replies

4. Shell Programming and Scripting

Select SQL Queries Option

count.sh#!/bin/ksh SQL1=`sqlplus -s usr/pwd @count.sql $1 $2 $3` SQL2=`sqlplus -s usr/pwd @selectall.sql $1 $2 $3` LIST="Count Select_All" select i in $LIST do if then echo $SQL1 elif then echo $SQL2 fi done (2 Replies)
Discussion started by: killboy
2 Replies

5. Shell Programming and Scripting

using SELECT sql statement in shell script

Hi there I have a database on a remote box and i have been using shell script to insert data into it for example, i could have a script that did this SN=123456 n=server1 m=x4140 sql="UPDATE main SET hostname='$n',model='$m' WHERE serial='$SN';" echo $sql |/usr/sfw/bin/mysql -h... (4 Replies)
Discussion started by: hcclnoodles
4 Replies

6. Shell Programming and Scripting

SQL select all but not if it is already in an other column

I know I know.. for sure one of the easier mysql statements. But somehow I can not figure out this. I expect to see all distinct items of 'data_12' where 'kwroot' has 'straxx' in, and in the same row 'data_12' ist (not = 'kwsearched' in any existing row) data_12 ... (6 Replies)
Discussion started by: lowmaster
6 Replies

7. Boot Loaders

Reboot and Select Proper Boot device or insert Boot media in select Boot device and press a key

Hello, I have kubuntu on my laptop and now I decided to switch to Windows 7. I made the bios settings properly (first choice is boot from cd\vd) but I see the error " reboot and select proper Boot device or insert Boot media in select Boot device and press a key " I have tried CD and... (0 Replies)
Discussion started by: rpf
0 Replies

8. Programming

I'm going crazy with SQL select. Please help!

Hello people, as wrote in title I'm going crazy with a "complex" SQL select. This is the seelct: select T_ADDRESS, T_MCC,T_MNC,T_MSIN,T_IM_MNC, COUNT(*) FROM TABLETEST WHERE T_MCC=123 AND (T_MNC=11 OR T_MNC=01) GROUP BY T_ADDRESS,T_MCC,T_MNC,T_MSIN,T_IM_MNC HAVING count(*) > 5;This select... (7 Replies)
Discussion started by: Lord Spectre
7 Replies

9. Programming

[Solved] SQL SELECT REPLACE

Hi All, I had a query related to sql select update replace command. i have a table named clusters and it looks like this name model characteristics sample1.1 +123 parent sample1.2 -456 clone sample1.3 +122 ... (5 Replies)
Discussion started by: sonia102
5 Replies

10. Programming

Sql select replace

Hi All, I had a query related to sql select replace command. i have a table named clusters and it looks like this Code: name characteristics sample 1.1 parent sample 1.2 ... (2 Replies)
Discussion started by: siya@
2 Replies
NODE.PERMS(5)						     Linux Programmer's Manual						     NODE.PERMS(5)

NAME
node.perms - LinuxNode permissions file. DESCRIPTION
Node.perms file is read at program startup with the knowledge of users username (call), connection type (AX.25, NET/ROM, ROSE, TCP/IP), peers IP address (for TCP/IP) and port name (for AX.25). The first entry matching this information is taken and user is asked for password and given permissions according to it. The lines within node.perms must either be a comment line, which starts with a # in the first column, or a permission entry in the follow- ing format, each field being delimited by white space: username type portname password permissions The field descriptions are: username This is matched against users username (call) without SSID. An asterisk (*) matches any username. type This is matched against the type of the connection to user. Possible values for this field are: * matches any type of connection. ax25 matches users coming in with AX.25. netrom matches users coming in with NET/ROM. rose matches users coming in with ROSE. local matches TCP/IP connections where users host is in "local" network as defined in node.conf(5). ampr matches TCP/IP connections where users host is in amprnet (44.0.0.0/8). inet matches TCP/IP connections where users host is neither in "local" network nor in amprnet. host matches users starting LinuxNode from shell. portname If user is coming in with AX.25 this field is matched against the local port name the user is coming in via. An asterisk (*) matches any port name. password If the previous tree fields match and this field is not a single asterisk (*) the user is asked for a password. The password is then matched against this field. permissions This field represents a a bitmask of operations the user is permitted to do. It is a sum of the values listed here: 1 permits logging in even if no other permissions are given. 2 permits outgoing AX.25 connects. 4 permits outgoing NET/ROM connects. 8 permits telneting to hosts in the "local" network as defined in node.conf(5). 16 permits telneting to hosts in amprnet. 32 permits telneting to hosts neither in the "local" network nor in amprnet. 64 permits using hidden ports in outgoing AX.25 connections. (See HiddenPorts command in node.conf(5).) 128 permits outgoing ROSE connects. 256 The no-escape flag. Disables the escape mechanism for this user. FILES
/etc/ax25/node.perms SEE ALSO
node(8), node.conf(5), axports(5), ax25(4). Linux 16 June 1999 NODE.PERMS(5)
All times are GMT -4. The time now is 04:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy