Consulta de SQL

Post Reply
servicomver
Posts: 159
Joined: Fri Nov 18, 2005 7:34 pm

Consulta de SQL

Post by servicomver »

Hola como puedo poner una variable para cambiar de Tabla en este comando ?
oRecordSet:Source := "Select * from T_1 Order by posted"

Necesito usar diferentes tablas T_2, T_3, T_10, T11...etc
Como debo poner la sentencia ?

Gracias por su ayuda.
User avatar
leandro
Posts: 958
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia
Contact:

Re: Consulta de SQL

Post by leandro »

Code: Select all

Local cTbl := "T_1"
oRecordSet:Source := "Select * from "+cTbl+" Order by posted"
Saludos
LEANDRO ALFONSO
SISTEMAS LYMA - BASE
Bogotá (Colombia)
[ FWH 19.09 ] [ xHarbour 1.2.3 Intl. (SimpLex) (Build 20190613) ] [ Embarcadero C++ 7.30 for Win32 ]
Post Reply