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 LINUX
create_tablespace
CREATE TABLESPACE(7) SQL Commands CREATE TABLESPACE(7)NAME
CREATE TABLESPACE - define a new tablespace
SYNOPSIS
CREATE TABLESPACE tablespacename [ OWNER username ] LOCATION 'directory'
DESCRIPTION
CREATE TABLESPACE registers a new cluster-wide tablespace. The tablespace name must be distinct from the name of any existing tablespace in
the database cluster.
A tablespace allows superusers to define an alternative location on the file system where the data files containing database objects (such
as tables and indexes) can reside.
A user with appropriate privileges can pass tablespacename to CREATE DATABASE, CREATE TABLE, CREATE INDEX or ADD CONSTRAINT to have the
data files for these objects stored within the specified tablespace.
PARAMETERS
tablespacename
The name of a tablespace to be created. The name cannot begin with pg_, as such names are reserved for system tablespaces.
username
The name of the user who will own the tablespace. If omitted, defaults to the user executing the command. Only superusers can create
tablespaces, but they can assign ownership of tablespaces to non-superusers.
directory
The directory that will be used for the tablespace. The directory must be empty and must be owned by the PostgreSQL system user. The
directory must be specified by an absolute path name.
NOTES
Tablespaces are only supported on systems that support symbolic links.
CREATE TABLESPACE cannot be executed inside a transaction block.
EXAMPLES
Create a tablespace dbspace at /data/dbs:
CREATE TABLESPACE dbspace LOCATION '/data/dbs';
Create a tablespace indexspace at /data/indexes owned by user genevieve:
CREATE TABLESPACE indexspace OWNER genevieve LOCATION '/data/indexes';
COMPATIBILITY
CREATE TABLESPACE is a PostgreSQL extension.
SEE ALSO
CREATE DATABASE [create_database(7)], CREATE TABLE [create_table(7)], CREATE INDEX [create_index(7)], DROP TABLESPACE [drop_tablespace(7)],
ALTER TABLESPACE [alter_tablespace(7)]
SQL - Language Statements 2010-05-14 CREATE TABLESPACE(7)