Viewing 15 posts - 7,351 through 7,365 (of 7,597 total)
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...
June 25, 2012 at 10:37 am
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,...
June 25, 2012 at 9:28 am
"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,...
June 25, 2012 at 9:12 am
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...
June 22, 2012 at 2:27 pm
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...
June 22, 2012 at 12:29 pm
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...
June 22, 2012 at 9:27 am
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,...
June 22, 2012 at 8:08 am
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,...
June 21, 2012 at 2:13 pm
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...
June 21, 2012 at 1:39 pm
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...
June 21, 2012 at 1:29 pm
Is there a sql statement that could turn it into this?
Yes, look at PIVOT as well.
June 21, 2012 at 1:19 pm
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...
June 21, 2012 at 1:15 pm
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...
June 21, 2012 at 1:08 pm
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...
June 19, 2012 at 2:56 pm
Viewing 15 posts - 7,351 through 7,365 (of 7,597 total)