Hi ,
a:) i have configuration file with pattren
<Range start no>,<Range end no>,<type of records to be extracted from the data file>,<name of the file to store output>
eg:
myfile.confg
9899000000,9899999999,DATA,b.dat
9899000000,9899999999,SMS,a.dat
b:) Stucture of my data file is... (3 Replies)
i want to cut all the entries from the /etc/passwd file in which the uid is> 500
for this i was writing this ,m quiet new to all this.. scripting
but on the 6th n 8th line ,, i hav to specify a line number .. to get the commnd working .. but i want to use variable i instead of that ,,... (2 Replies)
Hi,
I have two files consisting of two columns. So I want to merge column 2 if column 1 is the same. So heres an example of what I mean.
FILE1
driver 444
car 333
hat 222
FILE2
driver 333
car 666
hat 999
So I want to merge the column 2's together so... (4 Replies)
Hi,
anyone has any ideas on how do we extract lines from a file with format similiar to this: (based on current time)
Jun 18 00:16:50 .......... ............. ............
Jun 18 00:17:59 .......... ............. ............
Jun 18 01:17:20 .......... ............. ............
Jun 18... (5 Replies)
Hi,
I do have a TAB delimted text file with the following format.
1 (- identifier of each group. this text is not present in the file only number)
1 3 4 65 56 WERTF
2 3 4 56 56 GHTYHU
3 3 5 64 23 VMFKLG
2
1 3 4 65 56 DGTEYDH
2 3 4 56 56 FJJJCKC
3 3 5 64 23 FNNNCHD
3
1 3 4 65 56 JDHJDH... (9 Replies)
Hi there,
Can you help. I need to extract data based on the list file(list.txt) from item.txt as shown below. Please note the actual files are enormous in size. Thank you.
item.txt
nokia1100 123,000
nokia2100 66,000
samsung123 11,000
samsung456 23,000
iphone432 234,000... (12 Replies)
i have something like this in a file called mysqldump.sql
--
-- Table structure for table `Table11`
--
DROP TABLE IF EXISTS `Table11`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Table11` (
`id` int(11) NOT NULL... (14 Replies)
Hi,
I am trying to extract lines from a text file given a text file containing line numbers to be extracted from the first file. How do I go about doing this? Thanks! (1 Reply)
here below is sample string
null pointer dereference of 'resourceList' where null is returned from a method/opt/bld/fetch/ds/interzone/notification/LocalLineStatusNotificationListener.java:79
null pointer dereference of 'reList' where null is returned from a... (3 Replies)
Dear All,
I have to solve the following problems with multiple tab-separated text file but I don't know how. Any help would be greatly appreciated. I have access to Linux mint (but not as a professional).
I have multiple tab-delimited files with the following structure:
file1:
1 44
2 ... (5 Replies)
Discussion started by: Bastami
5 Replies
LEARN ABOUT CENTOS
create_domain
CREATE DOMAIN(7) PostgreSQL 9.2.7 Documentation CREATE DOMAIN(7)NAME
CREATE_DOMAIN - define a new domain
SYNOPSIS
CREATE DOMAIN name [ AS ] data_type
[ COLLATE collation ]
[ DEFAULT expression ]
[ constraint [ ... ] ]
where constraint is:
[ CONSTRAINT constraint_name ]
{ NOT NULL | NULL | CHECK (expression) }
DESCRIPTION
CREATE DOMAIN creates a new domain. A domain is essentially a data type with optional constraints (restrictions on the allowed set of
values). 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 domain name must be unique among the types and domains existing in its schema.
Domains are useful for abstracting common constraints on fields into a single location for maintenance. For example, several tables might
contain email address columns, all requiring the same CHECK constraint to verify the address syntax. Define a domain rather than setting up
each table's constraint individually.
To be able to create a domain, you must have USAGE privilege on the underlying type.
PARAMETERS
name
The name (optionally schema-qualified) of a domain to be created.
data_type
The underlying data type of the domain. This can include array specifiers.
collation
An optional collation for the domain. If no collation is specified, the underlying data type's default collation is used. The
underlying type must be collatable if COLLATE is specified.
DEFAULT expression
The DEFAULT clause specifies a default value for columns of the domain data type. The value is any variable-free expression (but
subqueries are not allowed). The data type of the default expression must match the data type of the domain. If no default value is
specified, then the default value is the null value.
The default expression will be used in any insert operation that does not specify a value for the column. If a default value is defined
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 normally prevented from being null. However, it is still possible for a domain with this constraint to take a
null value if it is assigned a matching domain type that has become null, e.g. via a LEFT OUTER JOIN, or INSERT INTO tab (domcol)
VALUES ((SELECT domcol FROM tab WHERE false)).
NULL
Values of this domain are allowed to be null. This is the default.
This clause is only intended for compatibility with nonstandard SQL databases. Its use is discouraged in new applications.
CHECK (expression)
CHECK clauses specify integrity constraints or tests which values of the domain must satisfy. Each constraint must be an expression
producing a Boolean result. It should use the key word VALUE to refer to the value being tested.
Currently, CHECK expressions cannot contain subqueries nor refer to variables other than VALUE.
EXAMPLES
This example creates the us_postal_code data type and then uses the type in a table definition. A regular expression test is used to verify
that the value looks like a valid US postal code:
CREATE DOMAIN us_postal_code AS TEXT
CHECK(
VALUE ~ '^d{5}$'
OR VALUE ~ '^d{5}-d{4}$'
);
CREATE TABLE us_snail_addy (
address_id SERIAL PRIMARY KEY,
street1 TEXT NOT NULL,
street2 TEXT,
street3 TEXT,
city TEXT NOT NULL,
postal us_postal_code NOT NULL
);
COMPATIBILITY
The command CREATE DOMAIN conforms to the SQL standard.
SEE ALSO
ALTER DOMAIN (ALTER_DOMAIN(7)), DROP DOMAIN (DROP_DOMAIN(7))
PostgreSQL 9.2.7 2014-02-17 CREATE DOMAIN(7)