Forum Replies Created

Viewing 15 posts - 661 through 675 (of 851 total)

  • RE: DISTINCT and IN

    [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...

  • RE: Building a view to get summary data from multiple tables

    [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]

  • RE: DB design

    [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...

  • RE: UPDATE STATEMENT

    [font="Verdana"]Here's the resultant code I get. You need to add this after your update.

    insert into #zzPBC_Budget_v_Actuals(

    providerCode,

    ...

  • RE: A fun SQL bug

    [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...

  • RE: Design Question

    [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...

  • RE: string building

    [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...

  • RE: Two field primary key --> One field incremental

    [font="Verdana"]Have a look at the row_number() function.[/font]

  • RE: Checking for last day of the month?

    [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 =...

  • RE: Picking up Oracle development skills

    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...

  • RE: Create Multiple csv files using BCP

    ehlinger (2/12/2009)


    I have a need to, based on a query, produce multiple csv files.

    [...]

    What I want to do is uses BCP with xp_cmdshell to produce multiple csv files out of...

  • RE: Two field primary key --> One field incremental

    [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...

  • RE: Looking for a Shortcut in a Trigger

    [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...

  • RE: Combining EXEC() and a USE command

    [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...

  • RE: Create Multiple csv files using BCP

    [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...

Viewing 15 posts - 661 through 675 (of 851 total)