06-04-2002
Yup you are rite, the table is already there...
For the info in the csv file it's all char. and they do match requirements for the table
Also, every field goes directly into a field in the same sequence to a column in the table.
Instead of csv could I use a pipe | to seperate the fields? would that be easier?
Once again thanks a lot for your time and efforts
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi all
I need to input values in a .csv file into my Oracle table running in Unix, I wonder what would be the command to do so...
The values are recorded in an excel file and I tried using a formatted text file to do so but failed because one of the field is simply too large to fit in the... (4 Replies)
Discussion started by: handynas
4 Replies
2. Shell Programming and Scripting
Hi Guys,
I am trying to reading in comma seperated values in awk. I can set the delimiter to be a comma, but the tricky part is that commas that appear within quotes are not to be considered as delimiters. Could someone please help.
Regards,
Laud (1 Reply)
Discussion started by: Laud12345
1 Replies
3. Shell Programming and Scripting
Hi,
I have a comma seperated list of values:
export list="red,blue,white,yellow"
Given a value in a variable "look", i want to check whether the value is available in the above list. But the result should be based on exact string match and not part of the string.
I am using following... (9 Replies)
Discussion started by: brap45
9 Replies
4. Shell Programming and Scripting
Hi all,
I have a data like,
0,R001,2,D
this wants to be loaded into a oracle database table.
Pl let me know how this has to be done.
Thanks in advance (2 Replies)
Discussion started by: raji35
2 Replies
5. Shell Programming and Scripting
Hi,
I want to remove empty/blank lines from comma seperated and space seperated files
Thanks all for help (11 Replies)
Discussion started by: pinnacle
11 Replies
6. Shell Programming and Scripting
Hi,
I have data like this.
1,2,3,4
Output required:
1
2
3
4
I am trying to use tr function but getting error.
Help is appreciated. (6 Replies)
Discussion started by: pinnacle
6 Replies
7. Shell Programming and Scripting
i want to run update query for oracle which is in up.sql taking values from a.csv.
I have implemented shell script to do it.
extn="perl"
ls -1 | while read file
do
echo "$file,$extn" > a.csv
done
up.sql contains
update file_list set filename=$1 where extn=$2;
The code to update is... (2 Replies)
Discussion started by: millan
2 Replies
8. UNIX for Dummies Questions & Answers
Hi have a comma separated file which has numeric and string columns. String columns are quoted and can have comma in between the quotes. How to identify the columns with FS =","
sample records"prabhat,kumar",19,2000,"bangalore,India"
In awk it should be$1 = prabhat,kumar
$2=19
$3=2000... (9 Replies)
Discussion started by: prabhat.diwaker
9 Replies
9. Shell Programming and Scripting
Hi All,
I am new to shell scripting i am trying to convert the listner.log to csv which can be inturn converted to excel for easy reading.
i used this command
awk '/SID=/ && /HOST=/ && /PORT=/ && /USER=/ {
i=match($0,"SID="); i=i+RLENGTH; h0=substr($0,i);
i=match(h0,")");... (6 Replies)
Discussion started by: skoshekay
6 Replies
10. Shell Programming and Scripting
Experts.
I have created a oracle table as below.
create table xml_tab
(
File_No number ,
File_content Varchar2(2000),
file_type xmltype
);
Daily we are receiving many XML files as below.
here is our sample xml file.
File1 : (7 Replies)
Discussion started by: vasuvv
7 Replies
LEARN ABOUT PHP
mssql_fetch_field
MSSQL_FETCH_FIELD(3) MSSQL_FETCH_FIELD(3)
mssql_fetch_field - Get field information
SYNOPSIS
object mssql_fetch_field (resource $result, [int $field_offset = -1])
DESCRIPTION
mssql_fetch_field(3) can be used in order to obtain information about fields in a certain query result.
PARAMETERS
o $result
- The result resource that is being evaluated. This result comes from a call to mssql_query(3).
o $field_offset
- The numerical field offset. If the field offset is not specified, the next field that was not yet retrieved by this function is
retrieved. The $field_offset starts at 0.
RETURN VALUES
Returns an object containing field information.
The properties of the object are:
o name - column name. if the column is a result of a function, this property is set to computed#N, where #N is a serial number.
o column_source - the table from which the column was taken
o max_length - maximum length of the column
o numeric - 1 if the column is numeric
o type - the column type.
EXAMPLES
Example #1
mssql_fetch_field(3) example
<?php
// Connect to MSSQL and select the database
mssql_connect('MANGOSQLEXPRESS', 'sa', 'phpfi');
mssql_select_db('php');
// Send a select query to MSSQL
$query = mssql_query('SELECT * FROM [php].[dbo].[persons]');
// Construct table
echo '<h3>Table structure for 'persons'</h3>';
echo '<table border="1">';
// Table header
echo '<thead>';
echo '<tr>';
echo '<td>Field name</td>';
echo '<td>Data type</td>';
echo '<td>Max length</td>';
echo '</tr>';
echo '</thead>';
// Dump all fields
echo '<tbody>';
for ($i = 0; $i < mssql_num_fields($query); ++$i) {
// Fetch the field information
$field = mssql_fetch_field($query, $i);
// Print the row
echo '<tr>';
echo '<td>' . $field->name . '</td>';
echo '<td>' . strtoupper($field->type) . '</td>';
echo '<td>' . $field->max_length . '</td>';
echo '</tr>';
}
echo '</tbody>';
echo '</table>';
// Free the query result
mssql_free_result($query);
?>
SEE ALSO
mssql_field_seek(3).
PHP Documentation Group MSSQL_FETCH_FIELD(3)