Forum Replies Created

Viewing 15 posts - 14,341 through 14,355 (of 15,381 total)

  • RE: case statement question

    Yes in this case it is comparing the value from one table to another. So you get what is happening now?

  • RE: case statement question

    sqlfriends (8/1/2011)


    I see one of our query is like below:

    select Cast(Case BusCalItemID

    when BusCalItemID then 0

    else 1

    End as bit) as linked

    from dbo.businessCalendarItem.....

    The BusCalItemID field is a PK and int field.

    My...

  • RE: Query: How to summarize data by date nexus points

    Yes I would agree that would make the problem even more difficult. 😛

    I am totally unclear on the rules for the "groups". Can you provide what the desired output would...

  • RE: LEFT JOIN WITH COUNT Question

    Your query will return the count of table a for each group. BTW, you really don't need a distinct when you also have a group by. The group by will...

  • RE: Firing a Trigger after a Table Load

    Then you will have to use a trigger. There just is no way to conditionally fire a trigger based on a 3rd party application. You could your own nasty kludged...

  • RE: Query: How to summarize data by date nexus points

    In all honesty I think the biggest challenge you are facing here is poorly designed tables. How are you going to handle adding new foods? You have to add more...

  • RE: disable Enter key for postback but allow for CRLF within multiline textboxes

    This is WAY off topic for a sql forum.

    The easiest way would be to add a keypress event handler to your textbox that will run some javascript. In your script...

  • RE: Can a .bkp be deleted after it's been restored?

    There is no reason you can't delete a backup file after you have restored from it (unless you want to keep it for archive). It is not being used by...

  • RE: Assigning SEQUENCE

    Business logic:

    sequence should be first according to col1

    Banana>Blueberry>Apple>Strawberry

    then according to col2 depending on col1

    for banana col2 order = NY>LA>SF

    for Blueberry, order = LA>SF>NY

    and so on...

    How about order by col1, col2?

  • RE: Firing a Trigger after a Table Load

    I don't think there is anyway for sql to know when another application is done sending update statements. Conceptually it just doesn't work. You could have the other application call...

  • RE: Create Random Generated Primary Key

    PaulB-TheOneAndOnly (7/29/2011)


    Sean Lange (7/27/2011)


    I often tell business people (which are the ones that usually ask for this kind of silliness) that primary keys are used by the system and therefore...

  • RE: Installing SQL Server 2005

    I have to say that the correct answer is not worded in such a way as to make much sense. It says "Install fails because SQL 2005 can't be installed...

  • RE: Get results in the same order as parameter list

    Cool glad you figured out a way to solve it.

  • RE: stuck on a copy query

    See if this helps.

    declare @MakeDirVal varchar(500)

    begin

    set @MakeDirVal = LEFT(@Copy, 26)

    SET @SQLQUERY1 =

    'xp_cmdshell ''mkdir "d:\copy test\destination"' + @MakeDirVal + ''''

    EXEC (@SQLQUERY1)

    SET @SQLQUERY2 =

    'xp_cmdshell ''XCOPY /S "d:\copy test\source"'+@Copy+' "D:\copy test\destination"'+@Copy+'"\"'''

    EXEC (@SQLQUERY2)

    That should...

  • RE: stuck on a copy query

    If you want a little dynamic solution instead of hardcoding 20 characters take a look at this. I wasn't sure if you were trying to parse the file name or...

Viewing 15 posts - 14,341 through 14,355 (of 15,381 total)