Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › SQL/ASP Stack Overflow
New Posts  All Forums:Forum Nav:

SQL/ASP Stack Overflow

post #1 of 4
Thread Starter 
Anyone know why this part of my SQL query is returning a stack overflow in IE7 but not FF3?

select max(left(epa_highway,2))

Can you not use max on the left function? This is only part of the query, but it's the only part causing problems.
DankoniQuad
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q6600 G0 @ 3.4GHz (425x8) 1.392 vCore Gigabyte EP45-UD3P EVGA GTX 280 Mushkin Redline 2x2GB DDR2-1000 @ 1063MHz 5-5-5-12 
Hard DriveOptical DriveOSMonitor
2xWD6400AAKS RAID0 + Samsung F3EG 2TB + 500GB Ext. Samsung SH-S203B Vista Ultimate 64-bit Acer B233HUbmidhz 
PowerCase
Corsair TX750W Antec Nine Hundred 
  hide details  
Reply
DankoniQuad
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q6600 G0 @ 3.4GHz (425x8) 1.392 vCore Gigabyte EP45-UD3P EVGA GTX 280 Mushkin Redline 2x2GB DDR2-1000 @ 1063MHz 5-5-5-12 
Hard DriveOptical DriveOSMonitor
2xWD6400AAKS RAID0 + Samsung F3EG 2TB + 500GB Ext. Samsung SH-S203B Vista Ultimate 64-bit Acer B233HUbmidhz 
PowerCase
Corsair TX750W Antec Nine Hundred 
  hide details  
Reply
post #2 of 4
Not sure.... but to test... why not break the functions into two queries:

Code:
select max(left_epa) as max_epa
from (
   select left(epa_highway,2)
   as left_epa from [table]
) as a
The play around and maybe see what value is causing your error.
Once again...
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 [4.28GHz, HT] Asus P6T + Broadcom NetXtreme II VisionTek HD5850 [900/1200] + Galaxy GT240 2x4GB G.Skill Ripjaw X [1632 MHz] 
Hard DriveOSMonitorKeyboard
Intel X25-M 160GB + 3xRAID0 500GB 7200.12 Window 7 Pro 64 Acer H243H + Samsung 226BW XARMOR-U9BL  
PowerCaseMouseMouse Pad
Antec Truepower New 750W Li Lian PC-V2100 [10x120mm fans] Logitech G9 X-Trac Pro 
  hide details  
Reply
Once again...
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 [4.28GHz, HT] Asus P6T + Broadcom NetXtreme II VisionTek HD5850 [900/1200] + Galaxy GT240 2x4GB G.Skill Ripjaw X [1632 MHz] 
Hard DriveOSMonitorKeyboard
Intel X25-M 160GB + 3xRAID0 500GB 7200.12 Window 7 Pro 64 Acer H243H + Samsung 226BW XARMOR-U9BL  
PowerCaseMouseMouse Pad
Antec Truepower New 750W Li Lian PC-V2100 [10x120mm fans] Logitech G9 X-Trac Pro 
  hide details  
Reply
post #3 of 4
Thread Starter 
I got it. The only reason I was using max was to avoid the aggregate error from using left by itself. I didn't realize that if I use an aggregate function, I have to sort by that field. So, sorted by the field I was using Left on and everything is fine. Thx Duckie!
DankoniQuad
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q6600 G0 @ 3.4GHz (425x8) 1.392 vCore Gigabyte EP45-UD3P EVGA GTX 280 Mushkin Redline 2x2GB DDR2-1000 @ 1063MHz 5-5-5-12 
Hard DriveOptical DriveOSMonitor
2xWD6400AAKS RAID0 + Samsung F3EG 2TB + 500GB Ext. Samsung SH-S203B Vista Ultimate 64-bit Acer B233HUbmidhz 
PowerCase
Corsair TX750W Antec Nine Hundred 
  hide details  
Reply
DankoniQuad
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q6600 G0 @ 3.4GHz (425x8) 1.392 vCore Gigabyte EP45-UD3P EVGA GTX 280 Mushkin Redline 2x2GB DDR2-1000 @ 1063MHz 5-5-5-12 
Hard DriveOptical DriveOSMonitor
2xWD6400AAKS RAID0 + Samsung F3EG 2TB + 500GB Ext. Samsung SH-S203B Vista Ultimate 64-bit Acer B233HUbmidhz 
PowerCase
Corsair TX750W Antec Nine Hundred 
  hide details  
Reply
post #4 of 4
That ... sounds very bizarre. Both in terms of the solution you found (since when do sort orders have anything to do with aggregate functions?), and the fact that you saw the problem differently based on the client. Isn't this sql executing server-side (i.e. being done by ADO/ASP)?

I'm curious, now, what's the SQL in entirety?
    
CPUMotherboardGraphicsRAM
xeon X5675 6-core @ 4.1ghz (1.29v, 20x205 +ht ) rampage iii extreme msi rx470 gaming X (the $159 budget king) 3 x 2gb corsair xms3 pc12800 (9-9-9-24-1T@1600MHz) 
Hard DriveOptical DriveCoolingOS
hynix 250gb ssd (boot), 2tb deskstar (apps),1tb... plextor px-712sa - still the best optical drive... corsair h8o v2 aio W10 home 
MonitorPowerCaseAudio
asus vw266h 25.5" (1920x1200) abs sl (enermax revolution) * single 70A rail 850w silverstone rv-03 XFi Titanium 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
xeon X5675 6-core @ 4.1ghz (1.29v, 20x205 +ht ) rampage iii extreme msi rx470 gaming X (the $159 budget king) 3 x 2gb corsair xms3 pc12800 (9-9-9-24-1T@1600MHz) 
Hard DriveOptical DriveCoolingOS
hynix 250gb ssd (boot), 2tb deskstar (apps),1tb... plextor px-712sa - still the best optical drive... corsair h8o v2 aio W10 home 
MonitorPowerCaseAudio
asus vw266h 25.5" (1920x1200) abs sl (enermax revolution) * single 70A rail 850w silverstone rv-03 XFi Titanium 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › SQL/ASP Stack Overflow