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

Welcome to IWETHEY!

New Kludgy, but without subselects I end up using TRANSFORMs
TRANSFORM status
SELECT orderstatus.ordernum
FROM orderstatus
WHERE orderstatus.ordernum = '$ordernum'
GROUP BY orderstatus.ordernum
PIVOT orderstatus.status


Then pass through the result set and test for (($no_status Is Null) AND (Not $status Is Null)). Since you are filtering by ordernum in WHERE, your result set should always be one entry, I think. Did you intend that?

Many fears are born of stupidity and ignorance -
Which you should be feeding with rumour and generalisation.
BOfH, 2002 "Episode" 10
New Oops, didn't mean to filter on ordernum
But in any case, it turns out my query was correct, and it was just taking far too long. I worked around the issue by requiring that you select a start date for an on-screen report, and warning the user that doing a printable report without a start date could take an extremely long time.

Are TRANSFORM and PIVOT available in MySQL? I'm not familiar with them.
===

Implicitly condoning stupidity since 2001.
New Oops, no they're not.
Teach me to flail out the shortcuts. Wow, no transform, no subselects...tell me again why you're using MySQL? >:)

Many fears are born of stupidity and ignorance -
Which you should be feeding with rumour and generalisation.
BOfH, 2002 "Episode" 10
New It was there when I was hired
===

Implicitly condoning stupidity since 2001.
     How would you do this? - (drewk) - (11)
         Kludgy, but without subselects I end up using TRANSFORMs - (tseliot) - (3)
             Oops, didn't mean to filter on ordernum - (drewk) - (2)
                 Oops, no they're not. - (tseliot) - (1)
                     It was there when I was hired -NT - (drewk)
         counts? - (tablizer) - (6)
             Sybase, Oracle, Postgres, MSSQL all allow temp tables. - (admin) - (5)
                 I hear they are slower than equiv run-on SQL statements -NT - (tablizer) - (4)
                     Depends on the complexity of the operation... - (ChrisR) - (3)
                         Not the only reason... - (Simon_Jester) - (1)
                             Other considerations... - (ChrisR)
                         Not much larger - (tablizer)

On bassline: Martina Nav... Navri... gosh, I wish she'd get married.
40 ms