Forum Replies Created

Viewing 15 posts - 46 through 60 (of 127 total)

  • RE: Consolidate into temp table

    Brilliant! 

    Thank you very much.

    jmatt

  • RE: INSERT ... SELECT problem

    Thank you very much.  Sometimes I miss the obvious!

    jmatt

  • RE: SELECT problem

    I also now see the light - no fuction required (but I still like them!).  Thanks all very much for the help.

    jmatt

  • RE: SELECT problem

    Thanks!  The user defined function route was just what I needed.  They really are handy things!

    jmatt

  • RE: SELECT problem

    There always will be 3 accounts per fund and NULLS are not allowed for the accounts' IDs.

    Each of these 3 accounts are for some default behavior for a particular fund...

  • RE: SELECT problem

    My mistake!  Let me complete the post ...

    Fund_ID   Fund1   Acct1_ID   Acct2_ID   Acct3_ID

    Fund_ID   Fund2   Acct4_ID   Acct5_ID   Acct6_ID

    and so on.

    Accounts looks like this:

    Acct_ID   Acct_Number1  

    Acct_ID   Acct_Number2  

    and so on.

    How would I write...

  • RE: UPDATE question

    I apologize for the delay in responding.

    Thanks to all that responded!

    Farrell, I used a variation of your suggestion ... the identity field in the temp table was the key for...

  • RE: UPDATE question

    Thanks all for your replys.

    I need to be more explicit ...

    This is a one-time update, tbl1 is imported into my SQL databse from another system and will be used to...

  • RE: money data type problems

    Thanks again Frank.  If only life were simple ... but then again we wouldn't have a job.

    OK I am going to push my luck here knowing the following is a...

  • RE: money data type problems

    Thanks a million for your help Matt and Frank!

    Matt, the {0:c} formating propoerty is exactly what I needed!

    Frank, your point is well taken.  The reasons for decimal you point make...

  • RE: Getting MAX value

    My goodness, I never thought I would have the chance to speak to the actual Master.

    Thank you for your guidance;  I need time to ponder, as it is quite deep.

    jmatt

  • RE: Conditional UPDATE statement

    Great!  Used your first suggestion and consolidated in the temp table. Things are working perfectly now.

    Thanks for your help!

    jmatt

  • RE: Conditional UPDATE statement

    I think I am half way there ...

    Here is my code

    CREATE TABLE #temp

    (

     Fiscal_Yr_Ending int,

     Fiscal_Period int,

     Trans_Amount money,

     Acct_ID int

    )

    INSERT #temp

    (

     Fiscal_Yr_Ending,

     Fiscal_Period,

     Trans_Amount,

     Acct_ID

    )

    SELECT

     t.Fiscal_Yr_Ending,

     t.Fiscal_Period,

     CASE WHEN tl.Trans_Type = 'D' THEN (tl.Trans_Amount * -1) ELSE tl.Trans_Amount...

  • RE: Conditional UPDATE statement

    That's brilliant!

    I will give it a try and psot the final code.

    Thank you!

    jmatt

  • RE: Conditional column name

    Thanks Steve!  That's exactly what I needed!

    Jonathan

Viewing 15 posts - 46 through 60 (of 127 total)