I am a beginner at SQL... I've come across a situation maybe someone can help me out.
I have a table with the following structure:
bkt_id am bkt_101 bkt_102 bkt_103 ... bkt_228
bkt_101 $100 $100 $20 $0
bkt_102 $50 $100 $20 $0
I want to compare am with the proper bkt_n value using the bkt_id field. In the data above, I want to identify that from record 1 $100 am = $100 bkt_101, and record 2 $50 am <> $20 bkt_102... and so-on.
I'm able to download the table to Excel, and perform an HLOOKUP fairly straight-forward.
Any thoughts doing it directly in SQL would be greatly appreciated!
July 24, 2009 1:31 AM