Hi Corona688 Thank you for quick help on this . However I would need further info on the handling scenarios when we have multiple column in a table .
The above observation is fine as I am using only one column "COUNTRIES_OUT" and grouped against one column "Employee_ID"
Now the challenge is when I add new column to replicate same logic
The above output give 6 times UNITED STATES for column COUNTRIES_IN even though it appears once .
Please guide . any help appreciated
Hi All,
I want to connect two tables in DB2 using shell script and then compare the contents of two tables field by field.and i should return on the screen the un matched records ..
Could any one please help me in connecting database tables using Unix and retriving data from the same. (1 Reply)
Hi, I've got a file that I'd like to uniquely sort based on column 2 (values in column 2 begin with "comp").
I tried sort -t -nuk2,3 file.txtBut got:
sort: multi-character tab `-nuk2,3'
"man sort" did not help me out
Any pointers?
Input:
Output: (5 Replies)
Hi,
I want to replace a chain of if-else statement in an old AWK file with values from Db2 table or CSV file. The part of code is below...
if (start_new_rec=="true"){
exclude_user="false";
user=toupper($6);
match(user, "XXXXX.");
if (RSTART ==2 ) {
... (9 Replies)
Hi Gents,
Please can you help me to get the desired output .
In the first column I have some duplicate records, The condition is that all need to reject the duplicate record keeping the last occurrence. But the condition is. If the last occurrence is equal to value 14 or 98 in column 3 and... (2 Replies)
Hi,
Basically what I am trying to do is making multiple fields of the same type comma-separated.
i.e. for a data like this:
B00000 abc
B00001 abc,def
B00001 ghi
B00001 jkl
B00002 abc
B00002 def
B00003 xyz
Output should be like:
B00000 abc
B00001 abc,def,ghi,jkl... (20 Replies)
Hello,
I have a script that is generating a tab delimited output file.
num Name PCA_A1 PCA_A2 PCA_A3
0 compound_00 -3.5054 -1.1207 -2.4372
1 compound_01 -2.2641 0.4287 -1.6120
3 compound_03 -1.3053 1.8495 ... (3 Replies)
Hi Gurus,
I have a file(weblog) as below
abc|xyz|123|agentcode=sample code abcdeeess,agentcode=sample code abcdeeess,agentcode=sample code abcdeeess|agentadd=abcd stereet 23343,agentadd=abcd stereet 23343
sss|wwq|999|agentcode=sample1 code wqwdeeess,gentcode=sample1 code... (4 Replies)
Dear folks
I have a map file of around 54K lines and some of the values in the second column have the same value and I want to find them and delete all of the same values. I looked over duplicate commands but my case is not to keep one of the duplicate values. I want to remove all of the same... (4 Replies)
Hi Team
I am using DB2 artisan tool and struck to handle multi values present in columns that are comma(,) separated. I want to convert those column values in separate rows .
For example :
Column 1 Column2
Jan,Feb Hold,Sell,Buy
Expected Result
Column1 ... (3 Replies)
Dear Team
I am using DB2 v9 .
I have a condition to check roles based on hierarchies like below example.
1.Ramesh has Roles as "Manager" and "Interviewer"
2.KITS has Roles as "Interviewer"
3.ANAND has Roles as "Manager" and "Interviewer"
select * FROM TESTING
NAME ... (6 Replies)
Discussion started by: Perlbaby
6 Replies
LEARN ABOUT PHP
ingres_set_environment
INGRES_SET_ENVIRONMENT(3) 1 INGRES_SET_ENVIRONMENT(3)ingres_set_environment - Set environment features controlling output optionsSYNOPSIS
bool ingres_set_environment (resource $link, array $options)
DESCRIPTION ingres_set_environment(3) is called to set environmental options that affect the output of certain values from Ingres, such as the time-
zone, date format, decimal character separator, and float precision.
PARAMETERS
o $link
- The connection link identifier
o $options
- An enumerated array of option name/value pairs. The following table lists the option name and the expected type
+----------------------+---------------------------------------------------+
| Option name | |
| | |
| | Option type |
| | |
| | Description |
| | |
| | Example |
| | |
+----------------------+---------------------------------------------------+
|date_century_boundary | |
| | |
| | |
| | integer |
| | |
| | The threshold by which a 2-digit year is deter- |
| | mined to be in the current century or in the next |
| | century. Equivalent to II_DATE_CENTURY_BOUNDARY |
| | |
| | 50 |
| | |
| timezone | |
| | |
| | |
| | string |
| | |
| | Controls the timezone of the session. If not set, |
| | it will default the value defined by II_TIME- |
| | ZONE_NAME. If II_TIMEZONE_NAME is not defined, |
| | NA-PACIFIC (GMT-8 with Daylight Savings) is used. |
| | |
| | UNITED-KINGDOM |
| | |
| date_format | |
| | |
| | |
| | integer |
| | |
| | Sets the allowable input and output format for |
| | Ingres dates. Defaults to the value defined by |
| | II_DATE_FORMAT. If II_DATE_FORMAT is not set, the |
| | default date format is US, for example mm/dd/yy. |
| | Valid values for date_format are: |
| | |
| | oINGRES_DATE_DMY |
| | |
| | oINGRES_DATE_FINISH |
| | |
| | oINGRES_DATE_GERMAN |
| | |
| | oINGRES_DATE_ISO |
| | |
| | oINGRES_DATE_ISO4 |
| | |
| | oINGRES_DATE_MDY |
| | |
| | oINGRES_DATE_MULTINATIONAL |
| | |
| | oINGRES_DATE_MULTINATIONAL4 |
| | |
| | oINGRES_DATE_YMD |
| | |
| | oINGRES_DATE_US |
| | |
| | INGRES_DATE_ISO4 |
| | |
| decimal_separator | |
| | |
| | |
| | string |
| | |
| | The character identifier for decimal data |
| | |
| | "," |
| | |
| money_lort | |
| | |
| | |
| | integer |
| | |
| | Leading or trailing currency sign. Valid values |
| | for money_lort are: |
| | |
| | oINGRES_MONEY_LEADING |
| | |
| | oINGRES_MONEY_TRAILING |
| | |
| | INGRES_MONEY_LEADING |
| | |
| money_sign | |
| | |
| | |
| | string |
| | |
| | The currency symbol to be used with the MONEY |
| | datatype |
| | |
| | EUR |
| | |
| money_precision | |
| | |
| | |
| | integer |
| | |
| | The precision of the MONEY datatype |
| | |
| | 2 |
| | |
| float4_precision | |
| | |
| | |
| | integer |
| | |
| | Precision of the FLOAT4 datatype |
| | |
| | 10 |
| | |
| float8_precision | |
| | |
| | |
| | integer |
| | |
| | Precision of the FLOAT8 data |
| | |
| | 10 |
| | |
| blob_segment_length | |
| | |
| | |
| | integer |
| | |
| | The amount of data in bytes to fetch at a time |
| | when retrieving BLOB or CLOB data. Defaults to |
| | 4096 bytes when not set explicitly |
| | |
| | 8192 |
| | |
+----------------------+---------------------------------------------------+
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
Set date_format to ISO4
<?php
$options = array( "date_format" => INGRES_DATE_ISO4 );
if (ingres_set_environment($link, $options))
{
$result=ingres_query($link,"select date('now') as date");
while ( $object = ingres_fetch_object ($result) ) {
echo $object->date."
";
}
}
?>
Example #2
Set timezone to HONG-KONG
<?php
$options = array( "timezone" => "HONG-KONG");
if (ingres_set_environment($link, $options))
{
$result=ingres_query($link,"select date('now') as date");
while ( $object = ingres_fetch_object ($result) ) {
echo $object->date."
";
}
}
?>
SEE ALSO ingres_connect(3), ingres_query(3).
PHP Documentation Group INGRES_SET_ENVIRONMENT(3)