Than you so much for this valuable suggesion and thanks for your time.
---------- Post updated at 03:47 AM ---------- Previous update was at 03:43 AM ----------
Thanks a lot.
What is difference between TO_DATE() and TO_CHAR() functions.
While inserting data into table we are using it. Like,
If I want to use variable value to be put into table in INSERT INTO statement then which function is better to use for DATE / TIMESTAMP format? and How?
Last edited by Poonamol; 10-15-2010 at 05:53 AM..
Reason: code added
hi,
for reading a cobol indexed file i need to convert "mmddyy" date format to "ccyyddd" format.
i checked the datecalc and other scripts but couldnt modify them to cater to my need:(...
The datecalc gives an output which i believe is the total days till that date, but i want to convert it... (2 Replies)
Hi,
I can use the following command to create a file with some name then underscore and then date appended to it in the format 'DD-MM-YYYY':
touch "newfile_`date '+%d-%m-%Y'`"
But it gives me error when I try with the similar command to create a file with the date format 'DD/MM/YYYY'. I... (4 Replies)
I am currently running the following Korn shell script which works fine:
#!/usr/bin/ksh
count=`db2 -x "select count(*) from schema.tablename"`
echo "count"
I would like to add a "where" clause to the 2nd line that would allow me to get a record count of all the records from schema.tablename... (9 Replies)
I have a comma delimited log file which has the date as MM/DD/YY in the 2nd column, and HH:MM:SS in the 3rd column.
I need to change the date format to YYYY-MM-DD and merge it with the the time HH:MM:SS. How will I got about this?
Sample input
02/27/09,23:52:31
02/27/09,23:52:52... (3 Replies)
I have a list of dates in the following format: mm/dd/yyyy and want to change these to the MySQL standard format: yyyy-mm-dd.
The dates in the original file may or may not be zero padded, so April is sometimes "04" and other times simply "4".
This is what I use to change the format:
sed -i '' -e... (2 Replies)
hi there, I am trying to create a stored procedure that i can pass the table name to and it will create a table with that name. but for some reason it creates with what i have defined as the variable name . In the case of the example below it creates a table called 'tname'
for example
... (6 Replies)
My Code
Hi Friends,
I need to get output in table format using unix shell script.For example my server CPU and memory utilization report will come as a mail with ordinary format but i want to make as table format.
Here two output finally we are getting:-
CPU utilization is... (2 Replies)
Hi Unix Gurus,
I would like to rename several files in a Unix Directory . The filenames can have more than 1 underscore ( _ ) and the last underscore is always followed by a date in the format mmddyyyy. The Extension of the files can be .txt or .pdf or .xls etc and is case insensitive ie... (1 Reply)
Hello,
In my shell script, I extract table data from HP Vertica DB into a csv file using vsql -c command. But the problem is the file getting created is in binary format and hence some of the data becomes unreadable which has chinese characters as part of data.
file -i filename.csv - gives... (2 Replies)
i try to set linux date & time in specific format but it keep giving me error
Example :
date "+%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01"
or
date +"%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01"
keep giving me this error :
date: invalid date ‘19-01-2017 00:05:01'
Please use CODE tags... (7 Replies)
Discussion started by: umen
7 Replies
LEARN ABOUT REDHAT
create_group
CREATE GROUP(7) SQL Commands CREATE GROUP(7)NAME
CREATE GROUP - define a new user group
SYNOPSIS
CREATE GROUP name [ [ WITH ] option [ ... ] ]
where option can be:
SYSID gid
| USER username [, ...]
INPUTS
name The name of the group.
gid The SYSID clause can be used to choose the PostgreSQL group id of the new group. It is not necessary to do so, however.
If this is not specified, the highest assigned group id plus one, starting at 1, will be used as default.
username
A list of users to include in the group. The users must already exist.
OUTPUTS
CREATE GROUP
Message returned if the command completes successfully.
DESCRIPTION
CREATE GROUP will create a new group in the database installation. Refer to the Administrator's Guide for information about using groups
for authentication. You must be a database superuser to use this command.
Use ALTER GROUP [alter_group(7)] to change a group's membership, and DROP GROUP [drop_group(7)] to remove a group.
USAGE
Create an empty group:
CREATE GROUP staff;
Create a group with members:
CREATE GROUP marketing WITH USER jonathan, david;
COMPATIBILITY
SQL92
There is no CREATE GROUP statement in SQL92. Roles are similar in concept to groups.
SQL - Language Statements 2002-11-22 CREATE GROUP(7)