On 2/10/2011 6:40 PM, Geoffrey Myers wrote:
I am trying to write a plsql routine that will delete a range of
characters based on their octal or hexadecimal values. Something like
the 'tr' shell command will do:
cat file| tr -d ['\177'-'\377']
Can't seem to figure this one out.
Pointers woul
I am trying to write a plsql routine that will delete a range of
characters based on their octal or hexadecimal values. Something like
the 'tr' shell command will do:
cat file| tr -d ['\177'-'\377']
Can't seem to figure this one out.
Pointers would be appreciated.
--
Until later, Geoffrey
On Wed, Feb 25, 2004 at 04:11:37AM +, Humble Geek wrote:
> Assume XXX is the id from the first insert. How do I get that number? Not
> currval('someSeq') - 'cause someone else may have performed an insert - but
> the id for that specific insert.
Read the documentation carefully, currval() doe
Thanks Greg.
That does help me some, however, I am stuck with this database (I have
inherited) - it has over a hundred tables, and while I may look into
converting it at some point, it is just unfeasible at this junction. So
where can I look to find the hard way? :)
HG
"Greg Patnude" <[EMAIL PR
Hi all. Quick and perhaps silly question, but...
I am using Pg 7.3. I am writing a function using pgplsql. This function will
perform multiple inserts. Let's say two of the inserts are as follows:
-- id is primary key
insert into users (id, username) values (nextval('someSeq'),'somename');
-- id
That's the hard way
You'd be better off redefining your table structures so that postgreSQL
handles the primary keys automatically...
CREATE TABLE test (
id integer primary key not null default nextval('test_seq'),
log varchar(32) NOT NULL,
message text
) WITH OIDS;
Using this