[SQL] Case Insensitive Queries

2001-05-29 Thread Dan Lyke
Mark writes: > Is it possible to execute a query using a where clause that allows case > insensitive comparison between a field and text. select * from account where upper(username) = upper('test') (Upper used because, as has been remarked on this list and in other places, folding from richer ch

[SQL] Using Random Sequence as Key

2001-04-16 Thread Dan Lyke
Bernardo de Barros Franco writes: > Hello, I was wondering if noone can help me maybe someone could at least > give me some directions where to look for info or where to ask: > I wanted to index a table by a random key. As others have pointed out, making a unique random primary key is tough. What

Re: [SQL] Serials.

2001-03-24 Thread Dan Lyke
Grant writes: > I have a message board. Where users can send each other messages. I > doubt I will ever get 2147483647 messages, but I want to make sure I > never get an error where the message isn't sent. Think about loads. If your users are going to be posting 10 messages/second, that's 864000

Re: [SQL] "'" in SQL INSERT statement

2001-01-25 Thread Dan Lyke
Alessio Bragadini writes: > Markus Wagner wrote: > > I have some data that I wish to transfer into a database using perl/DBI. > > If you use Perl DBI you should issue statements like > $dbh->do ('INSERT INTO table (field1, field2) VALUES (?,?)', > undef, $value1, $value2); $dbh->quote() al

[SQL] reinitialize a sequence?

2000-12-04 Thread Dan Lyke
Bruno Boettcher writes: > is there a simple way to tell all sequences to take the max value +1 of > their respective tables? (a bit like the vacuum command?) This is completely gross, but what I've done: #!/usr/bin/perl -w use strict; use DBI; my ($dbh); sub BEGIN { $dbh = DBI->connect('DBI