Hi,
Can someone let me know how I can acheive the following.
I have ~ delimited file and I need to convert into something like SQL insert statements.
SrcFile :
1~sjdsdj~asasas~
2~aaaaa~qwqwqwq~qwq
.....
I tried
AWK -F"~" '{print "INSERT INTO XX VALUES("$1 " ,\' "$2" \' , \' "$3 }'... (3 Replies)
Hi all,
It is a very stupid problem but I am not able to find a solution to it.
I am using awk to get a column from a file and I want to get the output field in between single quotes. For example,
Input.txt
123 abc
321 ddff
433 dfg
........
I want output file to be as
... (6 Replies)
Hi,
I've been trying to write a regex to use in egrep (in a shell script) that'll fetch the names of all the files that match a particular pattern. I expect to match the following line in a file:
Name = "abc"
The regex I'm using to match the same is:
egrep -l '(^) *= *" ** *"$' /PATH_TO_SEARCH... (6 Replies)
Actually I got a list of file end with *.txt
I want to use the same command apply to all the *.txt
Thus I try to find out the fastest way to write those same command in a script and then want to let them run automatics.
For example:
I got the file below:
file1.txt
file2.txt
file3.txt... (4 Replies)
cat a | awk -F";" '{print "update db set column=' "$2" ' where column1=\""$1"\";"}' > ip-add.sql
Hi! I'm a new user!
i need to use single quote in the double quotes print string
The apex between che "$2" should not be interpreted, but....how?!
I'm trying to use \ but don't work correctly!
... (4 Replies)
How do you print out a single quote character in AWK? Using the escape character does not seem to work.
{printf "%1$s %2$s%3$s%2$s\n" , "INCLUDE", " \' ", "THIS" }
does not work. Any suggestions? (6 Replies)
Hi Guys,
Please someone help me to insert these numbers (enclosed with single quotes) to a statement using awk command. I'm having hard time of putting single quotes on these numbers.
input file:
10214
68441
07205
80731
92234
55432
DESIRED OUTPUT:
My ID Number='10214';... (1 Reply)
I need to check whether first character of variable is single quote.
I tried the below constructions but they are all not working (always return true)
if (test `echo "$REGEXP" |cut -c1` != "'"); then echo "TRUE"; fi
if (test `echo "$REGEXP" |cut -c1` != '\''); then echo "TRUE"; fi
if (test... (5 Replies)
From:
1,2,3,4,5,This is a test
6,7,8,9,0,"This, is a test"
1,9,2,8,3,"This is a ""test"""
4,7,3,1,8,""""
To:
1,2,3,4,5,This is a test
6,7,8,9,0,"This; is a test"
1,9,2,8,3,"This is a ''test''"
4,7,3,1,8,"''"Is there an easy syntax I'm overlooking? There will always be an odd number... (5 Replies)
Discussion started by: Michael Stora
5 Replies
LEARN ABOUT PHP
odbc_procedurecolumns
ODBC_PROCEDURECOLUMNS(3) 1 ODBC_PROCEDURECOLUMNS(3)odbc_procedurecolumns - Retrieve information about parameters to proceduresSYNOPSIS
resource odbc_procedurecolumns (resource $connection_id)
DESCRIPTION
resource odbc_procedurecolumns (resource $connection_id, string $qualifier, string $owner, string $proc, string $column)
Retrieve information about parameters to procedures.
PARAMETERS
o $connection_id
-The ODBC connection identifier, see odbc_connect(3) for details.
o $qualifier
- The qualifier.
o $owner
- The owner. This parameter accepts the following search patterns: "%" to match zero or more characters, and "_" to match a single
character.
o $proc
- The proc. This parameter accepts the following search patterns: "%" to match zero or more characters, and "_" to match a single
character.
o $column
- The column. This parameter accepts the following search patterns: "%" to match zero or more characters, and "_" to match a sin-
gle character.
RETURN VALUES
Returns the list of input and output parameters, as well as the columns that make up the result set for the specified procedures. Returns
an ODBC result identifier or FALSE on failure.
The result set has the following columns:
oPROCEDURE_QUALIFIER
oPROCEDURE_OWNER
oPROCEDURE_NAME
oCOLUMN_NAME
oCOLUMN_TYPE
oDATA_TYPE
oTYPE_NAME
oPRECISION
oLENGTH
oSCALE
oRADIX
oNULLABLE
oREMARKS
The result set is ordered by PROCEDURE_QUALIFIER, PROCEDURE_OWNER, PROCEDURE_NAME and COLUMN_TYPE.
PHP Documentation Group ODBC_PROCEDURECOLUMNS(3)