hcgNEW.jpg
back of the house
  • The Best Creative Nonfiction, Vol. 1
    The Best Creative Nonfiction, Vol. 1

search

« some days | Main | 6 ounces »
Wednesday
24Jan

null variables

Do you love me less knowing that this is what I do all day?

select case when ne_pa1 . pallets is null then 0 else ne_pa1 . pallets end, case when ne_pa1 . ship is null then 0 else ne_pa1 . ship end, case when ne_pa1 . wgt is null then 0 else ne_pa1 . wgt end, case when ne_pa1 . need is null then 0 else ne_pa1 . need end from( select trunc (( a . pa +( c . pa /( sum_pa - sum_pa_minus1 )*( input_qty - sum_pa_minus1 )))/ b . unitsperpallet , 0 ) pallets , a . pa + b . unitsperpallet *( trunc (( c . pa /( sum_pa - sum_pa_minus1 ))*( input_qty - sum_pa_minus1 )/ b . unitsperpallet )) ship , ( a . pa + trunc (( c . pa /( sum_pa - sum_pa_minus1 )*( input_qty - sum_pa_minus1 ))/ b . unitsperpallet )* b . unitsperpallet )* b . wgt wgt , c . pa -( b . unitsperpallet *( trunc (( c . pa /( sum_pa - sum_pa_minus1 ))*( input_qty - sum_pa_minus1 )/ b . unitsperpallet ))) need from ( select case when pa is null then 0 else pa end as pa from ( select sum ( qty ) pa from stsc . planarriv where item = input_item and dest = 'NE' and source = input_source and trunc ( schedshipdate ) <= trunc ( sysdate + t - 1 )) ) a , (select wgt , unitsperpallet from stsc . item where item = input_item) b ,(select case when pa is null then 0 else pa end as pa from ( select sum ( qty ) pa from stsc . planarriv where item = input_item and dest = 'NE' and source = input_source and trunc ( schedshipdate ) = trunc ( sysdate + t )) ) c ) ne_pa1 ;

I think I just threw up in my mouth a little bit.


PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments (17)

I am so hot for you right now.

Jan 24, 2007 at 04:38PM | Unregistered CommenterJoefish

luv you even more!! for cracking me up!!!

Jan 24, 2007 at 05:13PM | Unregistered CommenterRachel

What. the. fuck? LOL

... and I thought my head hurt from all that school crap being stuffed into what space was left in my brain today. Geesh.

Jan 24, 2007 at 11:47PM | Unregistered CommenterMel

Nah, it'll take more than SQL for me to dislike you.

...Though I have to say that is some hardcore SQL there...

Jan 25, 2007 at 04:49AM | Unregistered CommenterGrax

But do you do it naked?

Jan 25, 2007 at 08:36AM | Unregistered CommenterAvitable

I don't know what all of that is...would you like me less because of that?

Me<---------------not quite tech savvy!

Jan 25, 2007 at 09:33AM | Unregistered CommenterLakeside Ling

Define "love"

Jan 25, 2007 at 09:39AM | Unregistered CommenterTimmy AKA Fat Bastard

"Doe [sic] you love me less knowing that this is what I do all day?"

IFF this code supports an evil machine. :-) I surmise from the choice of SQL vars that it's for shipping/inventory/warehousing or somesuch. Given the personal commitment required to overcome the creeping boredom, respect points just went way up, Bonus points for sympathy if this code is destined to be interpreted by a Microsoft product.

No less love. If anything, more. Even though your first-word typo reminded me of Dan Quayle.

Jan 25, 2007 at 11:17AM | Unregistered CommenterBrad Eleven

Joe-You need help. ;-)
Rachel-Funny, if it weren't so sad.
Mel-I drink a lot. It helps.
Grax-Yeah, I am hardcore.
Avitable-Not usually. That would somehow be even sadder, I think.
Ling-No, it makes me love you more.
Timmy-Nah. You would only love this if you placed me here and were making fat commissions every hour I worked. But no more for you...in house HR?! I have my sources.
Brad-Typo? Hmm. I have no idea what you are talking about.

Jan 25, 2007 at 11:28AM | Registered Commenterhcg

I think it would be hotter. Especially if there was a donkey around.

Jan 25, 2007 at 01:17PM | Unregistered CommenterAvitable

You just reminded me of why I changed majors in school.

Jan 25, 2007 at 01:22PM | Unregistered CommenterRuss

Yeah, I know. But I like being me.

Jan 25, 2007 at 02:13PM | Unregistered CommenterJoefish

Wow, would love to know your sources....
It's not a secret, but didn't know we were in the same professional (and I use that term loosely) circles.

Were you called about me? Did you lie and say good things? How much do I owe you?

Jan 25, 2007 at 09:24PM | Unregistered CommenterTimmy AKA Fat Bastard

Shame about the bug in line 12.

Jan 26, 2007 at 07:52AM | Unregistered CommenterFarty

Um....

gulp...

Um... can I please be excused? I left my homewo...oh - there isn't gonna be a test. Oh - well then - never mind.

Jan 26, 2007 at 11:03AM | Unregistered Commenterjali

Farty-I will squish your bugs.

Jali-No test. Swear. You're cool.

Jan 26, 2007 at 11:41AM | Registered Commenterhcg

I am in total agreement with Russ . . . code was always my nemesis. I'm running for fear of my life. You are the coding queen.

Jan 28, 2007 at 02:10PM | Unregistered CommenterVulgar Wizard

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>