Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   SQL (https://www.clubdelphi.com/foros/forumdisplay.php?f=6)
-   -   information schema tables???? (https://www.clubdelphi.com/foros/showthread.php?t=65206)

peripla 27-11-2009 16:35:00

information schema tables????
 
Hola, les quiero hacer una consulta....

Antes corria estas Queryes:

st:='select cast('+apostrofe+'case when Debito'+apostrofe+' + substring(column_name,7,6) + '+apostrofe;
st:=st+'- Credito'+apostrofe+' + substring(column_name,7,6)+ '+apostrofe+' > 1 then case when Credito';
st:=st+ apostrofe + ' + substring(column_name,7,6) + '+apostrofe+'>0 then ' + apostrofe+ ' as varchar(255)) c1,+ cast(substring(column_name,7,6)';
st:=st+'as varchar(255))c2 from information_schema.columns';
st:=st+' where table_Name like '+apostrofe+'tmp_afiliadossuspension_traspuesta' + id + '_' + IntToStr(anio) + apostrofe;
st:=st+' and column_name like '+apostrofe+'debito%'+apostrofe;
st:=st+' order by column_name';
qry:= AbreQuery(st);

Ahora me "obligaron" a agregarle el #, a las tablas para que sean temporales y no me funciono mas. Alguien tiene idea de como puedo hacer que funcione. Muchas gracias utilizo SQL SERVER 2000, DELPHI 5....

ContraVeneno 27-11-2009 19:18:30

:confused::confused::confused:

¿para que?

Si quieres tablas temporales, primero tienes que crearlas... no puedes hacer que una tabla sea temporal así como así...

no entiendo que es lo que quieren lograr...


La franja horaria es GMT +2. Ahora son las 10:50:54.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi