List:General Discussion« Previous MessageNext Message »
From:Gary W. Smith Date:March 2 2007 6:20pm
Subject:RE: Stored process accessing tables in different database
View as plain text  
> You SELECT statrment
>   SELECT
>     (s.server_disk_space * s.server_load * s.server_ram),
>     s.server_fqdn,
>     s.server_url,
>     s.server_id
>   INTO
>      L_server_load,
>      L_server_fqdn,
>      L_server_url,
>      L_server_id
>   FROM clientdev.servers s
>   WHERE s.active = 1
>     AND s.available = 1
>   ORDER BY
>     (s.server_disk_space * s.server_load * s.server_ram)
>   LIMIT 1;
> 
> Don't forget the semicolon after LIMIT 1
> 
> Give it a try !!!

I'll give it a shot.  To work around the problem I used a cursor.  I don't know which is more efficient.  I suspect just an inline SELECT statement.  I thought I had tried doing a SELECT fields INTO fields without success but I don't remember what that final product looked like.

Thanks, 

Gary
Thread
Stored process accessing tables in different databaseGary W. Smith2 Mar
  • Re: Stored process accessing tables in different databaseRolando Edwards2 Mar
    • RE: Stored process accessing tables in different databaseGary W. Smith2 Mar