hi all...
i need your help, because i donīt know what to do...
i have a flat file like this:
B065200512312004123111010000061451 000021853
B065200512312004123111020000621907 000417802
B065200512312004123111030000005214 000005861
B065200512312004123111040000120133 000088448
and i need... (5 Replies)
Hi,
I want to replace a field in a text delimited file with the actual number of records in the same file.
HDR|ABCD|10-13-2008 to 10-19-2008.txt|10-19-2008|XYZ
DTL|0|5464-1|0|02-02-2008|02-03-2008||||F|||||||||
DTL|1|5464-1|1|02-02-2008|02-03-2008|1||JJJ... (3 Replies)
I am attempting to insert multiple lines of text into a specific place in a text file based on the lines above or below it.
For example, Here is a portion of a zone file.
IN NS ns1.domain.tld.
IN NS ns2.domain.tld.
IN ... (2 Replies)
Hi All,
I need a shell script which could insert a sequence number column inside a dat file(pipe delimited).
I have the dat file similar to the one as shown below..
|A|B|C||D|E
|F|G|H||I|J
|K|L|M||N|O
|P|Q|R||S|T
As shown above, the column 4 is currently blank and i need to insert sequence... (5 Replies)
Hi,
I am trying to find the lines in a pipe delimited file where 11th column has not null values. Any help is appreciated. Need help asap please.
thanks in advance. (3 Replies)
Hi,
I am not sure if I've posted this question before.
Anyway, I previously asked about converting lines of text into a comma delimited string. Now I am needing to do the other way around ... :( :o
Can anyone advise how is this possible?
Example as below:
Converting records/lines to... (2 Replies)
Hi All ,
I have pipe delimiter file with 11 columns . I need to insert 4 empty columns after column 10 . and After 11 column I need to insert a column which is having the same value for all the rows .
My file
1|2|3|4|5|6|7|8|9|10|11
New file
... (11 Replies)
Hi, I have a rquirement in unix as below .
I have a text file with me seperated by | symbol and i need to generate a excel file through unix commands/script so that each value will go to each column.
ex:
Input Text file:
1|A|apple
2|B|bottle
excel file to be generated as output as... (9 Replies)
Hi,
Apologies in advance to the moderator if I am posting this the wrong way.
I've searched and found the solution to an old post but as it is a very old post, I don't see an option to update it with additional question.
The question I have is in relation to the following post:
How to... (6 Replies)
Discussion started by: newbie_01
6 Replies
LEARN ABOUT PHP
pg_copy_from
PG_COPY_FROM(3)PG_COPY_FROM(3)pg_copy_from - Insert records into a table from an arraySYNOPSIS
bool pg_copy_from (resource $connection, string $table_name, array $rows, [string $delimiter], [string $null_as])
DESCRIPTION pg_copy_from(3) inserts records into a table from $rows. It issues a COPY FROM SQL command internally to insert records.
PARAMETERS
o $connection
- PostgreSQL database connection resource.
o $table_name
- Name of the table into which to copy the $rows.
o $rows
- An array of data to be copied into $table_name. Each value in $rows becomes a row in $table_name. Each value in $rows should be
a delimited string of the values to insert into each field. Values should be linefeed terminated.
o $delimiter
- The token that separates values for each field in each element of $rows. Default is TAB.
o $null_as
- How SQL NULL values are represented in the $rows. Default is N ("\N").
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
pg_copy_from(3) example
<?php
$db = pg_connect("dbname=publisher") or die("Could not connect");
$rows = pg_copy_to($db, $table_name);
pg_query($db, "DELETE FROM $table_name");
pg_copy_from($db, $table_name, $rows);
?>
SEE ALSO pg_copy_to(3).
PHP Documentation Group PG_COPY_FROM(3)