Viewing 15 posts - 106 through 120 (of 237 total)
Do you have any control of the application? Can you give them a drop-down list? You want to limit their options as much as possible.
July 26, 2010 at 12:52 pm
FROM USERS
LEFT JOIN table1 ON USERS.user_id = table1.user_id
LEFT JOIN table2 ON table1.div_id = table2.div_id
WHERE isnull(admn_ind, 'N') = 'Y' OR isnull(SysAdminInd,'N') = 'Y'
OR (table1.user_id...
July 26, 2010 at 12:49 pm
You can create synonyms for individual database objects, but not the database itself. To do it, the database AW would have to already exist, and then a synonym would...
July 26, 2010 at 12:08 pm
You're probably going to have to do that in the query itself. Sadly, probably the easiest way is:
SELECT
CASE @month
WHEN 1 THEN [JanWages]
...
July 26, 2010 at 11:41 am
You will probably need to create a second dataset. You can use your primary dataset, but chances are the departments are repeated over and over again (and in no...
July 26, 2010 at 9:59 am
UPDATE <table>
SET <field> = myfunction(<same_field_or_other_field>)
WHERE ...
July 26, 2010 at 9:14 am
You can perform an UPDATE ... FROM. Example:
UPDATE <dest_table>
SET <dest_table_field> = <source_table_field>, ...
FROM <source_table>
WHERE ...
The FROM clause can be a full SELECT subquery.
July 26, 2010 at 9:07 am
Sorry, it should be:
=dateserial(year(now), month(now)+1, 0)
You've got a -1 after the month, when it should be +1, thus the May. I forgot that 0 is actually the last day...
July 26, 2010 at 8:52 am
dateserial() is a very cool function. I'm glad I could help.
--J
July 26, 2010 at 8:45 am
From the menu, Report > Report Parameters...
Pick each of the parameters in turn, and give them a default value. Specify the default value at the bottom of the dialog,...
July 26, 2010 at 8:32 am
You may want to consider running DBCC CheckDB more often. It really depends on how far back you keep backups. You always want to have at least one...
July 26, 2010 at 7:55 am
I'm afraid I have to disagree whole-heartedly. It doesn't take that many cycles to check a constraint. Further, those cycles don't really cost that much in the grand...
July 23, 2010 at 1:47 pm
Because users won't follow the rules unless you force them to. They may even mean well. You may train all your users really, really well, but eventually they'll...
July 23, 2010 at 11:05 am
I see a few things I might consider fixing:
Why are you using a table variable at all? Couldn't that just be a CTE or a subquery? I'm not...
July 23, 2010 at 10:42 am
Server 2003 x64 and SQL Server 2005 should be able to use all those cores just fine. I think you will benefit more from the parallel processing of multiple...
July 22, 2010 at 8:38 am
Viewing 15 posts - 106 through 120 (of 237 total)