Viewing 15 posts - 661 through 675 (of 851 total)
[font="Verdana"]Actually, if you replace DISTINCT with IN, because they are completely different parts of the query, the query will fail. However, it will fail really quickly. Hence, performance...
February 15, 2009 at 1:07 pm
[font="Verdana"]Thank goodness for the ANSI SQL join syntax! This sort of thing used to be a nightmare, involving parentheses all over the place.[/font]
February 15, 2009 at 1:04 pm
[font="Verdana"]Hmmm. I've never found a satisfactory answer to this question.
On one hand, you end up with strongly typed tables to which referential integrity can easily be established. But...
February 15, 2009 at 12:57 pm
[font="Verdana"]Here's the resultant code I get. You need to add this after your update.
insert into #zzPBC_Budget_v_Actuals(
providerCode,
...
February 15, 2009 at 12:48 pm
[font="Verdana"]It's not a bug. SQL Server has to evaluate the expression (case statement) as a whole to decide what type to give the return value. It doesn't chop...
February 15, 2009 at 12:32 pm
[font="Verdana"]Bob,
I think most of us who have had to maintain addresses have run into that issue. Here's a breakdown of what I ended up doing to address it (which...
February 15, 2009 at 12:26 pm
[font="Verdana"]Ah. The old "don't assume user input is valid".
If they are typing dates, sometimes with quotes, sometimes without, then you need to ensure that any date passed to your...
February 15, 2009 at 12:21 pm
[font="Verdana"]Have a look at the row_number() function.[/font]
February 12, 2009 at 5:30 pm
[font="Verdana"]Just a little plug for using a Calendar table. Then you can write code similar to the following:
select CalendarID, CalendarDate
from dbo.Calendar
where YearNumber =...
February 12, 2009 at 5:25 pm
jgrubb (2/12/2009)
Please stop. The differences are legion. The page in question was written from an Oracle perception of SQL 2k8, and not an informed one.
[font="Verdana"]Actually, it's...
February 12, 2009 at 5:22 pm
ehlinger (2/12/2009)
[...]
What I want to do is uses BCP with xp_cmdshell to produce multiple csv files out of...
February 12, 2009 at 5:15 pm
[font="Verdana"]You create keys as part of the table definition, not as part of an insert or select statement. Yes, it is perfectly valid to have a primary key across...
February 12, 2009 at 5:10 pm
[font="Verdana"]Ah...
One thing you may not realise is that a trigger only fires the once for a set of data. So if you insert 10 rows in one transaction, the...
February 12, 2009 at 5:08 pm
[font="Verdana"]The issue here is that as soon as the exec() finishes, the database you are in will revert. The use only applies to the scope of the exec().
Try this...
February 12, 2009 at 5:04 pm
[font="Verdana"]Is there a specific reason why you want to use bcp, and not use the export wizard from SSIS?
In SQL Server Management Studio, right-click on the database that holds your...
February 12, 2009 at 2:38 pm
Viewing 15 posts - 661 through 675 (of 851 total)