IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New deal_1_par_amount, deal_2_par_amount not displayed
I modified the top SELECT statement because these 2 fields are requested to be displayed:

select s.issue_id, ii.issue_name,d1.par_amount as deal_1_par_amount,d2.par_amount as deal_2_par_amount, abs(coalesce(s.d1_par, 0.0) - coalesce(s.d2_par, 0.0)) as par_difference

[...]

However, T-SQL throws the following errors:

"Msg 4104, Level 16, State 1, Line 5
The multi-part identifier "d1.par_amount" could not be bound.
Msg 4104, Level 16, State 1, Line 5
The multi-part identifier "d2.par_amount" could not be bound."

because those two fields are in the nested SELECT.





Satan (impatiently) to Newcomer: The trouble with you Chicago people is, that you think you are the best people down here; whereas you are merely the most numerous.
- - - Mark Twain, "Pudd'nhead Wilson's New Calendar" 1897
New Re: deal_1_par_amount, deal_2_par_amount not displayed
s.d1_par and s.d2_par are what you want. Note that they are already being used in the par_difference calculation.
Regards,
-scott
Welcome to Rivendell, Mr. Anderson.
     Interesting - (lincoln) - (31)
         Re: Interesting - (malraux) - (1)
             Re: Interesting - (lincoln)
         SQL snobbery - (static) - (22)
             Temp tables is my bet. - (mmoffitt) - (6)
                 Re: Temp tables is my bet. - (malraux) - (5)
                     Setting up temp tables correctly can be difficult. - (static)
                     If you guys say "table" one more time... - (pwhysall) - (3)
                         :-) -NT - (scoenye)
                         Only an uns*table* person would think of it! :) -NT - (a6l6e6x)
                         Ahh.. The Green Table, then: you're a balletomane.. -NT - (Ashton)
             Here is the easiest question I've received on SQL - (lincoln) - (14)
                 Re: Here is the easiest question I've received on SQL - (malraux) - (13)
                     deal_1_par_amount, deal_2_par_amount not displayed - (lincoln) - (1)
                         Re: deal_1_par_amount, deal_2_par_amount not displayed - (malraux)
                     FWIW I hate overly-terse table names like that - (drook) - (10)
                         Eh. - (malraux) - (9)
                             Ignorant question - (drook) - (8)
                                 I use Django's ORM these days - (malraux) - (7)
                                     The tools have definitely gotten better, then - (drook) - (3)
                                         PHP ORMs are execrable. - (malraux) - (2)
                                             Only PHP library I care about now is WordPress - (drook)
                                             This is unfortunately true. - (static)
                                     Newbie ORM question. - (mmoffitt) - (2)
                                         Depends on the ORM, naturally - (malraux) - (1)
                                             Thanks. -NT - (mmoffitt)
         Well, they didn't like my using tables - (lincoln) - (5)
             Unlucky - (pwhysall)
             Re: "more technical" - (a6l6e6x) - (3)
                 Oh, it gets even better - (lincoln) - (2)
                     I've taken coding tests for executive positions - (malraux)
                     I used to be on the other side - (crazy)

Besides, we all have spell check these days, right?
49 ms