Forum Replies Created

Viewing 15 posts - 406 through 420 (of 529 total)

  • RE: updates within the same table

    Here is a solution, but you'll have to fiddle a bit with the exact matching criteria. This query updates all values larger than 1000 with their counterparts smaller than 1000...

  • RE: Identities, Defaults, Nulls, Triggers - Oh My!

    Alternative solution (haven't tried it, but should work).

    1. Keep the NOT NULL RI Foreign Key DebitThisAccount column

    2. Put a 'INSTEAD OF' INSERT Trigger that does exactly what you want. In...

  • RE: LEFT OUTER JOIN PROBLEM

    OK, so my first edit was to use the ISNULL function. Stupid to not do it the first time round, if I'm mentioning it in the post itself

  • RE: LEFT OUTER JOIN PROBLEM

    First for a stupid, off-topic remark. You might consider replacing the CASE construct in your SELECT clause with the ISNULL function. IMHO easier to read and maintain, and achieves the...

  • RE: TCP/IP vs. Named Pipes

    Don't have a lot to say about this subject, except for the following.

    1. Named pipes requires you to have a valid NT login on the database server. Otherwise, the network...

  • RE: Instead of Delete Trigger Problem

    I did not read through all of your table definition stuff, so I might be missing something. But I don't see a WHERE clause in the delete statement inside your...

  • RE: Query Analyzer VS SP

    Is it possible that the table contents has changed since you last compiled the SP? If so (or in any case), try recompiling your SP.

    sp_recompile 'your_proc_name'

  • RE: Data Driven Query Task

    That depends on what you want to do exactly. The easiest and most transparent way of achieving this is by setting a trigger on the second table that is fired...

  • RE: Manipulating Strings in a Stored Procedure

    The only way to achieve this I know of, is using dynamic SQL.

    It would turn out something like :

    
    
    DECLARE @strSql VARCHAR(1000)
    SET @strSql = "SELECT SUM(...
  • RE: Insert Problem

    Scorpion_66,

    Glad to learn something new. That's why I visit these pages .

    Anyway, this looked like the simplest solution and I have to admit that I did not...

  • RE: Insert Problem

    There is no real fundamental reason that your insert won't work. The problem is your data (or your query ).

    Let me be more specific. The way your...

  • RE: Permission to SET NOCOUNT ON

    From BOL :

    Execute permissions default to the sysadmin fixed server role, and the db_owner and db_ddladmin fixed database roles, and the object owner.

  • RE: Splitting a column into Fname Lname

    I'm afraid I have to disagree with the post from well0549 to some extent.

    You'll never catch all possible situations using any automated algorithm, but if you could convert most of...

  • RE: Query question

    Could this do the trick?

     
    
    SELECT
    c.company
    , c.contact
    , h.historyreference
    FROM
    contacts c INNER JOIN
    (SELECT contactid
    , MAX(histordate) AS LastDate
    FROM history
    GROUP...
  • RE: Datawarehouse Design Requirement

    For the Action, check the tutorial that came with Analysis Services. Part 3 (Advanced Analysis) Create an action.

    Open a cube in the cube editor and execute 'New Action'. You will...

Viewing 15 posts - 406 through 420 (of 529 total)