• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

some sql help

I'm not sure what database you are using to get the syntax right, but you need table aliases in there.

offr_min=(select min(offr_prce) from BBOFFER where offr_grade=OFFR_GRADE and offr_size<>42000)

The where clause has offr_grade=OFFR_GRADE. Thats the same field, so thats the same as doing 1=1. Your problem is that the subselect is selecting from bboffer, which is also the main table in the query. Its going to be using offr_grade from the bboffer in the subselect on both sides, as thats whats in scope at that point. I'm assuming you want one of them to come from the bboffer in the main query and one in the subselect, to join on that field.
So you need to do whatever to alias the tables so you can differentiate between the field on the 2 separate tables.
if that makes sense.

offr_min=(select min(b.offr_prce) from BBOFFER B where b.offr_grade=a.OFFR_GRADE and b.offr_size<>42000)

like that, or however you alias them.
 
offr_min=(select min(b.offr_prce) from BBOFFER B where b.offr_grade=a.OFFR_GRADE and b.offr_size<>'42000')

Missing single ticks around 42000
 
Back
Top