SQL*Loader: Release 10.2.0.4.0 - Production on Mon Jan 16 19:52:03 2012
Copyright (c) 1982, 2007, Oracle. All rights reserved.
SQL*Loader-291: Invalid bind variable :TIMESTAMP in SQL string for column VDATE.
...
Just specify the datatype ("timestamp") and the format in your control file and Oracle will perform the implicit conversion if your database column is a date.
An example follows:
Quote:
...
...the format remains the same throughtout but the date change everyday
for eg today is 16-jan
the file is ERIC_VOUCHERDAT16
You can extract the current date from the "date" command of Unix/Linux, like so -
Assign this to a shell variable and use that variable in your filename within the ftp command-list. Or you could use the output of the command above directly in your filename.
Hello
i have a shell script. it is running fine when i manually run at command prompt using following command
./script_file
but while running shell script from crontab, it is giving error in each line. (2 Replies)
Dear expert,
Can we invoke sqlldr command remotely.
When I try rsh command in machine 10.1.65.116, it's failed on sqlloader command. However, nothing wrong on the shell scripts or environment setting of the remote environment, I able to execute in the scripts in remote machine.
in machine... (8 Replies)
hey all,
i am working on sun solaris machine and i want to start a process in background using shell script (actually i wanna start tomcat server using shell script). please dont tell me that append a & at last because this is not working in the shell script. i have also used nohup and... (8 Replies)
Hi friends,
I have a script that sets the env variable path based on different conditions.
Now the new path variable setting should not done in the same terminal or same shell.
Only a new terminal or new shell should have the new path env variable set.
I am able to do this only as follows:
>cd... (1 Reply)
Hi
I'm using SQL*Loader in shell script as below
sqlldr $uname/$pword@$ORACLE_SID parfile=$test.par
for e.g. if $test is 'file1'
and getting the below error
LRM-00109: could not open parameter file 'file1'
LRM-00113: error when processing file 'file1'
SQL*Loader: Release... (7 Replies)
Dear Brothers!
Need your help for the case where I am running one command on prompt and its giving us the correct output, but when i use the same command from shell its directs no output.:wall:
the command on command prompt is
ls -ltrh * | nawk '{if ($5~ '/$'M'/') print $9}' | grep -v... (1 Reply)
Hi Guru's,
I am creating alias for db instance running on a server through script, am able to create them based on /etc/oratab entries and can use successfully with the below script.
#!/bin/bash
SCRIPT_PATH=${HOME}/scripts/db/script... (3 Replies)
Good morning,
I'm attempting to call sqlldr via shell script and it is prompting endIf is unec
#!/bin/sh
cd /tmp/v_tst
FILENAME_WANTED=`date +"HourlyData_%Y%m%d_%H00.txt"`
echo "FILENAME_WANTED = ${FILENAME_WANTED}"
LIST_OF_FILES=`ls -rt HourlyData*.txt |tail -1`
LIST_OF_FILES=`basename... (4 Replies)
My current requirement is to replace xxyxx string with value of date
date1 variable holds a date
and the current script writes html tags to a file as follows
echo date1
nawk 'BEGIN{
FS=","
print "<HTML>""<HEAD>""<p>Hi All,<br><br>There are no cases closed on the xxyxx"
print ... (2 Replies)
Discussion started by: Rajesh A S
2 Replies
LEARN ABOUT DEBIAN
grass-pg
grass-pg(1grass) Grass User's Manual grass-pg(1grass)NAME
grass-pg - PostgreSQL driver
PostgreSQL driver PostgreSQL driver in GRASS The driver name is 'pg'.
Creating a PostgreSQL database
A new database is created with 'createdb', see the PostgreSQL manual for details.
Connecting GRASS to PostgreSQL
# example for connecting to a PostgreSQL server:
db.connect driver=pg database="host=myserver.osgeo.org,dbname=mydb"
# password is asked interactively if not specified:
db.login user=myname [pass=secret]
db.connect -p
db.tables -p
Supported SQL commands
All SQL commands supported by PostgreSQL. It's not possible to use C-like escapes (with backslash like
etc) within SQL syntax.
Operators available in conditions
All SQL operators supported by PostgreSQL.
Adding an unique ID column
Import vector module require an unique ID column which can be generated as follows in a PostgreSQL table:
echo "
ALTER TABLE mytable ADD ID integer;
CREATE SEQUENCE mytable_seq;
UPDATE mytabe SET ID = nextval('mytable_seq');
DROP SEQUENCE mytable_seq;
" | db.execute
Attribute Converters
CSV import into PostgreSQL:
h copy
COPY t1 FROM 'filename' USING DELIMITERS ',';
pg2xbase: DBF to PostgreSQL converter.
Geometry import from PostgreSQL table
v.in.db creates a new vector (points) map from a database table containing coordinates. See here for examples.
PostGIS: PostgreSQL with vector geometry
PostGIS: adds geographic object support to PostgreSQL.
Example: Import from PostGIS
In an existing PostGIS database, create the following table:
CREATE TABLE test
(
id serial NOT NULL,
mytime timestamp DEFAULT now(),
text varchar,
wkb_geometry geometry,
CONSTRAINT test_pkey PRIMARY KEY (id)
) WITHOUT OIDS;
# insert value
INSERT INTO test (text, wkb_geometry)
VALUES ('Name',geometryFromText('POLYGON((600000 200000,650000
200000,650000 250000,600000 250000,600000 200000))',-1));
# register geometry column
select AddGeometryColumn ('postgis', 'test', 'geometry', -1, 'GEOMETRY', 2);
GRASS can import this PostGIS polygon map as follows:
v.in.ogr dsn="PG:host=localhost dbname=postgis user=neteler" layer=test
output=test type=boundary,centroid
v.db.select test
v.info -t test
Geometry Converters
PostGIS with shp2pgsql:
shp2pgsql -D lakespy2 lakespy2 test > lakespy2.sql
e00pg: E00 to PostGIS filter, see also v.in.e00.
GDAL/OGR ogrinfo and ogr2ogr: GIS vector format converter and library, e.g. ArcInfo or SHAPE to PostGIS.
ogr2ogr -f "PostgreSQL" shapefile ??
SEE ALSO
db.connect, db.execute,
Database management in GRASS GIS,
Help pages for database modules,
SQL support in GRASS GIS
PostgreSQL web site,
pgAdmin graphical user interface
Book: PostgreSQL: Introduction and Concepts by Bruce Momjian
PostgreSQL Documentation
PostgreSQL Technical Documentation
GDAL/OGR PostgreSQL driver documentation
MapServer Wiki
Last changed: $Date: 2011-02-07 18:59:50 +0100 (Mon, 07 Feb 2011) $
Help Index
GRASS 6.4.2grass-pg(1grass)