@Don Cragun: Great explanation, no one could have done it better than this... Thank you so much.
@rk4k: please share your thoughts. Do you mean this approach does not work in all the cases? Because, I find the above code given by in2nix4life works in my case... Please let us know...
@pravin27: thanks for providing a perl code too... however, I assume, it is only substituting the first occurrence of comma and replacing it with a blank space. Your code gives the output as:
Last edited by dhruuv369; 02-11-2014 at 01:38 PM..
Reason: No specific reason
I want to remove the comma which is present within the double quoted string. All other commas which is present outside double quotes should be present.
Input : a,b,"cc,dd,ee",f,ii,"jj,kk",mmm
output : a,b,"ccddee",f,ii,"jjkk",mmm (3 Replies)
Hi,
my requirement is to find the count of commas in a string excluding the ones in double quotes.
For example:
If the input string is
abc,xyz.com,lmhgdf,"abc, 401 street","tty,stt",45,23,45
The output should be 7 (7 Replies)
Hello experts,
I need to validate a csv file which contains data like this:
Sample.csv
"ABCD","I",23,0,9,,"23/12/2012","OK","Street,State, 91135",0
"ABCD","I",23,0,9,,"23/12/2012","OK","Street,State, 91135",0
I just need to check if all the records contain exactly the number of... (5 Replies)
How can I delete a column from a CSV file which has comma separated value with a string enclosed in double quotes and a comma in between? I have a file 44.csv with 4 lines including the header like the below format:
column1, column2, column3, column 4, column5, column6
12,455,"string with... (6 Replies)
Hi
How can I delete a columns from a CSV file which has comma separated value with a string enclosed in double quotes or square bracket and a comma in between?
I have a csv file with below format.
Template,Target Server,Target Component,Rule Group,Rule,Rule Reference Number,Rule... (7 Replies)
Hello to all,
I'm trying to match only fields surrounded by double quotes that have one or more commas inside.
The text is like this
"one, t2o",334,"tst,982-0",881,"kmk 9-l","kkd, 115-001, jj-3",5
The matches should be
"one, t2o"
"tst,982-0"
"kkd, 115-001, jj-3"
I'm trying with... (11 Replies)
i have data as below
123,"paul phiri",paul@yahoo.com,"po.box 23, BT","Eco Bank,Blantyre,Malawi"
i need an output to be
123,"paul phiri",paul@yahoo.com,"po.box 23 BT","Eco Bank Blantyre Malawi" (5 Replies)
Hi All,
I'm unable to load the data using sql loader where there are double quotes within the double quotes As these are optionally enclosed by double quotes.
Sample Data :
"221100",138.00,"D","0019/1477","44012075","49938","49938/15043000","Television - 22" Refurbished - Airwave","Supply... (6 Replies)
I have file with are delimited by pipe(|) symbol, I wanted those to be removed except the ones which are enclosed in double quotes.
If your quote file is:
|Life is |Beautiful"|"Indeed life |is beautiful too|"|"But unix is fun| is not"|"
It should return:
Life is Beautiful"|"Indeed life is... (1 Reply)
I have file with are delimited by pipe(|) symbol, I wanted those to be removed except the ones which are enclosed in double quotes.
If your quote file is:
|Life is |Beautiful"|"Indeed life |is beautiful too|"|"But unix is fun| is not"|"
It should return:
Life is Beautiful"|"Indeed life is... (9 Replies)
Discussion started by: Sathyapts
9 Replies
LEARN ABOUT PHP
db2_column_privileges
DB2_COLUMN_PRIVILEGES(3) 1 DB2_COLUMN_PRIVILEGES(3)db2_column_privileges - Returns a result set listing the columns and associated privileges for a tableSYNOPSIS
resource db2_column_privileges (resource $connection, [string $qualifier], [string $schema], [string $table-name], [string $column-
name])
DESCRIPTION
Returns a result set listing the columns and associated privileges for a table.
PARAMETERS
o $connection
- A valid connection to an IBM DB2, Cloudscape, or Apache Derby database.
o $qualifier
- A qualifier for DB2 databases running on OS/390 or z/OS servers. For other databases, pass NULL or an empty string.
o $schema
- The schema which contains the tables. To match all schemas, pass NULL or an empty string.
o $table-name
- The name of the table or view. To match all tables in the database, pass NULL or an empty string.
o $column-name
- The name of the column. To match all columns in the table, pass NULL or an empty string.
RETURN VALUES
Returns a statement resource with a result set containing rows describing the column privileges for columns matching the specified parame-
ters. The rows are composed of the following columns:
+-------------+---------------------------------------------------+
|Column name | |
| | |
| | Description |
| | |
+-------------+---------------------------------------------------+
| TABLE_CAT | |
| | |
| | Name of the catalog. The value is NULL if this |
| | table does not have catalogs. |
| | |
|TABLE_SCHEM | |
| | |
| | Name of the schema. |
| | |
| TABLE_NAME | |
| | |
| | Name of the table or view. |
| | |
|COLUMN_NAME | |
| | |
| | Name of the column. |
| | |
| GRANTOR | |
| | |
| | Authorization ID of the user who granted the |
| | privilege. |
| | |
| GRANTEE | |
| | |
| | Authorization ID of the user to whom the privi- |
| | lege was granted. |
| | |
| PRIVILEGE | |
| | |
| | The privilege for the column. |
| | |
|IS_GRANTABLE | |
| | |
| | Whether the GRANTEE is permitted to grant this |
| | privilege to other users. |
| | |
+-------------+---------------------------------------------------+
SEE ALSO db2_columns(3), db2_foreign_keys(3), db2_primary_keys(3), db2_procedure_columns(3), db2_procedures(3), db2_special_columns(3), db2_statis-
tics(3), db2_table_privileges(3), db2_tables(3).
PHP Documentation Group DB2_COLUMN_PRIVILEGES(3)