Viewing 15 posts - 11,536 through 11,550 (of 13,462 total)
use a char1, and simply put a check constraint--
CREATE TABLE blah(
GENDER CHAR(1) NULL DEFAULT 'U' CHECK(GENDER IN('M','F','U') --U for undisclosed? some politically correct places require that nowadays
February 22, 2009 at 6:39 am
here's my suggestions:
1. update statistics:
2: can you show us the procedure? it might be the parameter sniffing issue(search here on SSC)
3: can you show us the execution plan? that shows...
February 22, 2009 at 5:21 am
Jeff it does still work; it depends on the commands you use; I've got an article coming out on a procedure i wrote that returns the DDL of any table;
your...
February 21, 2009 at 9:56 am
to get a procedure to run under the context of the database it is called from, doesn't it HAVE to be in the MASTER database and also at least start...
February 21, 2009 at 8:46 am
also from within SSMS:
Tools>>Options>>Text Editor
Expand "All Languages"
under the "Display" section, there is a semi-gray checkbox...uncheck and check to enforce line numbers for All languages and files.
Now line numbers appear on...
February 21, 2009 at 7:04 am
you could also use a logon trigger that checks the login against getdate() & some expiration date in a table, and use that logon trigger to prevent logging in.
February 21, 2009 at 6:31 am
both sqls in the union seem to be filtering on Application name, so If they ran alone, I would think they'd be fairly quick.
the union instead of union all could...
February 21, 2009 at 6:26 am
if you know the administrator password when you set up the machine, you can log in as that:
at the login screen which lists all the users, hit control-alt-delete twice...this will...
February 21, 2009 at 5:05 am
the sum() function does not take a comma delimited list: change all the commas to plus signs to sum all the columns and all the rows:
select SUM (e.GROSWAGS_1 +...
February 20, 2009 at 4:42 pm
ok, i copied and pasted your ocde, and found the #fraglist gets populated just fine.
the second cursor "index" never ran on my machine, because the condition below was never met:...
February 20, 2009 at 10:37 am
yeah the issue is db_id can return null:
select db_id('Bob')
i doubt you have a 'Bob' database...
your example would actually be
select * where x not in (1,2,3,NULL,NULL) --<<--NOT IN NULL RETURNS...
February 20, 2009 at 10:03 am
you want to test IF EXISTS(any rows in logger2)
not that (somequery = 0)--you weanted to count the rows or something, right?
so you'd want to tweak it to something like this:
IF...
February 20, 2009 at 9:55 am
damn...i just tried to do it, so i could script out the linked server commands, and i get "cannot create a linked server from a local server" from the gui.
anyone...
February 20, 2009 at 9:46 am
In SQl 2000, I can't think of an easy way.
in SQL 2005, you could use a synonym...for example two synonyms like
PRIMEDB and OTHERDB
and the query could refer to
...
February 20, 2009 at 9:30 am
well kind of...there is no such thing as a sequence number in SQL, but the Identity() has the equivalent for any given column...if you set the identity() on the column,...
February 19, 2009 at 1:32 pm
Viewing 15 posts - 11,536 through 11,550 (of 13,462 total)