Sunday, February 26, 2012

Help SQL

Friends,
How can i get the result from this SQL?
SET @.TB=' TB_CLIENTES '
SET @.SQL='select count(*) as QT from '+@.TB
EXEC (@.SQL)
Thanks
Leandro Loureiro dos Santos
Vitoria-ES / BRAZILThis is a multi-part message in MIME format.
--=_NextPart_000_029D_01C37D0F.8A6D5BB0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Please do not multi-post. Answered in .programming.
-- Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"Leandro Loureiro dos Santos" <leandro@.email.com> wrote in message =news:epFD38SfDHA.164@.tk2msftngp13.phx.gbl...
Friends,
How can i get the result from this SQL?
SET @.TB=3D' TB_CLIENTES '
SET @.SQL=3D'select count(*) as QT from '+@.TB
EXEC (@.SQL)
Thanks
Leandro Loureiro dos Santos
Vitoria-ES / BRAZIL
--=_NextPart_000_029D_01C37D0F.8A6D5BB0
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Please do not multi-post. =Answered in .programming.
-- Tom
---T=homas A. Moreau, BSc, PhD, MCSE, MCDBASQL Server MVPColumnist, SQL =Server ProfessionalToronto, ON Canadahttp://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=/sql
"Leandro Loureiro dos Santos" wrote in =message news:epFD38SfDHA.164@.t=k2msftngp13.phx.gbl...Friends,How can i get the result from this SQL?SET @.TB=3D' TB_CLIENTES ='SET @.SQL=3D'select count(*) as QT from '+@.TBEXEC (@.SQL)ThanksLeandro Loureiro dos SantosVitoria-ES / BRAZIL

--=_NextPart_000_029D_01C37D0F.8A6D5BB0--

No comments:

Post a Comment