Tema: Re: HELP SQL
Autorius: CGI 600
Data: 2010-01-24 18:37:16
EXEC ('SELECT	ContactID,
    		FirstName,
    		LastName
 	FROM '+ @LentelePavadinimas + '
 	WHERE LastName = ' + @LastName + '
 	ORDER BY Contact
      )

N wrote:
> CREATE PROCEDURE GautiKiekius (@LentelePavadinimas NVARCHAR(50))
> AS
> SELECT ContactID,
>     FirstName,
>     LastName
> FROM '{'+@LentelePavadinimas+']'
> WHERE LastName = @LastName
> ORDER BY Contact
> 
> Iskart gaunu klaida FROM negali buti tarp kabuciu ir t.t
> Gal yra kokia fukncija tokiems dalykams pvz foxpro tikrai zinau kad stringa 
> gali isreiskti kaip koda selektro. 
> 
>