04-04-2017
You can normally define a few things to help you, such as unique constraints and defining the column as not accepting nulls.
It then depends on your loader if it pushes in the records it can and reports the anomalies, or if it just fails altogether at the start or with partial data loaded.
Robin
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
please give the difference between AIX shell scripting and Unix shell scripting. (2 Replies)
Discussion started by: haroonec
2 Replies
2. UNIX for Dummies Questions & Answers
Dear Champs,
Can anybody help me out to write a shell script , which will check whether the process is running , if running then divide the process into 2 so that next var it can take process parallel .
Let
ps -ef | grep a.sh => shows running
note a.sh will take a process of next... (0 Replies)
Discussion started by: manas_ranjan
0 Replies
3. Solaris
Hi,
I have a script which will check the fiel existence, the lines are as below
if !(test -d ./data) then
mkdir data
fi
In the first line error occurs as below
generatelicense.sh: syntax error at line 2: `!' unexpected
Where as this script works fine in linux OS.
How to solve... (2 Replies)
Discussion started by: krevathi1912
2 Replies
4. Shell Programming and Scripting
I am trying to write a script to get all the html files under a source directory and and for each html file, run a program with html file as an argument. This program generates an output which I need to save as htmlfilename.txt ( right now i was trying to print it on the command line)
... (11 Replies)
Discussion started by: sapient
11 Replies
5. Shell Programming and Scripting
I've got the following data in a file - basically hundred of passes.
Pass Id : PASSID1
Pass Name : 7 day pass 10 Gb
Pass Group : uk
Short Name : pmbbrh2
type : restrict
Validity ... (7 Replies)
Discussion started by: jeffersno1
7 Replies
6. Shell Programming and Scripting
Hi, I'm new to C Shell programming. I'm trying to check if a sym link exists on remote server if not send email. I'm not having much luck. Can anyone help?
Here is what I have written but it doesn't work. It tells me that my variable was not defined. Here is part of the script, the second... (0 Replies)
Discussion started by: CDi
0 Replies
7. Shell Programming and Scripting
Here is the contents of an input file.
A,1,2,3,4
10,aaa,bbb,ccc,ddd
11,eee,fff,ggg,hhh
12,iii,jjj,lll,mmm
13,nnn,ooo,ppp
I wanted the output to be
A
10 1 aaa
10 2 bbb
10 3 ccc
10 4 ddd
11 1 eee
11 2 fff
11 3 ggg
11 4 hhh .....
and so on How to do it in ksh... (9 Replies)
Discussion started by: ksatish89
9 Replies
8. Shell Programming and Scripting
I have two input files 1)datafile 2)metadata file.
I have a metadata file like:
field1datatypeformat1number2string3dateyy-mm-dd
I have a data file like:
1234abc12-8-16 xyz234512-9-163456acd14-08-12
In the first row there is no correction as everything is inline with the metadata.... (3 Replies)
Discussion started by: bikky6
3 Replies
9. Shell Programming and Scripting
Hi friends
please help me on below,
i have 5 files like below
file1 is
x 10
y 20
z 15
file2 is
x 100
z 245
file3 is
y 78
z 23
file4 is
x 100 (3 Replies)
Discussion started by: siva kumar
3 Replies
10. Shell Programming and Scripting
Hi ,
I have written a shell script to call a java program say load_id.sh .This sh script indeed is executed implicitly in other sh script which calls 2 more sh scripts one by one. I need to check if the load_id.sh (which calls java program) is executed successfully only then continue with... (1 Reply)
Discussion started by: preema
1 Replies
LEARN ABOUT REDHAT
create_domain
CREATE
DOMAIN(7) SQL Commands CREATE DOMAIN(7)
NAME
CREATE DOMAIN - define a new domain
SYNOPSIS
CREATE DOMAIN domainname [AS] data_type
[ DEFAULT default_expr ]
[ constraint [, ... ] ]
where constraint is:
[ CONSTRAINT constraint_name ]
{ NOT NULL | NULL }
PARAMETERS
domainname
The name (optionally schema-qualified) of a domain to be created.
data_type
The underlying data type of the domain. This may include array specifiers. Refer to the User's Guide for further information about
data types and arrays.
DEFAULT
The DEFAULT clause specifies a default value for columns of the domain data type. The value is any variable-free expression (but
subselects are not allowed). The data type of the default expression must match the data type of the domain.
The default expression will be used in any insert operation that does not specify a value for the column. If there is no default for
a domain, then the default is NULL.
Note: If a default value is specified for a particular column, it overrides any default associated with the domain. In turn, the
domain default overrides any default value associated with the underlying data type.
CONSTRAINT constraint_name
An optional name for a constraint. If not specified, the system generates a name.
NOT NULL
Values of this domain are not allowed to be NULL.
NULL Values of this domain are allowed to be NULL. This is the default.
This clause is only available for compatibility with non-standard SQL databases. Its use is discouraged in new applications.
OUTPUTS
CREATE DOMAIN
Message returned if the domain is successfully created.
DESCRIPTION
CREATE DOMAIN allows the user to register a new data domain with PostgreSQL for use in the current data base. The user who defines a domain
becomes its owner.
If a schema name is given (for example, CREATE DOMAIN myschema.mydomain ...) then the domain is created in the specified schema. Otherwise
it is created in the current schema (the one at the front of the search path; see CURRENT_SCHEMA()). The domain name must be unique among
the types and domains existing in its schema.
Domains are useful for abstracting common fields between tables into a single location for maintenance. An email address column may be used
in several tables, all with the same properties. Define a domain and use that rather than setting up each table's constraints individually.
EXAMPLES
This example creates the country_code data type and then uses the type in a table definition:
CREATE DOMAIN country_code char(2) NOT NULL;
CREATE TABLE countrylist (id INT4, country country_code);
COMPATIBILITY
SQL99 defines CREATE DOMAIN, but says that the only allowed constraint type is CHECK constraints. CHECK constraints for domains are not yet
supported by PostgreSQL.
SEE ALSO
DROP DOMAIN [drop_domain(7)], PostgreSQL Programmer's Guide
SQL - Language Statements 2002-11-22 CREATE DOMAIN(7)