Report help select statements

Hi frnds i want to write select statement as like this
Table    Table                  Key         join           
EKKO,Purchase order header, EBELN    Key for EKPO
LFA1 ,     Vendor manster ,   LIFNR ,Join with EKKO on LIFNR (One to one)
EKPO,     PO Lines          EBELN & EBELP,Join with EKKO on EBELN (One to many
EKET,     PO line schedule, EBELN & EBELP,  Join with EKPO on (EBELN & EBELP)One to many (pick first record)
EKKN     PO line accounting        EBELN & EBELP     Outer join with EKPO on EBELN & EBELP (One to many)
EKBE     PO History  EBELN & EBELP Outer join with EKPO on EBELN & EBELP (One to many
CSKS     Cost center master KOSTL     Inner join with EKKN-KOSTL (One to many - select according to validity)
<B>NOTE : THE COLUMNS ARE TABLE --- TABLE - TABLE KEY- JOIN</B>
frnds i hav tried writing first select staement can anyone hlp me in writing other statements
select aebeln abstyp absart aaedat aernam alifnr aekorg aekgrp awaers awkurs aknttp apstyp aerekz aprdat aretpo bebelp bloekz belikz bmatnr btxz01 bwerks blgort bmatkl bmenge bmeinr bbprme bbpumz bbpumn bnetpr bpeinh bnetwr into corresponding fields of table it_ekko_ekpo from ekko inner join ekpo on ekkoebeln = ekpo~ebeln where select option condtions.....
thnk u all
<b>Point are assured </B>
regards,
karan
Message was edited by:
        karan kakkad
Message was edited by:
        karan kakkad

Nice table....Erwan.         <a href="http://astore.amazon.com/cuteseller08-20?node=7"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=2"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=3"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=4"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=5"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=6"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=7"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=8"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=9"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=10"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=11"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=12"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=13"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=14"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=15"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=16"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=17"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=18"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=19"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=20"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=21"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=22"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=23"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=24"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=25"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=26"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=27"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=28"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=29"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=30"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=31"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=32"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=33"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=34"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=35"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=36"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=37"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=38"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=39"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=40"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=41"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=42"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=43"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=44"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=45"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=46"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=47"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=48"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=49"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=50"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=51"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=52"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=53"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=54"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=55"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=56"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=57"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=58"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=59"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=60"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=61"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=62"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=63"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=64"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=65"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=66"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=67"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=68"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=69"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=70"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=71"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=72"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=73"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=74"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=75"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=76"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=77"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=78"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=79"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=80"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=81"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=82"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=83"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=84"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=85"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=86"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=87"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=88"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=89"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=90"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=91"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=92"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=93"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=94"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=95"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=96"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=97"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=98"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=99"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=100"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=101"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=102"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=103"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=104"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=105"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=106"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=107"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=108"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=109"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=110"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=111"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=112"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=113"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=114"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=115"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=116"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=117"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=118"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=119"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=120"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=121"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=122"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=123"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=124"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=125"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=126"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=127"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=128"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=129"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=130"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=131"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=132"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=133"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=134"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=135"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=136"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=137"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=138"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=139"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=140"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=141"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=142"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=143"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=144"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=145"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=146"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=147"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=148"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=149"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=150"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=151"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=152"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=153"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=154"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=155"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=156"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=157"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=158"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=159"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=160"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=161"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=162"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=163"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=164"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=165"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=166"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=167"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=168"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=169"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=170"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=171"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=172"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=173"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=174"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=175"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=176"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=177"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=178"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=179"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=180"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=181"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=182"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=183"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=184"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=185"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=186"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=187"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=188"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=189"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=190"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=191"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=192"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=193"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=194"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=195"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=196"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=197"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=198"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=199"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=200"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=201"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=202"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=203"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=204"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=205"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=206"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=207"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=208"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=209"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=210"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=211"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=212"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=213"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=214"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=215"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=216"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=217"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=218"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=219"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=220"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=221"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=222"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=223"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=224"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=225"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=226"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=227"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=228"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=229"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=230"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=231"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=232"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=233"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=234"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=235"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=236"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=237"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=238"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=239"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=240"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=241"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=242"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=243"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=244"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=245"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=246"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=247"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=248"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=249"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=250"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=251"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=252"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=253"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=254"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=255"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=256"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=257"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=258"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=259"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=260"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=261"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=262"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=263"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=264"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=265"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=266"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=267"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=268"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=269"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=270"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=271"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=272"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=273"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=274"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=275"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=276"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=277"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=278"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=279"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=280"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=281"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=282"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=283"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=284"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=285"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=286"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=287"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=288"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=289"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=290"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=291"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=292"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=293"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=294"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=295"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=296"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=297"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=298"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=299"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=300"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=301"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=302"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=303"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=304"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=305"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=306"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=307"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=308"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=309"></a><a href="http://astore.amazon.com/cuteseller08-20?node=7&page=310

Similar Messages

  • What is proper syntax for using PassBack in a Report page select statement

    In my select statement I reference the passBack function using:
    onClick="javascript:passBack()"
    In my Page Header I (Typically) define the passBack function as:
    <script language="JavaScript" type="text/javascript">
    function passBack(passVal1,passVal2) {
    opener.document.getElementById("P2000_CABLE_ID").value = passVal1;
    opener.document.getElementById("P2000_CABLE_LABEL").value = passVal2;
    window.opener.location.reload(true);
    </script>
    But I have never used the passBack function from the Select statement before and cannot happen onto the proper syntax.
    The Page Items I want to pass are:
    1. :P2004_CABLE_ID
    2. :P2004_LABEL
    I want to pass them to:
    1. :P2000_CABLE_ID
    2. :P2000_CABLE_LABEL
    Can someone please help me out... Again?
    Thanks- Gary

    Let's assume column XYZ has both numbers (1), and letters (any alphabet).
    I have a case statement on SQL to turn any value that's not 1 into 0, then I am getting a sum of that column.
    I am also grouping by Row A, B etc to get aggregated sum of column XYZ for those group.
    Now on Crystal Reports function, I need to sum up values under column XYZ for all the groups.
    If I try using sum function like below, I get an error stating:
    "A number field or currency amount field is required here"
    (sum({Command.XYZ}))
    So I thought if I can use a case statement to change the non-numbers to 0 prior to sum that will probably resolve it. But I could not get the below case statement to work either (Error: A string is required). 
    SELECT {Command.XYZ}
       Case 1:
          1 
       Default:
          0;

  • Using if the else logic in regards to a select statement for a report

    Hi all,
    I've a question regarding if then else logic in Oracle.
    I'm developing a report application which contains 3 selectlists
    - ProductGroup - SubGroup - Manufacturer
    Each one containing several values. And are based on eachother, meaning if you select an item from the PG list, you only get the SG items regarding the PG item you've choosen before. The process logic should be as the following:
    When a user selects one item from for example the PG list, the query will be:
    select * from x where PG = :P_PG
    and the report displays all the items in the PG category selected
    The other two bindvariables would be null as the user didn't pick them
    If he then proceeds and selects one item from the SG list, the query would be:
    select * from x where PG = :P_PG and SG = :P_SG
    and the report displays all the items in the PG and SG category selected
    If he then proceeds and selects one item from the MA list, the query would be:
    select * from x where PG = :P_PG and SG = :P_SG and MA =:P_MA
    and the report displays all the items in the PG and SG and MA category selected
    Now, I've read some documentation about the decode function, but I can't figure it out, please help.
    Peter

    Okay, Chet, have set it up on htmldb, so you can see my problem, will go in high detail, it is not producing what I want. Example on htmldb:
    DEMO/test
    http://htmldb.oracle.com/pls/otn/f?p=33229:6
    Defenitions:
    3 LOV's, namely:
    - LOVPG - select distinct productgroep, productgroep pg from plijst
    - LOVSG - select distinct subgroep, subgroep sg from plijst where productgroep = :P6_LOVPG
    - LOVLE- select distinct leverancier, leverancier le from plijst where productgroep = :P6_LOVPG and subgroep = :P6_LOVSG
    3 Selectitems with submit, namely:
    - :P6_LOVPG
    - :P6_LOVSG
    - :P6_LOVLE
    Report region select statement:
    select * from plijst where (productgroep = :P6_LOVPG or :P6_LOVPG IS NULL) and (subgroep = :P6_LOVSG or :P6_LOVSG IS NULL) and (leverancier = :P6_LOVLE or :P6_LOVLE IS NULL)
    Branch to:
    Branche to page on submit after processing
    What it should do is:
    When you select an item from the first selectlist, productgroep, the report should show all rows containing the specified productgroep.
    When the user selects the next item in the subgroep selectlist, the report should show all rows containing the previously selected prodctgroup and the just selected subgroep.
    When the user selects the final item , the report should show all rows based on all three selected itemvalues, productgroep, subgroep, leverancier.
    The problem is that with this setup the report is only generated after the final selectlist choice of the user. But the user should see a report before that, going deeper into the structure. Hope, you see my problem?
    Sincerely,
    Pete

  • Bind Variables are not allowed in select statement

    I created a lov to one parameter field in a report using select statement.
    select distinct mtrl_group||' - '||grup_desc
    from mtrl_mast a , grup_mast b
    where financial_year||financial_month = :P_cutofff_period)
    and a.mtrl_group = b.grup_code
    this is my select statement & i got the above error.
    how can i fix bind variables in this.
    Pls help me......

    Hi,
    have a look at Metalink-Note 185951.1     
    SAMPLE - How to create a parameter LOV based on another parameter value?
    Regards
    Rainer

  • MySQL Select Statement Help Required

    I am trying to generate a report in VS 2008 (C#) using a mysql select statement but cannot get it right.
    I have groups that meet on a weekly basis on different days. I want to generate a report that shows me all the members that have not attended their group where they have missed 3 meetings in a row.
    Below is the select statement I have tried but it does not give me the results I am looking for. I have tried to look at all the meetings in a 4 week period but would prefer to look at the last 3 meetings that are recorded. Some groups might not record a meeting every week. So I want to look at the last 3 recorded meetings and count each members attendance and only report on the members with more than 3 meetings missed.
    SELECT COUNT(`groupattendance`.`Attended`) AS Attendance, `smallgroupform`.`MeetingDate`, `userinfo`.`FirstName`, `userinfo`.`Surname`, `smallgroup`.`GroupName`, `groupattendance`.`Attended`, `groupattendance`.`UserID`, `groupattendance`.`GroupID`
    FROM ((`anatomy`.`groupattendance` `groupattendance`
    INNER JOIN `anatomy`.`smallgroupform` `smallgroupform` ON `groupattendance`.`FormID` = `smallgroupform`.`FormID`)
    INNER JOIN `anatomy`.`userinfo` `userinfo` ON `groupattendance`.`UserID` = `userinfo`.`UserID`)
    INNER JOIN `anatomy`.`smallgroup` `smallgroup` ON `groupattendance`.`GroupID` = `smallgroup`.`GroupID`
    WHERE (`smallgroupform`.`MeetingDate` >= DATE_SUB(CURDATE(),INTERVAL 4 WEEK) AND `smallgroupform`.`MeetingDate` <= CURDATE()) AND `groupattendance`.`Attended` = 'False'
    GROUP BY `userinfo`.`UserID`
    HAVING Attendance >= 3
    Thanks,
    Garth.

    Hi Garth,
    Seems no one can help you directly. Try googling your SQL request. Someone may be able to help you. At this point its not really a Cr problem.
    One option is to get all the data and add filtering using the record selection formula.
    Thank you
    Don

  • Passing values to OnDemandProcess from Select Statement on Reports Page

    I think I'm just missing some of the proper syntax, Can somebody please help me.
    As I've come to understand this process of passing the values,
    I recognize it as (3) steps.
    1. Referencing the "javascript" in the Select Statement of the Reports Page.
    2. Including the "javascript" in the Page Header region.
    3. Defining the Process as an OnDemand Application Process.
    My problem is:
    a. I can't seem to get the Value passed to the Application Process.
    b. I don't know how to reference the Value passed once I get it passed.
    Here's what I've got done so far:
    1. (The Select Statement)
       onClick="javascript:ORDER_CONNECT_SEQUENCE('||ID||')
    {code}
    2. (The javascript)
    {code}
    function ORDER_CONNECT_SEQUENCE('+ID+')
    var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=ORDER_CONNECT_SEQUENCE',0);
    get.add('+ID+');
    gReturn = get.get('+ID+');
    {code}
    3. (The Application Process)
    {code}
       BEGIN
       Select '+ID+' into THIS_CIRCUIT from dual;
    {code}
    I Know that the Application Process is being referenced and that the OnClick routine is working properly,
    because if I plug a Value into the Application Process, instead of using '+ID+',
    Then I get all of my desired results.
    Any help you can give me here is greatly appreciated.
    Thanks- Gary                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Dimitri, Thanks for your efforts here, but its still not working for me.
    Here's what I understand from your suggestions:
    1. (changes to the javascipt)
       a. replace function ORDER_CONNECT_SEQUENCE('+ID+')
           with
           function ORDER_CONNECT_SEQUENCE(pId)
       b. replace get.add('+ID+')
           with
           get.addParam('x01',pId)
       c. replace getReturn = get.get('+ID+')
          with
          getReturn = get.get()
          get = null2. (chages to the Application Process)
       a. add l_value varchar2(4000) to my list of declarations
       b. add l_value := wwv_flow.g_x01 below the begin statement
       c. I guess then I would reference the l_value like this:
           Select l_value into THIS_CIRCUIT from dual* Also, You didn't mention any changes in my Select statement in the Reports region of the page.
    FYI.
      onClick="javascript:ORDER_CONNECT_SEQUENCE('||ID||')
    {code}
      The 'ID' which I'm referencing here is an ID from the table which I'm querying.
    Am I misunderstanding you somewhere?
    Thanks- gary                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Help!  Crashing JVM while doing SELECT statement through JDBC-ODBC bridge

    Hi everyone,
    Help please. I am working on a project on my own computer using the jdk version 1.5.0_04.
    The project involves running a select on a Microsoft Access 2003 database via the JDBC-ODBC bridge. The database is registered in the ODBC database sources, and it works fine in those other projects.
    Yet, when I'm running similar code in this project, it crashes the Java Virtual Machine. I get the following in a log file:
    # An unexpected error has been detected by HotSpot Virtual Machine:
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7c901010, pid=2308, tid=1364
    # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing)
    # Problematic frame:
    # C [ntdll.dll+0x1010]
    --------------- T H R E A D ---------------
    Current thread (0x000360f8): JavaThread "main" [_thread_in_native, id=1364]
    siginfo: ExceptionCode=0xc0000005, reading address 0x00000018
    Registers:
    EAX=0x00000004, EBX=0x26bb5250, ECX=0x7ffde000, EDX=0x00000004
    ESP=0x0007f8d8, EBP=0x0007f8f0, ESI=0x00000000, EDI=0x02ea1590
    EIP=0x7c901010, EFLAGS=0x00010246
    Top of Stack: (sp=0x0007f8d8)
    0x0007f8d8: 74355a16 00000004 02ea15b4 7432139f
    0x0007f8e8: 02ea15b4 02ea1590 0007f900 74322c5d
    0x0007f8f8: 02ea15b4 000361b4 0007f914 74325fa0
    0x0007f908: 02ea1590 74350000 00390000 0007f930
    0x0007f918: 7432740e 02ea1590 0007f950 00000003
    0x0007f928: 00aabe20 000361b4 0007f948 6d3e11da
    0x0007f938: 02ea1590 0007f950 000360f8 26bb5250
    0x0007f948: 0007f980 00ad826f 00000000 0007f99c
    Instructions: (pc=0x7c901010)
    0x7c901000: 90 90 90 90 90 64 8b 0d 18 00 00 00 8b 54 24 04
    0x7c901010: 83 7a 14 00 75 4f f0 ff 42 04 75 19 8b 41 24 89
    Stack: [0x00040000,0x00080000), sp=0x0007f8d8, free space=254k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    C [ntdll.dll+0x1010]
    C [ODBC32.dll+0x2c5d]
    C [ODBC32.dll+0x5fa0]
    C [ODBC32.dll+0x740e]
    C [JdbcOdbc.dll+0x11da]
    j sun.jdbc.odbc.JdbcOdbc.allocStmt(J[B)J+0
    j sun.jdbc.odbc.JdbcOdbc.SQLAllocStmt(J)J+47
    j sun.jdbc.odbc.JdbcOdbcConnection.createStatement(II)Ljava/sql/Statement;+27
    j sun.jdbc.odbc.JdbcOdbcConnection.createStatement()Ljava/sql/Statement;+7
    j LUDatabaseWorker.getBoxScoreFromDB(LStatisticalItems/BoxScore;)LStatisticalItems/BoxScore;+215
    j NewUSCHOLiveUpdate.processTheBoxScores()V+78
    j NewUSCHOLiveUpdate.main([Ljava/lang/String;)V+9
    v ~StubRoutines::call_stub
    V [jvm.dll+0x82696]
    V [jvm.dll+0xd6fd9]
    V [jvm.dll+0x82567]
    V [jvm.dll+0x895e6]
    C [java.exe+0x14c0]
    C [java.exe+0x64cd]
    C [kernel32.dll+0x16d4f]
    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    j sun.jdbc.odbc.JdbcOdbc.allocStmt(J[B)J+0
    j sun.jdbc.odbc.JdbcOdbc.SQLAllocStmt(J)J+47
    j sun.jdbc.odbc.JdbcOdbcConnection.createStatement(II)Ljava/sql/Statement;+27
    j sun.jdbc.odbc.JdbcOdbcConnection.createStatement()Ljava/sql/Statement;+7
    j LUDatabaseWorker.getBoxScoreFromDB(LStatisticalItems/BoxScore;)LStatisticalItems/BoxScore;+215
    j NewUSCHOLiveUpdate.processTheBoxScores()V+78
    j NewUSCHOLiveUpdate.main([Ljava/lang/String;)V+9
    v ~StubRoutines::call_stub
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    0x00a6e550 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=2240]
    0x00a6d258 JavaThread "CompilerThread0" daemon [_thread_blocked, id=736]
    0x00a6c440 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=2252]
    0x00a47808 JavaThread "Finalizer" daemon [_thread_blocked, id=3352]
    0x00a46328 JavaThread "Reference Handler" daemon [_thread_blocked, id=1560]
    =>0x000360f8 JavaThread "main" [_thread_in_native, id=1364]
    Other Threads:
    0x00a67a68 VMThread [id=2700]
    0x00a6f8c8 WatcherThread [id=2480]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    def new generation total 576K, used 404K [0x22b90000, 0x22c30000, 0x23070000)
    eden space 512K, 70% used [0x22b90000, 0x22bea738, 0x22c10000)
    from space 64K, 66% used [0x22c20000, 0x22c2a990, 0x22c30000)
    to space 64K, 0% used [0x22c10000, 0x22c10000, 0x22c20000)
    tenured generation total 1408K, used 846K [0x23070000, 0x231d0000, 0x26b90000)
    the space 1408K, 60% used [0x23070000, 0x231438e0, 0x23143a00, 0x231d0000)
    compacting perm gen total 8192K, used 507K [0x26b90000, 0x27390000, 0x2ab90000)
    the space 8192K, 6% used [0x26b90000, 0x26c0ed38, 0x26c0ee00, 0x27390000)
    ro space 8192K, 66% used [0x2ab90000, 0x2b0e9dc0, 0x2b0e9e00, 0x2b390000)
    rw space 12288K, 46% used [0x2b390000, 0x2b927e98, 0x2b928000, 0x2bf90000)
    Dynamic libraries:
    0x00400000 - 0x0040c000      C:\jdk1.5.0_04\bin\java.exe
    0x7c900000 - 0x7c9b0000      C:\WINDOWS\system32\ntdll.dll
    0x7c800000 - 0x7c8f4000      C:\WINDOWS\system32\kernel32.dll
    0x77dd0000 - 0x77e6b000      C:\WINDOWS\system32\ADVAPI32.dll
    0x77e70000 - 0x77f01000      C:\WINDOWS\system32\RPCRT4.dll
    0x77c10000 - 0x77c68000      C:\WINDOWS\system32\MSVCRT.dll
    0x6d6b0000 - 0x6d839000      C:\jdk1.5.0_04\jre\bin\client\jvm.dll
    0x77d40000 - 0x77dd0000      C:\WINDOWS\system32\USER32.dll
    0x77f10000 - 0x77f56000      C:\WINDOWS\system32\GDI32.dll
    0x76b40000 - 0x76b6d000      C:\WINDOWS\system32\WINMM.dll
    0x629c0000 - 0x629c9000      C:\WINDOWS\system32\LPK.DLL
    0x74d90000 - 0x74dfb000      C:\WINDOWS\system32\USP10.dll
    0x6d2f0000 - 0x6d2f8000      C:\jdk1.5.0_04\jre\bin\hpi.dll
    0x76bf0000 - 0x76bfb000      C:\WINDOWS\system32\PSAPI.DLL
    0x6d680000 - 0x6d68c000      C:\jdk1.5.0_04\jre\bin\verify.dll
    0x6d370000 - 0x6d38d000      C:\jdk1.5.0_04\jre\bin\java.dll
    0x6d6a0000 - 0x6d6af000      C:\jdk1.5.0_04\jre\bin\zip.dll
    0x6d3e0000 - 0x6d3ed000      C:\jdk1.5.0_04\jre\bin\JdbcOdbc.dll
    0x74320000 - 0x7435d000      C:\WINDOWS\system32\ODBC32.dll
    0x5d090000 - 0x5d127000      C:\WINDOWS\system32\COMCTL32.dll
    0x7c9c0000 - 0x7d1d5000      C:\WINDOWS\system32\SHELL32.dll
    0x77f60000 - 0x77fd6000      C:\WINDOWS\system32\SHLWAPI.dll
    0x763b0000 - 0x763f9000      C:\WINDOWS\system32\comdlg32.dll
    0x773d0000 - 0x774d2000      C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll
    0x20000000 - 0x20017000      C:\WINDOWS\system32\odbcint.dll
    0x774e0000 - 0x7761d000      C:\WINDOWS\system32\ole32.dll
    0x77120000 - 0x771ac000      C:\WINDOWS\system32\OLEAUT32.dll
    0x77fe0000 - 0x77ff1000      C:\WINDOWS\system32\Secur32.dll
    0x76fd0000 - 0x7704f000      C:\WINDOWS\system32\CLBCATQ.DLL
    0x77050000 - 0x77115000      C:\WINDOWS\system32\COMRes.dll
    0x77c00000 - 0x77c08000      C:\WINDOWS\system32\VERSION.dll
    0x0f9a0000 - 0x0f9ab000      C:\WINDOWS\system32\VBAJET32.DLL
    0x5ad70000 - 0x5ada8000      C:\WINDOWS\system32\uxtheme.dll
    VM Arguments:
    java_command: NewUSCHOLiveUpdate
    Environment Variables:
    JAVA_HOME=C:\jdk1.5.0_04
    CLASSPATH=C:\jdk1.5.0_04\bin\NewLiveUpdate;C:\jdk1.5.0_04\bin\NewLiveUpdate\StatisticalItems;C:\jdk1.5.0_04\bin\NewLiveUpdate\Exceptions;C:\jdk1.5.0_04\bin\NewLiveUpdate\Helper;
    PATH=C:\jdk1.5.0_04\bin;C:\JavaTools\ant\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\WBEM;;c:\program files\devstudio\sharedide\bin\ide;c:\program files\devstudio\sharedide\bin;c:\program files\devstudio\vc\bin
    USERNAME=Kevin Yetman
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 3, GenuineIntel
    --------------- S Y S T E M ---------------
    OS: Windows XP Build 2600 Service Pack 2
    CPU:total 2 family 15, cmov, cx8, fxsr, mmx, sse, sse2, ht
    Memory: 4k page, physical 1047020k(627436k free), swap 2518436k(2161900k free)
    vm_info: Java HotSpot(TM) Client VM (1.5.0_04-b05) for windows-x86, built on Jun 3 2005 02:10:41 by "java_re" with MS VC++ 6.0
    The code that is causing the problem is in the class shown below. It is in the method getBoxScoreFromDB. When it attempts to run the first select statement, it causes the crash that I showed above.
    The connection is set up by the calling class. The calling class constructs a LUDatabaseWorker, sets the necessary parameters (dbURL, driver class, username and password), and calls the openDBConnection().
    // LUDatabaseWorker.java
    import StatisticalItems.*;
    import java.sql.*;
    import java.util.*;
    public class LUDatabaseWorker
       private StatisticalItems.BoxScore m_CurrentBoxScoreInDB;
       private Connection                m_Connection;
       private String                    m_dbURL;
       private String                    m_dbUsername;
       private String                    m_dbPassword;
       private String                    m_dbDriverClass;
       public LUDatabaseWorker()
       public StatisticalItems.BoxScore getCurrentBoxScoreInDB()
       {  return m_CurrentBoxScoreInDB;
       public void setDBURL(String dbURL)
       {  m_dbURL=new String(dbURL);
       public void setDBUsername(String dbUsername)
       {  m_dbUsername=new String(dbUsername);
       public void setDBPassword(String dbPassword)
       {  m_dbPassword=new String(dbPassword);
       public void setDBDriverClass(String dbDriverClass)
       {  m_dbDriverClass=new String(dbDriverClass);
       public void openDBConnection()
          throws SQLException, ClassNotFoundException
          Class.forName(m_dbDriverClass);
          m_Connection=DriverManager.getConnection(m_dbURL, m_dbUsername, m_dbPassword);
       public void closeDBConnection()
          throws SQLException
          m_Connection.close();
       public Hashtable<String, Integer> getUSCHOCodeToMyTeamIndexMap()
          throws SQLException
          Hashtable<String, Integer> ht=new Hashtable<String, Integer>();
          String sqlQuery="SELECT TeamIndex, TeamCode FROM TeamLiveUpdateUSCHO";
          Statement st=m_Connection.createStatement();
          ResultSet rs=st.executeQuery(sqlQuery);
          while(rs.next())
             String uschoCode=new String(rs.getString(2));
             Integer myTeamIndex=new Integer(rs.getInt(1));
             ht.put(uschoCode, myTeamIndex);
          rs.close();
          st.close();
          return ht;
       public StatisticalItems.BoxScore getBoxScoreFromDB(StatisticalItems.BoxScore luBoxScore)
          throws SQLException
          StatisticalItems.BoxScore  boxScoreFromDB=new StatisticalItems.BoxScore();
          // get the basic game info from the live update box score.
          StatisticalItems.Game    luBasicGameData=luBoxScore.getBasicGameData();
          // get the basic game data.
          String sqlQuery="SELECT * FROM Game WHERE (Year=" + luBasicGameData.getYear() + ") AND (Month='";
          if( luBasicGameData.getMonth() < 10 )
          {  sqlQuery+="0";
          sqlQuery+=luBasicGameData.getMonth() + "') AND (Day='";
          if( luBasicGameData.getDay() < 10 )
          {  sqlQuery+="0";
          sqlQuery+=luBasicGameData.getDay() + "') AND (HomeTeamIndex=" + luBasicGameData.getHomeTeamIndex();
          sqlQuery+=") AND (VisitorTeamIndex=" + luBasicGameData.getVisitorTeamIndex() + ")";
          System.out.println(sqlQuery);
          Statement st=m_Connection.createStatement();
          ResultSet rs=st.executeQuery(sqlQuery);
          if( rs.next() )
             StatisticalItems.Game  dbGame=boxScoreFromDB.getBasicGameData();
             dbGame.setGameIndex(rs.getInt("GameIndex"));
             dbGame.setHomeTeamIndex(rs.getInt("HomeTeamIndex"));
             dbGame.setVisitorTeamIndex(rs.getInt("VisitorTeamIndex"));
             dbGame.setHomeTeamGoals(rs.getInt("HomeTeamGoals"));
             dbGame.setVisitorTeamGoals(rs.getInt("VisitorTeamGoals"));
             dbGame.setHomeTeamScoredFirst(rs.getString("HomeTeamScoredFirst"));
             dbGame.setYear(rs.getInt("Year"));
             dbGame.setMonth(rs.getInt("Month"));
             dbGame.setDay(rs.getInt("Day"));
             dbGame.setLeagueGame(rs.getBoolean("LeagueGame"));
             dbGame.setNeutralSiteGame(rs.getBoolean("NeutralSiteGame"));
             dbGame.setForfeitHome(rs.getBoolean("ForfeitHome"));
             dbGame.setForfeitVisitor(rs.getBoolean("ForfeitVisitor"));
             dbGame.setPlayoffGame(rs.getBoolean("PlayoffGame"));
             boxScoreFromDB.setBasicGameData(dbGame);
          StatisticalItems.Game  dbGame=boxScoreFromDB.getBasicGameData();
          // get the home team goals per period.
          sqlQuery="SELECT * FROM GameDetailGoalsPerPeriod WHERE (GameIndex=" + dbGame.getGameIndex() + ") AND ";
          sqlQuery+="(TeamIndex=" + dbGame.getHomeTeamIndex() + ")";
          rs=st.executeQuery(sqlQuery);
          if( rs.next() )
             StatisticalItems.GameDetailGoalsPerPeriod dbHomeGPP=boxScoreFromDB.getHomeTeamGoalsPerPeriod();
             dbHomeGPP.setGameDetailGoalsPerPeriodIndex(rs.getInt("GameDetailGoalsPerPeriodIndex"));
             dbHomeGPP.setGameIndex(rs.getInt("GameIndex"));
             dbHomeGPP.setTeamIndex(rs.getInt("TeamIndex"));
             dbHomeGPP.setPeriod1(new Integer(rs.getInt("GoalsFirstPeriod")));
             dbHomeGPP.setPeriod2(new Integer(rs.getInt("GoalsSecondPeriod")));
             dbHomeGPP.setPeriod3(new Integer(rs.getInt("GoalsThidPeriod")));
             dbHomeGPP.setOvertime(new Integer(rs.getInt("GoalsOvertime")));
             dbHomeGPP.setEmptyNetGoals(rs.getInt("EmptyNetGoals"));
             dbHomeGPP.setFoundInDatabase(true);
             boxScoreFromDB.setHomeTeamGoalsPerPeriod(dbHomeGPP);
          // get the visitor team goals per period. 
          sqlQuery="SELECT * FROM GameDetailGoalsPerPeriod WHERE (GameIndex=" + dbGame.getGameIndex() + ") AND ";
          sqlQuery+="(TeamIndex=" + dbGame.getVisitorTeamIndex() + ")";
          rs=st.executeQuery(sqlQuery);
          if( rs.next() )
             StatisticalItems.GameDetailGoalsPerPeriod dbVisitorGPP=boxScoreFromDB.getVisitorTeamGoalsPerPeriod();
             dbVisitorGPP.setGameDetailGoalsPerPeriodIndex(rs.getInt("GameDetailGoalsPerPeriodIndex"));
             dbVisitorGPP.setGameIndex(rs.getInt("GameIndex"));
             dbVisitorGPP.setTeamIndex(rs.getInt("TeamIndex"));
             dbVisitorGPP.setPeriod1(new Integer(rs.getInt("GoalsFirstPeriod")));
             dbVisitorGPP.setPeriod2(new Integer(rs.getInt("GoalsSecondPeriod")));
             dbVisitorGPP.setPeriod3(new Integer(rs.getInt("GoalsThidPeriod")));
             dbVisitorGPP.setOvertime(new Integer(rs.getInt("GoalsOvertime")));
             dbVisitorGPP.setEmptyNetGoals(rs.getInt("EmptyNetGoals"));
             dbVisitorGPP.setFoundInDatabase(true);
             boxScoreFromDB.setVisitorTeamGoalsPerPeriod(dbVisitorGPP);
          // get the home team shots per period.
          sqlQuery="SELECT * FROM GameDetailShotsPerPeriod WHERE (GameIndex=" + dbGame.getGameIndex() + ") AND ";
          sqlQuery+="(TeamIndex=" + dbGame.getHomeTeamIndex() + ")";
          rs=st.executeQuery(sqlQuery);
          if( rs.next() )
             StatisticalItems.GameDetailShotsPerPeriod dbHomeSPP=boxScoreFromDB.getHomeTeamShotsPerPeriod();
             dbHomeSPP.setGameDetailShotsPerPeriodIndex(rs.getInt("GameDetailShotsPerPeriodIndex"));
             dbHomeSPP.setGameIndex(rs.getInt("GameIndex"));
             dbHomeSPP.setTeamIndex(rs.getInt("TeamIndex"));
             dbHomeSPP.setPeriod1(new Integer(rs.getInt("ShotsFirstPeriod")));
             dbHomeSPP.setPeriod2(new Integer(rs.getInt("ShotsSecondPeriod")));
             dbHomeSPP.setPeriod3(new Integer(rs.getInt("ShotsThidPeriod")));
             dbHomeSPP.setOvertime(new Integer(rs.getInt("ShotsOvertime")));
             dbHomeSPP.setFoundInDatabase(true);
             boxScoreFromDB.setHomeTeamShotsPerPeriod(dbHomeSPP);
          // get the visitor team shots per period. 
          sqlQuery="SELECT * FROM GameDetailShotsPerPeriod WHERE (GameIndex=" + dbGame.getGameIndex() + ") AND ";
          sqlQuery+="(TeamIndex=" + dbGame.getVisitorTeamIndex() + ")";
          rs=st.executeQuery(sqlQuery);
          if( rs.next() )
             StatisticalItems.GameDetailShotsPerPeriod dbVisitorSPP=boxScoreFromDB.getVisitorTeamShotsPerPeriod();
             dbVisitorSPP.setGameDetailShotsPerPeriodIndex(rs.getInt("GameDetailShotsPerPeriodIndex"));
             dbVisitorSPP.setGameIndex(rs.getInt("GameIndex"));
             dbVisitorSPP.setTeamIndex(rs.getInt("TeamIndex"));
             dbVisitorSPP.setPeriod1(new Integer(rs.getInt("ShotsFirstPeriod")));
             dbVisitorSPP.setPeriod2(new Integer(rs.getInt("ShotsSecondPeriod")));
             dbVisitorSPP.setPeriod3(new Integer(rs.getInt("ShotsThidPeriod")));
             dbVisitorSPP.setOvertime(new Integer(rs.getInt("ShotsOvertime")));
             dbVisitorSPP.setFoundInDatabase(true);
             boxScoreFromDB.setVisitorTeamShotsPerPeriod(dbVisitorSPP);
          // get the home team special teams.
          sqlQuery="SELECT * FROM GameDetailSpecialTeams WHERE (GameIndex=" + dbGame.getGameIndex() + ") AND ";
          sqlQuery+="(TeamIndex=" + dbGame.getHomeTeamIndex() + ")";
          rs=st.executeQuery(sqlQuery);
          if( rs.next() )
             StatisticalItems.GameDetailSpecialTeams dbHomeST=boxScoreFromDB.getHomeTeamSpecialTeams();
             dbHomeST.setGameDetailSpecialTeamsIndex(rs.getInt("GameDetailSpecialTeamsIndex"));
             dbHomeST.setGameIndex(rs.getInt("GameIndex"));
             dbHomeST.setTeamIndex(rs.getInt("TeamIndex"));
             dbHomeST.setPowerplayGoals(rs.getInt("PowerPlayGoals"));
             dbHomeST.setShorthandedGoals(rs.getInt("ShortHandedGoals"));
             dbHomeST.setPowerplayOps(rs.getInt("PowerPlayOps"));
             dbHomeST.setShorthandedOps(rs.getInt("ShortHandedOps"));
             dbHomeST.setPenalties(rs.getInt("Penalties"));
             dbHomeST.setPenaltyMinutes(rs.getInt("PenaltyMinutes"));
             dbHomeST.setFoundInDatabase(true);
             boxScoreFromDB.setHomeTeamSpecialTeams(dbHomeST);
          // get the home team special teams.
          sqlQuery="SELECT * FROM GameDetailSpecialTeams WHERE (GameIndex=" + dbGame.getGameIndex() + ") AND ";
          sqlQuery+="(TeamIndex=" + dbGame.getVisitorTeamIndex() + ")";
          rs=st.executeQuery(sqlQuery);
          if( rs.next() )
             StatisticalItems.GameDetailSpecialTeams dbVisitorST=boxScoreFromDB.getVisitorTeamSpecialTeams();
             dbVisitorST.setGameDetailSpecialTeamsIndex(rs.getInt("GameDetailSpecialTeamsIndex"));
             dbVisitorST.setGameIndex(rs.getInt("GameIndex"));
             dbVisitorST.setTeamIndex(rs.getInt("TeamIndex"));
             dbVisitorST.setPowerplayGoals(rs.getInt("PowerPlayGoals"));
             dbVisitorST.setShorthandedGoals(rs.getInt("ShortHandedGoals"));
             dbVisitorST.setPowerplayOps(rs.getInt("PowerPlayOps"));
             dbVisitorST.setShorthandedOps(rs.getInt("ShortHandedOps"));
             dbVisitorST.setPenalties(rs.getInt("Penalties"));
             dbVisitorST.setPenaltyMinutes(rs.getInt("PenaltyMinutes"));
             dbVisitorST.setFoundInDatabase(true);
             boxScoreFromDB.setVisitorTeamSpecialTeams(dbVisitorST);
          rs.close();
          st.close();
          return boxScoreFromDB;    
       public void updateBoxScoreInDB(StatisticalItems.BoxScore  dbBoxScore,
                                      StatisticalItems.BoxScore  luBoxScore,
                                      LUBoxScoreComparator       bsc)
          throws SQLException
          if( bsc.getGameChanged() )
             updateGameInDB(dbBoxScore, luBoxScore);
          if( bsc.getHomeGoalsPerPeriodChanged() )
             updateHomeGoalsPerPeriod(dbBoxScore, luBoxScore);
          if( bsc.getVisitorGoalsPerPeriodChanged() )
             updateVisitorGoalsPerPeriod(dbBoxScore, luBoxScore);
          if( bsc.getHomeShotsPerPeriodChanged() )
             updateHomeShotsPerPeriod(dbBoxScore, luBoxScore);
          if( bsc.getVisitorShotsPerPeriodChanged() )
             updateVisitorShotsPerPeriod(dbBoxScore, luBoxScore);
          if( bsc.getHomeSpecialTeamsChanged() )
             updateHomeSpecialTeams(dbBoxScore, luBoxScore);
          if( bsc.getVisitorSpecialTeamsChanged() )
             updateVisitorSpecialTeams(dbBoxScore, luBoxScore);
       protected void updateGameInDB(StatisticalItems.BoxScore dbBoxScore,
                                     StatisticalItems.BoxScore luBoxScore)
          throws SQLException
          // the only fields that NEED to be updated are HomeTeamGoals, VisitorTeamGoals, HomeTeamScoredFirst,
          // and LeagueGame.  You can't determine from the LU box Score:
          // Forfeits, NeutralSite, or Playoff.
          // the GameIndex, Both team indexes, and the game date will NEVER change from the database.
          Statement st=m_Connection.createStatement();
          String sqlStmt="UPDATE Game SET ";
          sqlStmt+="HomeTeamGoals=" + luBoxScore.getBasicGameData().getHomeTeamGoals() + ", ";
          sqlStmt+="VisitorTeamGoals=" + luBoxScore.getBasicGameData().getVisitorTeamGoals() + ", ";
          sqlStmt+="HomeTeamScoredFirst='" + luBoxScore.getBasicGameData().getHomeTeamScoredFirst() + "', ";
          sqlStmt+="LeagueGame=" + luBoxScore.getBasicGameData().getLeagueGame() + " ";
          sqlStmt+="WHERE GameIndex=" + dbBoxScore.getBasicGameData().getGameIndex();
          st.executeUpdate(sqlStmt);
          st.close();
       protected void updateHomeGoalsPerPeriod(StatisticalItems.BoxScore dbBoxScore,
                                               StatisticalItems.BoxScore luBoxScore)
          throws SQLException
          Statement st=m_Connection.createStatement();
          String sqlStmt="";
          if( dbBoxScore.getHomeTeamGoalsPerPeriod().getFoundInDatabase() )
             sqlStmt="UPDATE GameDetailGoalsPerPeriod SET ";
             sqlStmt+="GameIndex=" + dbBoxScore.getHomeTeamGoalsPerPeriod().getGameIndex() + ", ";
             sqlStmt+="TeamIndex=" + luBoxScore.getHomeTeamGoalsPerPeriod().getTeamIndex() + ", ";
             sqlStmt+="GoalsFirstPeriod=" + luBoxScore.getHomeTeamGoalsPerPeriod().getPeriod1() + ", ";
             sqlStmt+="GoalsSecondPeriod=" + luBoxScore.getHomeTeamGoalsPerPeriod().getPeriod2() + ", ";
             sqlStmt+="GoalsThirdPeriod=" + luBoxScore.getHomeTeamGoalsPerPeriod().getPeriod3() + ", ";
             sqlStmt+="GoalsOvertime=" + luBoxScore.getHomeTeamGoalsPerPeriod().getOvertime() + ", ";
             sqlStmt+="EmptyNetGoals=" + luBoxScore.getHomeTeamGoalsPerPeriod().getEmptyNetGoals() + " ";
             sqlStmt+="WHERE GameIndex=" + dbBoxScore.getHomeTeamGoalsPerPeriod().getGameIndex() + " AND ";
             sqlStmt+="TeamIndex=" + luBoxScore.getHomeTeamGoalsPerPeriod().getTeamIndex();
          else
             sqlStmt="INSERT INTO GameDetailGoalsPerPeriod ";
             sqlStmt+="(GameIndex, TeamIndex, GoalsFirstPeriod, GoalsSecondPeriod, GoalsThirdPeriod, ";
             sqlStmt+="GoalsOvertime, EmptyNetGoals) VALUES(";
             sqlStmt+=dbBoxScore.getBasicGameData().getGameIndex() + ", ";
             sqlStmt+=luBoxScore.getHomeTeamGoalsPerPeriod().getTeamIndex() + ", ";
             sqlStmt+=luBoxScore.getHomeTeamGoalsPerPeriod().getPeriod1() + ", ";
             sqlStmt+=luBoxScore.getHomeTeamGoalsPerPeriod().getPeriod2() + ", ";
             sqlStmt+=luBoxScore.getHomeTeamGoalsPerPeriod().getPeriod3() + ", ";
             sqlStmt+=luBoxScore.getHomeTeamGoalsPerPeriod().getOvertime() + ", ";
             sqlStmt+=luBoxScore.getHomeTeamGoalsPerPeriod().getEmptyNetGoals() + ")";
          st.executeUpdate(sqlStmt);
          st.close();
       protected void updateVisitorGoalsPerPeriod(StatisticalItems.BoxScore dbBoxScore,
                                                  StatisticalItems.BoxScore luBoxScore)
          throws SQLException
          Statement st=m_Connection.createStatement();
          String sqlStmt="";
          if( dbBoxScore.getVisitorTeamGoalsPerPeriod().getFoundInDatabase() )
             sqlStmt="UPDATE GameDetailGoalsPerPeriod SET ";
             sqlStmt+="GameIndex=" + dbBoxScore.getVisitorTeamGoalsPerPeriod().getGameIndex() + ", ";
             sqlStmt+="TeamIndex=" + luBoxScore.getVisitorTeamGoalsPerPeriod().getTeamIndex() + ", ";
             sqlStmt+="GoalsFirstPeriod=" + luBoxScore.getVisitorTeamGoalsPerPeriod().getPeriod1() + ", ";
             sqlStmt+="GoalsSecondPeriod=" + luBoxScore.getVisitorTeamGoalsPerPeriod().getPeriod2() + ", ";
             sqlStmt+="GoalsThirdPeriod=" + luBoxScore.getVisitorTeamGoalsPerPeriod().getPeriod3() + ", ";
             sqlStmt+="GoalsOvertime=" + luBoxScore.getVisitorTeamGoalsPerPeriod().getOvertime() + ", ";
             sqlStmt+="EmptyNetGoals=" + luBoxScore.getVisitorTeamGoalsPerPeriod().getEmptyNetGoals() + " ";
             sqlStmt+="WHERE GameIndex=" + dbBoxScore.getVisitorTeamGoalsPerPeriod().getGameIndex() + " AND ";
             sqlStmt+="TeamIndex=" + luBoxScore.getVisitorTeamGoalsPerPeriod().getTeamIndex();
          else
             sqlStmt="INSERT INTO GameDetailGoalsPerPeriod ";
             sqlStmt+="(GameIndex, TeamIndex, GoalsFirstPeriod, GoalsSecondPeriod, GoalsThirdPeriod, ";
             sqlStmt+="GoalsOvertime, EmptyNetGoals) VALUES(";
             sqlStmt+=dbBoxScore.getBasicGameData().getGameIndex() + ", ";
             sqlStmt+=luBoxScore.getVisitorTeamGoalsPerPeriod().getTeamIndex() + ", ";
             sqlStmt+=luBoxScore.getVisitorTeamGoalsPerPeriod().getPeriod1() + ", ";
             sqlStmt+=luBoxScore.getVisitorTeamGoalsPerPeriod().getPeriod2() + ", ";
             sqlStmt+=luBoxScore.getVisitorTeamGoalsPerPeriod().getPeriod3() + ", ";
             sqlStmt+=luBoxScore.getVisitorTeamGoalsPerPeriod().getOvertime() + ", ";
             sqlStmt+=luBoxScore.getVisitorTeamGoalsPerPeriod().getEmptyNetGoals() + ")";
          st.executeUpdate(sqlStmt);
          st.close();
       protected void updateHomeShotsPerPeriod(StatisticalItems.BoxScore dbBoxScore,
                                               StatisticalItems.BoxScore luBoxScore)
          throws SQLException
          Statement st=m_Connection.createStatement();
          String sqlStmt="";
          if( dbBoxScore.getHomeTeamShotsPerPeriod().getFoundInDatabase() )
             sqlStmt="UPDATE GameDetailShotsPerPeriod SET ";
             sqlStmt+="GameIndex=" + dbBoxScore.getHomeTeamShotsPerPeriod().getGameIndex() + ", ";
             sqlStmt+="TeamIndex=" + luBoxScore.getHomeTeamShotsPerPeriod().getTeamIndex() + ", ";
             sqlStmt+="ShotsFirstPeriod=" + luBoxScore.getHomeTeamShotsPerPeriod().getPeriod1() + ", ";
             sqlStmt+="ShotsSecondPeriod=" + luBoxScore.getHomeTeamShotsPerPeriod().getPeriod2() + ", ";
             sqlStmt+="ShotsThirdPeriod=" + luBoxScore.getHomeTeamShotsPerPeriod().getPeriod3() + ", ";
             sqlStmt+="ShotsOvertime=" + luBoxScore.getHomeTeamShotsPerPeriod().getOvertime() + " ";
             sqlStmt+="WHERE GameIndex=" + dbBoxScore.getHomeTeamShotsPerPeriod().getGameIndex() + " AND ";
             sqlStmt+="TeamIndex=" + luBoxScore.getHomeTeamShotsPerPeriod().getTeamIndex();
          else
             sqlStmt="INSERT INTO GameDetailShotsPerPeriod ";
             sqlStmt+="(GameIndex, TeamIndex, ShotsFirstPeriod, ShotsSecondPeriod, ShotsThirdPeriod, ";
             sqlStmt+="ShotsOvertime) VALUES(";
             sqlStmt+=dbBoxScore.getBasicGameData().getGameIndex() + ", ";
             sqlStmt+=luBoxScore.getHomeTeamShotsPerPeriod().getTeamIndex() + ", ";
             sqlStmt+=luBoxScore.getHomeTeamShotsPerPeriod().getPeriod1() + ", ";
             sqlStmt+=luBoxScore.getHomeTeamShotsPerPeriod().getPeriod2() + ", ";
             sqlStmt+=luBoxScore.getHomeTeamShotsPerPeriod().getPeriod3() + ", ";
             sqlStmt+=luBoxScore.getHomeTeamShotsPerPeriod().getOvertime() + ")";
          st.executeUpdate(sqlStmt);
          st.close();
       protected void updateVisitorShotsPerPeriod(StatisticalItems.BoxScore dbBoxScore,
                                                  StatisticalItems.BoxScore luBoxScore)
          throws SQLException
          Statement st=m_Connection.createStatement();
          String sqlStmt="";
          if( dbBoxScore.getVisitorTeamShotsPerPeriod().getFoundInDatabase() )
             sqlStmt="UPDATE GameDetailShotsPerPeriod SET ";
             sqlStmt+="GameIndex=" + dbBoxScore.getVisitorTeamShotsPerPeriod().getGameIndex() + ", ";
             sqlStmt+="TeamIndex=" + luBoxScore.getVisitorTeamShotsPerPeriod().getTeamIndex() + ", ";
             sqlStmt+="ShotsFirstPeriod=" + luBoxScore.getVisitorTeamShotsPerPeriod().getPeriod1() + ", ";
             sqlStmt+="ShotsSecondPeriod=" + luBoxScore.getVisitorTeamShotsPerPeriod().getPeriod2() + ", ";
             sqlStmt+="ShotsThirdPeriod=" + luBoxScore.getVisitorTeamShotsPerPeriod().getPeriod3() + ", ";
             sqlStmt+="ShotsOvertime=" + luBoxScore.getVisitorTeamShotsPerPeriod().getOvertime() + " ";
             sqlStmt+="WHERE GameIndex=" + dbBoxScore.getVisitorTeamShotsPerPeriod().getGameIndex() + " AND ";
             sqlStmt+="TeamIndex=" + luBoxScore.getVisitorTeamShotsPerPeriod().getTeamIndex();
          else
             sqlStmt="INSERT INTO GameDetailShotsPerPeriod ";
             sqlStmt+="(GameIndex, TeamIndex, ShotsFirstPeriod, ShotsSecondPeriod, ShotsThirdPeriod, ";
             sqlStmt+="ShotsOvertime) VALUES(";
             sqlStmt+=dbBoxScore.getBasicGameData().getGameIndex() + ", ";
             sqlStmt+=luBoxScore.getVisitorTeamShotsPerPeriod().getTeamIndex() + ", ";
             sqlStmt+=luBoxScore.getVisitorTeamShotsPerPeriod().getPeriod1() + ", ";
             sqlStmt+=luBoxScore.getVisitorTeamShotsPerPeriod().getPeriod2() + ", ";
             sqlStmt+=luBoxScore.getVisitorTeamShotsPerPeriod().getPeriod3() + ", ";
             sqlStmt+=luBoxScore.getVisitorTeamShotsPerPeriod().getOvertime() + ")";
          st.executeUpdate(sqlStmt);
          st.close();
       protected void updateHomeSpecialTeams(StatisticalItems.BoxScore dbBoxScore,
                                             StatisticalItems.BoxScore luBoxScore)
          throws SQLException
          Statement st=m_Connection.createStatement();
          String sqlStmt="";
          if( dbBoxScore.getHomeTeamSpecialTeams().getFoundInDatabase() )
             sqlStmt="UPDATE GameDetailSpecialTeams SET ";
             sqlStmt+="GameIndex=" + dbBoxScore.getHomeTeamSpecialTeams().getGameIndex() + ", ";
             sqlStmt+="TeamIndex=" + luBoxScore.getHomeTeamSpecialTeams().getTeamIndex() + ", ";
             sqlStmt+="PowerplayGoals=" + luBoxScore.getHomeTeamSpecialTeams().getPowerplayGoals() + ", ";
             sqlStmt+="PowerplayOps=" + luBoxScore.getHomeTeamSpecialTeams().getPowerplayOps() + ", ";
             sqlStmt+="ShorthandedGoals=" + luBoxScore.getHomeTeamSpecialTeams().getShorthandedGoals() + ", ";
             sqlStmt+="ShorthandedOps=" + luBoxScore.getHomeTeamSpecialTeams().getShorthande                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    its because you use hungarian notation - that was the hollywood squares answer.
    It looks like a bug in either the ntdll or the JdbcOdbc dll, so I'd see if you can't isolate the problem (like using a smaller bit of code) and file a bug report. Find out exacty what your sql statement is which causes this to crash - hint : line 215

  • How can I call a Page Process from the Select statement for Report Page

    I'm able to call a javascript using the below:
    img src="#IMAGE_PREFIX#add2.gif" border="0" alt="Icon 4" onClick="javascript:add_connect1('||CPORT.ID||')"
    But Now,
    I'd like to accomplish (2) New things:
    1. instead of using,....... onClick="javascript:add_connect1,
    I'd like to call a Page Process, onClick=
    2. I'd like to be able to call two different processes onClick.
    a. onClick="javascript:passBack('||ID||')"
    b. onClick= <Please see my question #1 above>
    Can someone please help me with the syntax for this,
    If indeed it can even be done?
    Thanks- Gary

    Greg.
    It seems that my situation is the one you describe in you second paragraph, where you mention:
    you could then add the ID column value as a parameter to the javascript functionBut,
    I do not know how to reference the variable in my javascript nor how to use it in my on-demand process.
    If you can hellp me past this last little bump, then I think I will be able to use these skills in Sooo many different areas of my design.
    Here's what I've got so far:
    A. In the select statement I identify the javascript as:
    onClick="javascript:connect_port('<font color=blue>''||ID||''</font>')";
    B. In my javascript I have this:
    <script language="JavaScript" type="text/javascript">
    function connect_port(ID)
    var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=CONNECT_PORT',0);
    gReturn = get.get();
    get = null;
    </script>
    C. In my on demand function I have this:
    BEGIN
    INSERT INTO CCONNECTIONS_B
    BLDG_ID,CLST_ID,PORT_ID,STRAND_ID
    ) VALUES
    :P2004_BLDG_ID,:P2004_CLST_ID,:P2004_PORT_ID,:P2004_STRAND_ID1
    END;
    You can see that I dont know how to use the value for 'ID' in either the javascript or the On-Process function.
    If you can help me out with this one, Then I can imitate it for the rest.
    -Gary
    Edited by: garyNboston on Apr 3, 2009 6:44 AM
    Edited by: garyNboston on Apr 3, 2009 6:44 AM
    Edited by: garyNboston on Apr 3, 2009 6:45 AM
    Edited by: garyNboston on Apr 3, 2009 6:47 AM

  • 1 Conditional report based on 3 select lists/ 3 different select statements

    I have made 1 report based on the three select lists. The report is displayed in the center of the page. The user needs to fill them in order, the select lists are:
    Selectlist:
    1. P1_LOVPG - Null is allowed, but is only appearing at top with a label of Productgroup
    2. P1_LOVSG - Null is allowed, but is only appearing at top with a label of Subgroup
    3. P1_LOVMA - Null is allowed, but is only appearing at top with a label of Manufacturer
    LOVPG contains a distinct collect of the ProductGroups
    QUERY LOV = select distinct pg from X
    LOVSG contains a distinct collect of the SubGroups inside the selected PG.list
    QUERY LOV = select distinct sg from X where pg = :P1_LOVPG
    LOVMA contains a distinct collect of the Manufacturers inside the selected SG.lst
    QUERY LOV = select distinct ma from X where sg = :P_LOVSG
    Based on the the selected items the user would see the following:
    Table X
    PG SG MA ART
    A-----X----M---1
    A-----X----N---2
    A-----Y----M---3
    A-----X----M---4
    B-----X----M---5
    B-----Y----N---6
    B-----Z----O---7
    Seletion 1 PG = A -> selects PG A in select list result, User sees:
    Report A
    PG SG MA ART
    A-----X----M---1
    A-----X----N---2
    A-----Y----M---3
    A-----X----M---4
    Query would be: select * from X where PG = :P1_LOVPG
    Selection 2, user still sees the above, can only select from the SG select list NULL, X, Y. User needs to choose between X or Y value. He picks X, he sees:
    Report B
    PG SG MA ART
    A-----X----M---1
    A-----X----N---2
    A-----X----M---4
    Query would be: select * from X where PG = :P1_LOVPG and SG = :P_LOVSG
    Selection 3, user still sees selection 2 on his screen, can only select from the MA list bewteen NULL, M or N, user needs to choose between M or N. He picks M, he sees:
    Report C
    PG SG MA ART
    A-----X----M---1
    A-----X----M---4
    Query would be: select * from X where PG = :P1_LOVPG and SG = :P_LOVSG
    As you can see the query changes as the user goes deeper into the structure. It is a simple if then else system where the quey changes. How do I set this up in htmldb?
    (I've read something about Oracle's SQL and it's decode function, but can they be used with changing select statements?)

    are you sure your data meets the JOIN conditions?
    You can make a quick check.. only example...
    select single * from KONP into ls_konp
    where knumh = P_knumh.
    if sy-subrc eq 0.
    select * from from A905 into table lt_a905 where
         kappl in so_kappl
         and kschl in so_kschl
         and VKORG in so_vkorg
         and vtweg in so_vtweg
         and kondm in so_kondm
         and wkreg in so_wkreg
         and knumh = ls_konp-knumh.
    if sy-subrc eq 0.
    select * from A919 into table lt_a919
    for all entries in lt_a905
    where kappl = lt_a905-kappl
    and kschl = lt_905-kschl
    and knumh = lt_905-knumh.
    endif.
    endif.

  • Re: Select statement in the report

    Hi Experts,
    In my selection-screen contains ernam as a parameter.
    If it balnk in the selection-screen,
    the select statement is not working.
    if it is not blank ,the select statement is  working fine.
    TABLES: vbak.
    TYPES: BEGIN OF ty_vbak,
            vbeln TYPE vbeln,
            knumv TYPE knumv,
           END OF ty_vbak.
    DATA: v_vkorg TYPE vkorg,
          v_vtweg TYPE vtweg,
          v_erdat TYPE erdat.
    DATA: i_vbak  TYPE STANDARD TABLE OF ty_vbak.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS:     p_ernam TYPE ernam .
    SELECT-OPTIONS: s_vkorg FOR v_vkorg,
                    s_vtweg FOR v_vtweg,
                    s_erdat FOR v_erdat.
    PARAMETERS:     p_kvgr4 TYPE tvv4-kvgr4 OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b1.
    START-OF-SELECTION.
      SELECT vbeln
             knumv
      FROM vbak
      INTO TABLE i_vbak
      WHERE erdat IN s_erdat
      AND   ernam = p_ernam
      AND   vkorg IN s_vkorg
      AND   vtweg IN s_vtweg
      AND   kvgr4 = p_kvgr4.
      IF sy-subrc = 0.
        WRITE:/ 'HI'.
      ENDIF.
    Thank's in Advance,
    Harsha.

    report .
    TABLES: vbak.
    TYPES: BEGIN OF ty_vbak,
    vbeln TYPE vbeln,
    knumv TYPE knumv,
    END OF ty_vbak.
    DATA: v_vkorg TYPE vkorg,
    v_vtweg TYPE vtweg,
    v_erdat TYPE erdat.
    DATA: i_vbak TYPE STANDARD TABLE OF ty_vbak with header line.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    select-options: s_ernam for  vbak-ernam .
    SELECT-OPTIONS: s_vkorg FOR v_vkorg,
    s_vtweg FOR v_vtweg,
    s_erdat FOR v_erdat.
    PARAMETERS: p_kvgr4 TYPE tvv4-kvgr4 .
    SELECTION-SCREEN END OF BLOCK b1.
    START-OF-SELECTION.
    SELECT vbeln
    knumv
    FROM vbak
    INTO TABLE i_vbak
    WHERE erdat IN s_erdat
    AND ernam in s_ernam
    AND vkorg IN s_vkorg
    AND vtweg IN s_vtweg
    AND kvgr4 = p_kvgr4.
    IF sy-subrc = 0.
    loop at i_vbak.
    write:/ i_vbak-vbeln.
    endloop.
    ENDIF.

  • SELECT statement in FROM clause - syntax help

    Hi,
    I want to have a SELECT statement in the FROM clause. I get syntax error when doing this and since I am new to ABAP I need som help.
    I want to do the following, (and if anyone has any SELECT statement from their own system which you know there is no syntax error in please post it here so I can analyze the syntax):
    *I leave the INTO itab clause out, since I only want to demonstrate the functionality
    I am trying to get.
    <b>SELECT</b> tableOne~someField
    <b>FROM</b> tab <b>AS</b> tableOne (<b>SELECT</b> someField
                                         <b>FROM</b> tab
                                         <b>WHERE</b> someFiled > 1) <b>AS</b> tableTwo
    <b>WHERE</b> tableOnesomeField > tableTwosomeField
    like I said, the problem is that the select statement in the parenthesis in the from clause seems to be incorrect because I get "wrong expression" when trying to compile. Is this because I cannot have a select statement in the from clause or is it because of a minor syntax error, such as I forgot a dot, or some other sign?
    thanks and regards
    Baran

    sorry i am not enough familiar with sub queries but some error i can see which i will state here.
    1> you have to use sub queries i.e. select in ( ) after where clause because here you are fulfilling a where clause by another select statement.
    like this
    SELECT * FROM SFLIGHT
        INTO WA
        WHERE SEATSOCC = ( SELECT MAX( SEATSOCC ) FROM SFLIGHT ).
    2> you cannot specify field name without into clause either you have to use
    select *  or select f1 into tab-f1  like this...
    but if you are using select * without into you have to define
    tables : dbtab.
    selec * from dbtab. like that.
    regards
    shiba dutta

  • Using plsql tables in select statement of report query

    Hi
    Anyone have experience to use plsql table to select statement to create a report. In otherwords, How to run report using flat file (xx.txt) information like 10 records in flat files and use this 10 records to the report and run pdf files.
    thanks in advance
    suresh

    hi,
    u can use the utl_file package to do that using a ref cursor query in the data model and u can have this code to read data from a flat file
    declare
    ur_file utl_file.file_type;
    my_result varchar2(250);
    begin
    ur_file := UTL_FILE.FOPEN ('&directory', '&filename', 'r') ;
    utl_file.get_line(ur_file, my_result);
    dbms_output.put_line(my_result);
    utl_file.fclose(ur_file);
    end;
    make sure u have an entry in ur init.ora saying that your
    utl_file_dir = '\your directory where ur files reside'
    cheers!
    [email protected]

  • [u][b]Performance Tuning Help[/b][/u] : Repeating HUGE Select Statement...

    I have a select statement that I am repeating 12 times with the only difference between them all being the date range that is grabbed. Essentially, I am grabbing the last 12 months of information from the same table here is a copy of one of the sections:
    (select
    a.account_id as account_id,
    a.company_id as company_id,
    a.account_number as acct_number,
    to_char(a.trx_date, 'YYYY/MM') as month,
    sum(a.amount_due_original) as amount
    from
    crystal.financial_vw a
    where
    a.cust_since_dt is not null
    and a.cust_end_dt is null
    and a.trx_date > add_months(sysdate, -13)
    and a.trx_date <= add_months(sysdate, -12)
         group by
              a.account_id,
              a.company_id,
              a.account_number,
              to_char(a.trx_date, 'YYYY/MM')) b
    I am now looking to do some tuning on this and was wondering if anyone has any suggestions. My initial thought was to use cursors or some sort of in memory storage to temporarily process the information into a pipe-delimited flat file.

    "Don't need:
    to_char(a.trx_date, 'YYYY/MM')"
    Are you sure?
    "Change to (just to make it easier to read):
    a.trx_date between add_months(sysdate, -13)
    and a.trx_date <= add_months(sysdate, -12)"
    What? That's not even valid syntax is it? Besides the fact that the BETWEEN operator is inclusive (i.e. > add_months(sysdate, -13) is not the same as between add_months(sysdate, -13) ...).
    "And be sure you have an index on:
    cust_since_dt, cust_end_dt, trx_date in financial_vw."
    What information did you base this conclusion on. Just because something is in the where clause doesn't mean you should automatically throw an index on it. What if 90% of the rows satisfy those null/not null criteria? What if there's only one year of data in this table? Are you certain an index would help pick out all the data for one month more efficiently than a full table scan?
    My immediate question was why are you breaking the data for each month up into separate subqueries like this at all? What is it that your doing with these subqueries that you don't believe can be accomplished with a single grouped query?

  • Need Help in Select Statement

    Dear gurus
    Below is my select statement. Im having problem with statement.
    the problem is that  the table vbfa  have some entries like this
    800     1400004654     10     3900012235     10     M     424,672.68
    800     1400004654     10     3900012257     10     M     137,093.36
    800     1400004654     20     3900012311     20     M     214,257.36
    800     1400004654     30     3900012412     30     M     81,248.44
    800     1400004654     30     3900012901     30     M     166,920.68
    When the select statement is run it does not fetch the data of LINE number 2 and Line number 5
    LOOP AT itab1.
        SELECT SINGLE * INTO CORRESPONDING FIELDS OF wa_vbfa
        FROM vbfa
        WHERE vbelv = itab1-vgbel
        AND posnn = itab1-vgpos
        AND vbtyp_n = 'M'.
        SELECT SINGLE * INTO CORRESPONDING FIELDS OF wa_vbrk
          FROM vbrk
          WHERE vbeln = wa_vbfa-vbeln
          AND vbtyp = 'M'.
        IF sy-subrc = 0.
            itab1-lfimg = wa_vbfa-rfmng.
           itab1-old_price = wa_vbfa-rfwrt.
           MODIFY itab1.
           ELSE.
        ENDIF.
      ENDLOOP.
    Please Help
    Regards
    Saad Nisar

    Hello Saad,
    The reason why you are not getting the 2nd and 5th entries is that, the where conditions vbelv, posnn and vbtyp_n matches for both the 1st and 2nd record where select will pick only the 1st record. The same way for 4th and 5th record. so its picking only 4th.
    So to avoid this add even vbeln in the where condition of the select query
    LOOP AT itab1.
        SELECT SINGLE * INTO CORRESPONDING FIELDS OF wa_vbfa
        FROM vbfa
        WHERE vbelv = itab1-vgbel
        AND posnn = itab1-vgpos
       AND vbeln = itab1-field           " Add the corresponding field here
        AND vbtyp_n = 'M'.
        SELECT SINGLE * INTO CORRESPONDING FIELDS OF wa_vbrk
          FROM vbrk
          WHERE vbeln = wa_vbfa-vbeln
          AND vbtyp = 'M'.
        IF sy-subrc = 0.
            itab1-lfimg = wa_vbfa-rfmng.
           itab1-old_price = wa_vbfa-rfwrt.
           MODIFY itab1.
           ELSE.
        ENDIF.
      ENDLOOP.
    Vikranth

  • Need help on select statement...

    Hi,
    I need to fetch from vbfa table those records where vbeln starts with '0800'.
    my select statement given below gives a syntax error..pl help.
    SELECT * FROM vbfa WHERE vbeln(4) = '0800'.
    vbeln(4) is not accepted and i get the message ' field vbeln(4) is unknown' ...what to do?
    thks

    Use LIKE. Please see F1 on this.
    Rob
    (changed CP to LIKE)
    Edited by: Rob Burbank on Sep 15, 2008 11:18 AM

Maybe you are looking for

  • Issues with IE 64bit on Win 7

    Hello Friends, We recently upgraded our PC's to Win 7 64bit version and these are our PC configurations - Win 7 OS 64bit - Office 2010 Professional Plus 2010 64bit - IE 8 64bit These are the issues we are facing: 1: "Datasheet View" button on ribbon

  • How do I install the lastest Ver? Why do I get a Windows error message?

    I have Acrobat Pro 1.1.8. The Help menu command Check for Updates says NO UPDATES AVAILABLE. A tray message in Windows 7 (32 bit) says to SOLVE A PROBLEM WITH ADOBE ACROBAT... and it takes me to my download page at Adobe where Acrobat Pro versions 11

  • How to Create a File Structure

    HI experts! I want to create a file structure for testing purpose. Basically what i need to create is a 150 MB file and for that file i want to create a structure i.e my DT ,MT for testing purpose. Can you guide how should i create a 150 MB file and

  • F150 Generate SAP idoc

    Hi, I have a problem for my test, when i run F110 with my program run date and my identification feature. When i run printout. In Generate SAP IDoc , the printer is lock to $H208. Where can i custom this parameter please? Thanks.

  • Browser IE7.0 does not support WebDynpro in Quality and production only

    Hi All, Our portal version is NW04 SP15 adn NWDI is on NW700.We have Development ,Quality and production portal.We are using browser IE6.0 to see the WebDynpro application as we are unable to see the webdynpro application on browser IE7.0.We are gett