Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Where clause selecting rows not fulfilling criterion

Status
Not open for further replies.

pgk

Programmer
Jul 19, 2002
262
0
0
US
Hi,

The following is the query that I used;

select distinct rate ,eff_rcbl_tier_level from TRADE where eff_rcbl_tier_level='D' group by eff_rcbl_table_id

The result the query returned:



rate eff_rcbl_tier_level
------------------ -------------------
0.0000000 D
0.0000000 X
223.6000000 X

Please note that it is returning rows with 'X' when th e where clause specifies a 'D'.

Can someone throw some light on this?

Thanks in advance.


Hope it helps. Let me know what happens.
With regards,
PGK
 
PGK,

can you please do a sp_help on TRADE and send the output please. Also it will help what the values you put in for eff_... when you inserted records.
 
Hi,
I will have to post the sp_help o/p later since I don't have access to it right now. But I found out something: if I include the eff_rcbl_tier_level also in the GROUP BY clause it works perfectly.

So how really does it arrive at the final o/p?

Thanks in advance

Hope it helps. Let me know what happens.
With regards,
PGK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top