Board index » delphi » Table does not exist

Table does not exist

Im trying tu use the fowling SP to retrive information

CREATE PROCEDURE P1  RETURNS (
  DATAINICIOAPAC DATE,
  DATATERMINOAPAC DATE,
  DATACOBRANCA DATE,
  TERMINOREAL DATE,
  MOTIVOCOBRANCA VARCHAR(2)
) AS

BEGIN

for select DtInicioApac,DtTerminoApac,DataCobranca,MotivoCobranca

from
Apac

into
:DATAINICIOAPAC,:DataTerminoApac,:DataCobranca,:MotivoCobranca
DO
BEGIN
     IF (:MOTIVOCOBRANCA='71') THEN TERMINOREAL=:DataTerminoApac;
                               ELSE TERMINOREAL=:DataCobranca ;

suspend;
END

END

but when i use the fowling sql statment on SQL Exolorer

select * from p1

Im geting the error

Table does not exits

what is happening ?

 

Re:Table does not exist


BEGIN

for select DtInicioApac,DtTerminoApac,DataCobranca,MotivoCobranca

from
Apac
into :DtInicioApac,:DtTerminoApac,:DataCobranca,:MotivoCobranca
do
  suspend;
END;

--
Bill
(TeamB cannot answer questions received via email)

Re:Table does not exist


Bill,
using

CREATE PROCEDURE P1  RETURNS (
  DATAINICIOAPAC DATE,
  DATATERMINOAPAC DATE,
  DATACOBRANCA DATE,
  MOTIVOCOBRANCA VARCHAR(2)
) AS

BEGIN

for select DtInicioApac,DtTerminoApac,DataCobranca,MotivoCobranca

from
Apac
into :DataInicioApac,:DataTerminoApac,:DataCobranca,:MotivoCobranca
do
  suspend;

END

Im still geting the same error message "Table does not exist"

but the statment

select DtInicioApac,DtTerminoApac,DataCobranca,MotivoCobranca

from
Apac

works fine

Re:Table does not exist


What version of IB?
What platform is the IB server on?
How are you running the query that works? IBConsole? ISQL?...
Do you get the error when you try to create the stored proc or when you
execute it?
When you look at the metadata for the table is the name in quotes? If so, it
is case sensitive.

--
Bill
(TeamB cannot answer questions received via email)

Re:Table does not exist


Im using SQL Explorer 4.0 on Win 2000 to create and run procedures and
queries
BDE 5.01
IB SuperServer 6.0 on RedHat Lunux 7.1
I can create the procedure with no errors but I cant run it

But , sorry I get the error I cant use "Request Live Queries"
thanks a lot

Alvaro

Re:Table does not exist


 >>But , sorry I get the error I cant use "Request Live Queries"

Quote
>>thanks a lot

Now I am confused. I thought the error you are getting is "Table does not
exist".  Which is it?
Use IBConsole to display the metadata for the table. Is the table name in
quotes? If so the case of the table name in the stored procedure must match
the case shown in the metadata exactly.

How are you executing the stored procedure when you get the error? I need to
know what program you are using and the exact text of the statement you are
using to execute the stored procedure.

--
Bill
(TeamB cannot answer questions received via email)

Re:Table does not exist


I only get the error message "Table does not exist" when the option of SQL
Explorer "Request Live Queries" is checked

the text I use is

select * from p1

wher p1 is the stored procedure

SQL Explorer seens to have a probleam with live queries

thanks
"Bill Todd (TeamB)" <bill.nos...@dbginc.com> escreveu na mensagem
news:3bdddf41_1@dnews...

Quote
> >>But , sorry I get the error I cant use "Request Live Queries"
> >>thanks a lot

> Now I am confused. I thought the error you are getting is "Table does not
> exist".  Which is it?
> Use IBConsole to display the metadata for the table. Is the table name in
> quotes? If so the case of the table name in the stored procedure must
match
> the case shown in the metadata exactly.

> How are you executing the stored procedure when you get the error? I need
to
> know what program you are using and the exact text of the statement you
are
> using to execute the stored procedure.

> --
> Bill
> (TeamB cannot answer questions received via email)

Re:Table does not exist


RequestLive will quote your table names.  This makes the table/coulmn names case
sensitive so you must have the case correct (usually all caps).

Quote
Alvaro wrote:

> I only get the error message "Table does not exist" when the option of SQL
> Explorer "Request Live Queries" is checked

--
Jeff Overcash (TeamB)   | Talk about failure
(Please do not email    | To fall is not to fail
 me directly unless     | Failure isn't about falling down
 asked.  Thank You)     | Failure is staying down (Marillion)

Re:Table does not exist


You cannot have a live query from a StoredProc because there is no way to
know what table to update. Also, as Jeff said, RequestLive makes the table
name case sensitive.

--
Bill
(TeamB cannot answer questions received via email)

Other Threads