Forum Replies Created

Viewing 15 posts - 151 through 165 (of 1,468 total)

  • Reply To: Select from a table that might not exist

    You can do something like this for the dynamic SQL

    DECLARE @SQL nvarchar(MAX);

    IF OBJECT_ID(N'dbo.tblDoesntExist', N'U') IS NULL
    BEGIN
    -- TABLE does not exist
    SET @SQL = N'
    ...
  • Viewing 15 posts - 151 through 165 (of 1,468 total)