Friday, July 8, 2011

Using dynamic Queries


//Example of dynamic query in SQL Server, following example use SQL Server pubs database

DECLARE @SQLSTRING VarChar(15)

SET @SQLSTRING = 'titleauthor'

SELECT @SQLString ='select au_id from '+ @SQLSTRING

EXEC (@SQLString)

No comments:

Post a Comment

If you’re using Visual Studio to build your .NET MAUI app on a Mac, locating the IPA (iOS App Package) file can be a bit tricky

  If you’re using   Visual Studio   to build your   .NET MAUI   app on a   Mac , locating the   IPA (iOS App Package)   file can be a bit tr...