Hello
I have 2 tables. TABLE1 and TABLE2.
TABLE1 has about 400 records with details (client code, name, surname, address,
date of birth) of my clients.
TABLE2 is filled with some of the client details and other extra details
(client code, address, telephone, etc)
So in my ASP page i have a
I don't use ASP but in PHP I would do something in the line of
$valuetoinsert = SANT'ANGELO LODIGIANO;
$query = INSERT INTO TABLE2 (TE_INDI) VALUES (' . str_replace(', '',
$valuetoinsert) . ');
I'm sure ASP has also a string replacement function
Shavonne Marietta Wijesinghe [EMAIL
Bart Degryse a ecrit le 16/03/2007 10:03:
I don't use ASP but in PHP I would do something in the line of
$valuetoinsert = SANT'ANGELO LODIGIANO;
$query = INSERT INTO TABLE2 (TE_INDI) VALUES (' . str_replace(',
'', $valuetoinsert) . ');
I'm sure ASP has also a string replacement function
thanks.. i will take a look at the link
Shavonne Wijesinghe
http://www.studioform.it
Le informazioni contenute nella presente comunicazione e i relativi allegati
possono essere riservate e sono, comunque destinate esclusivamente alle
persone o alla Società sopra indicati.
La diffusione,
i took a look at the link Guillaume gave me. But it also explains on PHP
i'm using ASP :(
- Original Message -
From: Guillaume Lelarge [EMAIL PROTECTED]
To: Bart Degryse [EMAIL PROTECTED]
Cc: pgsql-sql@postgresql.org; Shavonne Marietta Wijesinghe
[EMAIL PROTECTED]
Sent: Friday,
Shavonne Marietta Wijesinghe a ecrit le 16/03/2007 11:31:
i took a look at the link Guillaume gave me. But it also explains on PHP
i'm using ASP :(
Yes, that's why I said that it didn't answer your question. Sorry if
this wasn't clear.
After a bit of googling, I found the replace function.
When i have a string that has a ' inside of it the record is not inserted in
to TABLE2. I know
that writing it twice will fix it but how can i ask my ASP code to do it..
INSERT INTO TABLE2 (TE_INDI) VALUES ('SANT'ANGELO LODIGIANO');
If you are using PostgreSQL = 8.0 you can use dollars
INSERT INTO TABLE2 (TE_INDI) VALUES ($SANT'ANGELO LODIGIANO$);
My mistake, a single $ will not work you need two like $$:
INSERT INTO TABLE2 (TE_INDI) VALUES ($$SANT'ANGELO LODIGIANO$$);
Regards,
Richard Broersma Jr.
---(end of broadcast)---
Thanks alot
^_^
Shavonne Wijesinghe
http://www.studioform.it
- Original Message -
From: Richard Broersma Jr [EMAIL PROTECTED]
To: Richard Broersma Jr [EMAIL PROTECTED]; Shavonne Marietta
Wijesinghe [EMAIL PROTECTED]; pgsql-sql@postgresql.org
Sent: Friday, March 16, 2007
Shavonne Marietta Wijesinghe wrote:
Thanks alot
What happens if you try to insert a string with $$ on it?
--
Alvaro Herrerahttp://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
---(end of
Given the following test table, I want to grab only the newest record and
disregard any older duplicates based on name. Is this the most efficient way
to do it? Will the indicies even make a difference? The table below
demonstrates a simple proof of concept. My final table will have millions of
Travis Whitton [EMAIL PROTECTED] writes:
Given the following test table, I want to grab only the newest record and
disregard any older duplicates based on name. Is this the most efficient way
to do it?
No, it's gonna be pretty awful. The best way I know of involves
DISTINCT ON (see the
One last question, using the weather report example, is it going to
improve performance for the DISTINCT ON query to add an index to the
location and time columns?
Thanks a lot,
Travis
On 3/16/07, Tom Lane [EMAIL PROTECTED] wrote:
Travis Whitton [EMAIL PROTECTED] writes:
Given the following
Hi dudes. I have my pg log file rotation configured so i have a
psql_`today`.log. The thing is, can i configure postgres so the file
permissions (today is 600) could by 640, so developers could login and
tailf the logfile (without using the postgres superuser, course)?
Thanks!
Gerardo
Travis Whitton [EMAIL PROTECTED] writes:
One last question, using the weather report example, is it going to
improve performance for the DISTINCT ON query to add an index to the
location and time columns?
A two-column index matching the ORDER BY that you use might help,
or then again might not
Gerardo Herzig wrote:
Hi dudes. I have my pg log file rotation configured so i have a
psql_`today`.log. The thing is, can i configure postgres so the file
permissions (today is 600) could by 640, so developers could login and
tailf the logfile (without using the postgres superuser, course)?
Gerardo Herzig [EMAIL PROTECTED] writes:
Hi dudes. I have my pg log file rotation configured so i have a
psql_`today`.log. The thing is, can i configure postgres so the file
permissions (today is 600) could by 640, so developers could login and
tailf the logfile (without using the postgres
From: Shavonne Marietta Wijesinghe [EMAIL PROTECTED]
I have 2 tables. TABLE1 and TABLE2.
TABLE1 has about 400 records with details (client code, name, surname,
address, date of birth) of my clients.
TABLE2 is filled with some of the client details and other extra details
(client code,
18 matches
Mail list logo