[SQL] escape single quote in INSERT command

2002-11-26 Thread Hunter
Hi Group - 

I have a perl application for a registration form. I'd like to put
escape characters in my insert command to accommodate for '
(i.e. O'Brien, O'Malley, etc). I've tired double quotes, single
quotes, back tick, forward ticks, curly bracket, round brackets - no
success.


Thanks, dave

---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



[SQL] Functions and Triggers

2001-06-06 Thread Hunter, Ray
Title: Functions and Triggers






I need help on creating a sql function that will check four rows in a table based on that check it will update another row on a different table.  I want to use this function in a trigger statement.

Table 1 (Test Type)
id  cat sub-cat test        status      timestamp


Table 2 (Record)
timestamp   card    comp_date   status



What I am trying to do is when someone enters data in on table 2 the trigger will verifty the record and then look at all records with the same id and card type, then it will determine the status of the test, or in other words it will change the value of status in table 1.

Thanks, 
 
 
 
RAY HUNTER
Automated Test Group
 
ENTERASYS NETWORKS
 
E-mail:   [EMAIL PROTECTED]
 
www.enterasys.com





[SQL] Getting a specific row from a table

2001-06-13 Thread Hunter, Ray
Title: Getting a specific row from a table





My problem is that I want to pull to specific rows from a query result.


First here is the query:
SQL-query:
select card, status, time_stamp, comp_date
from test_record
where id = 45
order by card, comp_date 


Next here is the result:


card                    status      time stamp          Comp_Date
ER16-04 ER16-08             No      2001-06-13 13:56:52-06  6/10/01 
ER16-04 ER16-08             Yes         2001-06-11 11:37:04-06  6/11/01 
ER16-04 ER16-08             No      2001-06-11 13:13:07-06  6/11/01 
ER16-04 ER16-08             No      2001-06-11 13:13:37-06  6/11/01 
ER16-04 ER16-08             No      2001-06-13 13:57:41-06  6/12/01 
ER16-04 ER16-08             Yes         2001-06-13 13:10:46-06  6/13/01 
ER16-04 ER16-08             No      2001-06-13 13:35:29-06  6/13/01 
SSR-ATM29-02 SSR-FDDI-02    No      2001-06-11 13:21:01-06  6/11/01 
SSR-ATM29-02 SSR-FDDI-02    Yes         2001-06-11 13:21:17-06  6/11/01 
SSR-ATM29-02 SSR-FDDI-02    No      2001-06-11 13:21:41-06  6/11/01 
SSR-ATM29-02 SSR-FDDI-02    Yes         2001-06-11 13:22:21-06  6/11/01 


What I want is the two rows that are bold.  However this list will continue to grow and have more card types.  I always want the last card type in the card group, because this has the comp_date that I am looking for.

Thanks,


 
RAY HUNTER
Automated Test Group


 
ENTERASYS NETWORKS
 
Internal: 53888
Phone:   801 887-9888
Fax:  801 972-5789
Cellular:  801 698-0622
E-mail:   [EMAIL PROTECTED]
 
www.enterasys.com





[SQL] Functions and Triggers

2001-06-20 Thread Hunter, Ray
Title: Functions and Triggers





Is there anyone that can point me into the right direction for creating a function and trigger that will do something along these lines:

I have a table that has router card types and a status on them:


TEST_RECORD
    CARD                STATUS
1.  er16-04         0 
2.  er16-04 er16-08     1
3.  ssr8000 ssr8600     0
4.  er16-04         1
5.  er16-04 ssr8600     0
6.  er-16-04            1


I need a trigger with a function that will check the card type and status and from there determine the over all status of the test in the test_table.  Each tuple represents one test on a specific card(s) and the status is pass or fail. 

Here the overall status that would be updated in the test_table status be fail, because of the ssr8600 on line 5.


I appreciate any suggestions and/or comments.


 
 
RAY HUNTER
Automated Test Group
Software Support Engineer
 
ENTERASYS NETWORKS
 
Internal: 53888
Phone:   801 887-9888
Fax:  801 972-5789
Cellular:  801 698-0622
E-mail:   [EMAIL PROTECTED]
 
www.enterasys.com





[SQL] Functions and Triggers

2001-06-20 Thread Hunter, Ray
Title: Functions and Triggers





Is there anyone that can point me into the right direction for creating a function and trigger that will do something along these lines:

I have a table that has router card types and a status on them:


TEST_RECORD
    CARD                STATUS
1.  er16-04         0 
2.  er16-04 er16-08     1
3.  ssr8000 ssr8600     0
4.  er16-04         1
5.  er16-04 ssr8600     0
6.  er-16-04            1


I need a trigger with a function that will check the card type and status and from there determine the over all status of the test in the test_table.  Each tuple represents one test on a specific card(s) and the status is pass or fail. 

Here the overall status that would be updated in the test_table status be fail, because of the ssr8600 on line 5.


I appreciate any suggestions and/or comments.


 
 
RAY HUNTER
Automated Test Group
Software Support Engineer
 
ENTERASYS NETWORKS
 
Internal: 53888
Phone:   801 887-9888
Fax:  801 972-5789
Cellular:  801 698-0622
E-mail:   [EMAIL PROTECTED]
 
www.enterasys.com






[SQL] Replication

2001-10-18 Thread Hunter, Ray
Title: Replication





Does Postgres in anyway support replication?  Will I be able to have load-balancing between two postgres databases?


RAY HUNTER
Automated Test Group
Software Support Engineer
 
ENTERASYS NETWORKS
 
Internal: 53888
Phone:   801 887-9888
Fax:  801 972-5789
Cellular: 801 698-0622


[EMAIL PROTECTED]
 
www.enterasys.com





[PATCHES] male performance system

2005-05-31 Thread chasidy hunter
This website will explain the benefits of LONGZ, help answer some of your
questions, and give you the chance to order and get FREE bottles at no extra
charge.

90% of males were interested in improving their sexual stamina, 
performance, and the size of their manhood. Are you one of the 90%?

I want to let u guys know that I have seen over 1 inch in length increase
since I started taking ur system. The exercises are easy too. I use them
both and this is awesome. Clancy, Spokane

Check out the only Male Enhancement formula with a free DVD

http://m.Y.qualitystartsonline.com/ln/



not now, then the post office address is listed in link


The third and last gift of the present series, resumed the Demon, is one no
less curious than the Record of Events, although it has an entirely
different value
The kitten could not have eaten your piglet--for here it is! He took off
his funnel hat and from beneath it produced a tiny white piglet, which he
held aloft that all might see it clearly, It is a Character Marker
What's that? inquired Rob

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [SQL] Selecting rows with "static" ordering

2007-04-27 Thread Kevin Hunter

At 8:01p -0400 on 26 Apr 2007, Steve Midgley wrote:
From that application, I want to retrieve all those rows, and I  
want them in the order they are currently stored in that variable.  
So take for example this foreign application variable:


  ids = "3,2,5,1,4"

The application then executes this sql:

  select * from table where id in (3,2,5,1,4)


Is there a "neat trick" that anyone knows for pulling this off in a  
single query? Basically right now I'm issuing 5 queries to the  
backend to ensure ordering but this horribly inefficient.


Why not do this particular ordering on the application side?  With  
this example SQL, and assuming you've PRIMARY KEYed( id ), you're  
guaranteed to get a unique id for each tuple.  Presumably, you've got  
the order you want stored within your application, so just pull it  
out of a hash in the order you need it.


Or is it terribly more complicated than this?

Kevin

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

  http://www.postgresql.org/docs/faq