Forum Replies Created

Viewing 15 posts - 7,351 through 7,365 (of 7,597 total)

  • RE: Temp Tables

    When read literally, today's question is simple and straightforward.

    Quite true. The second part is clearly false, since "When [you are] dealing with table variables, ...", you cannot define indexes...

  • RE: Temp Tables

    If that is the case, are there any advantages to using a table variable over a temp table? ...

    Is there actually any advantage over using a session scoped temp table?

    AFAIK,...

  • RE: Temp Tables

    "A Table Variable can have primary keys and indexes defined." I don't see the word "you" in there. Can indexes be defined on a table variable? Well, they can exist,...

  • RE: Comparison Across Columns

    Computed columns are generally very efficient.

    Also, they keep the column name the same for everyone -- CTEs get re-coded and so the column names can vary greatly from one piece...

  • RE: Comparison Across Columns

    if I included those computed columns and accessed the table via a SELECT * query elsewhere, would it also return those columns?

    Yes. In that case, SQL would consider that...

  • RE: Database Object Owner

    You could use a DDL CREATE_TABLE trigger to:

    1) rollback the CREATE TABLE if the schema is not dbo (this should greatly help in forcing others to explicitly change their code...

  • RE: Merge Statement

    Yes, MERGE would be applicable to that scenario.

  • RE: Comparison Across Columns

    Unfortunately, I can't add anymore columns to the existing table without causing it to bloat up more.

    Keep in mind that computed columns are NOT physically stored in the table,...

  • RE: Comparison Across Columns

    Since there's only three dimensions being tested, I wonder if it's easier to just add computed columns to the base table and do all the calcs inline in one query,...

  • RE: You do not have permission to use the bulk load statement

    A sysadmin can't be denied anything in SQL Server, so something else is going on here.

    Is this a SQL login or a Windows login?

    If W, is it a group or...

  • RE: Max value in the table

    If you only want to compare based on the leading numeric characters (0-9 only), you can do this (I prefer PATINDEX to CHARINDEX in this case, as it handles all...

  • RE: SQL Statement to turn Row items into column headers?

    Is there a sql statement that could turn it into this?

    Yes, look at PIVOT as well.

  • RE: IDENTIY COLUMN Property behaviour

    When the table is truncated the table is reseeded with values back to 1 again.

    Technically, the table is set back so that the next row inserted gets the initial...

  • RE: Merge Statement

    The "traditional way" was to do an UPDATE then an INSERT, each time doing a join from the new data to the existing table data to verify that they key...

  • RE: Is there a way to generate an insert stored procedure

    You really should use the sys.* views to generate the code, rather than using the INFORMATION_SCHEMA views, because, according to Books Online:

    "

    Do not use INFORMATION_SCHEMA views to determine the schema...

Viewing 15 posts - 7,351 through 7,365 (of 7,597 total)