I am currently working with a DB2 (ver 8.1) table (Newly Created) and I am running a basic DB2 Select query into a variable. The field and it's size are VARCHAR(20). Since I need to pass the variable through some java I have noticed that when the results come back from the query there are extra spaces. Even if I use the RTRIM or LTRIM I still receive the spaces.
Is there a way to set a variable lenght before the results of a query are passed to it?
I would like to do the following,
Then I can pass $variable2 through the java.
I know it doesn't make much sense but it's what I need, hopefully.
thanks in advance...........
Last edited by Bob_Loblaw; 09-17-2007 at 04:36 PM..
Hi.
After the shutdown for SWIFT Alliance Server, tape backup process will be done. Unfortunately, I encountered this error message when I performed the database tape backup. The error was "/dev/rmt 0.1 block size is 0; variable; must be 1024 fixed. Consider reconfiguration through 'chdev'... (2 Replies)
Hi All,
M writing a shell scripting n making use of awk. I am using a integer variable named size. When printing it's value, it is giving result as 4.34534e+10.
Is there any way to declare variable of type LONG in awk or in shell scripting in general ?
Regards,
Abhishek Gera (3 Replies)
I'm working on a IBM PC Serveur 325.
I have a sequential file with more than 800000 records. The size of that file is 136755200. I wrote a cobol program (RM cobol) to delete records. Now the file has 180000 records and the size still the same 136755200. What I need to do to decrease the size.... (1 Reply)
I'm working on a IBM PC Serveur 325.
I have a sequential file with more than 800000 records. The size of that file is 136755200. I wrote a cobol program (RM cobol) to delete records. Now the file has 180000 records and the size still the same 136755200. What I need to do to decrease the size.... (3 Replies)
Hi everyone
can you people please help me in the problem below
-bash-3.00$ ls -ltr abc abc.tar
-rw-r--r-- 1 1hinaa2 17 Jan 17 14:09 abc
-rw-r--r-- 1 1hinaa2 2048 Feb 17 07:03 abc.tar
-rw-r--r-- 1 1hinaa2 135 Feb 17 07:03 abc.tar.gz
why this strange... (2 Replies)
Hello
first, truth been told, I'm not even close to be advanced user. I'm posting here because maybe my question is complicated enough to need your expert help
I need to use awk (or nawk - I don't have gawk) to validate some files by computing the total sum for a large numeric variable.
It... (1 Reply)
if i do the following:
echo "hello, mr. sunshine" > /tmp/text.txt
du -s /tmp/text.txt
The text.txt file now contains "hello, mr. sunshine". So i did a du -s on the file to see how much space the text i inserted took.
now, instead of writing "hello, mr. sunshine" to a text file on the... (5 Replies)
Hi,
I wrote a shell script, which let me manage dns records through an api.
The raw core-command looks like about this:
output="$(curl -X GET https://mgt.myserver.de:8081/api/v1/servers/localhost/zones)"The output contains a list of all zones with all records and is about 800 Kilobytes... (9 Replies)
Discussion started by: stomp
9 Replies
LEARN ABOUT PHP
db2_table_privileges
DB2_TABLE_PRIVILEGES(3) 1 DB2_TABLE_PRIVILEGES(3)db2_table_privileges - Returns a result set listing the tables and associated privileges in a databaseSYNOPSIS
resource db2_table_privileges (resource $connection, [string $qualifier], [string $schema], [string $table_name])
DESCRIPTION
Returns a result set listing the tables and associated privileges in a database.
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. This parameter accepts a search pattern containing _ and % as wildcards.
o $table_name
- The name of the table. This parameter accepts a search pattern containing _ and % as wildcards.
RETURN VALUES
Returns a statement resource with a result set containing rows describing the privileges for the tables that match the specified parame-
ters. The rows are composed of the following columns:
+-------------+---------------------------------------------------+
|Column name | |
| | |
| | Description |
| | |
+-------------+---------------------------------------------------+
| TABLE_CAT | |
| | |
| | The catalog that contains the table. The value is |
| | NULL if this table does not have catalogs. |
| | |
|TABLE_SCHEM | |
| | |
| | Name of the schema that contains the table. |
| | |
| TABLE_NAME | |
| | |
| | Name of the table. |
| | |
| 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 that has been granted. This can be |
| | one of ALTER, CONTROL, DELETE, INDEX, INSERT, |
| | REFERENCES, SELECT, or UPDATE. |
| | |
|IS_GRANTABLE | |
| | |
| | A string value of "YES" or "NO" indicating |
| | whether the grantee can grant the privilege to |
| | other users. |
| | |
+-------------+---------------------------------------------------+
SEE ALSO db2_column_privileges(3), db2_columns(3), db2_foreign_keys(3), db2_primary_keys(3), db2_procedure_columns(3), db2_procedures(3), db2_spe-
cial_columns(3), db2_statistics(3), db2_tables(3).
PHP Documentation Group DB2_TABLE_PRIVILEGES(3)