What is correct??

I need to perform the following SQL operations in my JSP
First a select into a temp table
Select ....... into #temptable from table inner join (select ......)
After this #temp table is created I need to then get my data into a hierarchical format with the following.
Select distinct ......
from #temptable a
left join
#temptable b
on ......
left join
#temptable c
on ......
And last but not least Ialso need to make sure that I drop the #temptable.
Currently I know that all this statements work perfectly fine thru my database query tool.
My question is what is that I MUST use??
executeUpdate() with the select into and executeStatement() with the select distinct?? and Also, what should I use with the drop table stattement??
Thanks in advance...

Hi,
Have a look at the API under java.sql.
executeUpdate, is for writing to your database, and executeQuery is for querying. I am not sure about executeStatement. You also have to explicitly call rollback() if exception is thrown as I do not think it is done automatically - would leave you with dodgy tables and data
Regards,
Darren

Similar Messages

  • Just started MobileMe.  Struggled with the setup of iCal but eventually got everything working fine for about a day.  Then I started receiving an iCal error message stating that the URL was wrong.  Of course, sync no longer works.  What is correct URL?

    Just signed up for MobileMe.  Had a little difficulty setting up iCal but eventually got everything working.  Whether posting to iCal on my Mac Book or iPhone, sync seemed to be working fine for about a day.  Then suddenly when I opened iCal on my Mac Book, I would receive the following iCal error message:
    "The calendar https://cal.me.com/calendar/calendar/principals/users/1.1117025442/ was not found on the server. Make sure the URL is correct."  I know where it is located but because I did not enter the URL when I set up MobileMe/iCal, I don't know what the correct URL should be.

    Mike,
    Welcome to Apple Support Communites.
    Review; MobileMe: Setting up iCal for the new MobileMe Calendar, and post back with further questions.

  • I recently purchased a shutter release remote for my IPAD camera but the cord is only three feet long.  I purchased a 3 banded AV extension but it doesn't work.  Can anyone tell me what the correct extension cable is and where I can find one?  Thanks.

    I recently purchased a shutter release remote for my IPAD camera but the cord is only three feet long and I need an extension cord.  I purchased a 3 banded AV extension but it doesn't work.  I have been told that I need an extension cord that has AV and Mic to enable the remote shutter release to work with the extension cord.  Can anyone tell me what the correct extension cable is and where I can find one?  Thanks.

    Greetings,
    I've never seen this issue, and I handle many iPads, of all versions. WiFi issues are generally local to the WiFi router - they are not all of the same quality, range, immunity to interference, etc. You have distance, building construction, and the biggie - interference.
    At home, I use Apple routers, and have no issues with any of my WiFi enabled devices, computers, mobile devices, etc - even the lowly PeeCees. I have locations where I have Juniper Networks, as well as Aruba, and a few Netgears - all of them work as they should.
    The cheaper routers, Linksys, D-Link, Seimens home units, and many other no name devices have caused issues of various kinds, and even connectivity.
    I have no idea what Starbucks uses, but I always have a good connection, and I go there nearly every morning and get some work done, as well as play.
    You could try changing channels, 2.4 to 5 Gigs, changing locations of the router. I have had to do all of these at one time or another over the many years that I have been a Network Engineer.
    Good Luck - Cheers,
    M.

  • What is correct method to deploy cluster aware technology using HA VMs?

    Dear all, 
    I recently had experience creating Hyper-V Server 2012 cluster. This allows for deploying a highly available virtual machine. That's fine. The business machine (virtual machine) becomes highly available. This includes an existing VM enabled to be highly
    available or a new VM installed into cluster from scratch.
    On the other hand; we have cluster aware applications (SQL Server, SCVMM etc.) which are installed in clustered OS (Windows 2008 R2 Enterprise edition which has failover clustering service) . 
    Just for clearing concept; what is correct way of deploying a cluster aware technology (SQL Server, SCVMM) in the scenario where the underlying OS; running in VM(s) can be made highly available. 
    Method 1:
    Create simple non clustered VM, install cluster aware application (SQL Server e.g.). Make this VM highly available using Hyper-V cluster.  (This seems to be clustering the VM running cluster aware application, not the cluster ware application; which
    requires clustering.)
    Method 2:
    Create HA-enabled  VM onto Hyper-V Servers cluster; install cluster aware application within this HA-enabled VM.   (This again; the underlying OS/VM is clustered first, the cluster aware application (SQL server or others) how would it leverage
    the cluster?)   
    Please shed light on what is correct method. In both cases it seems the VM running the cluster aware application; is made highly available; meaning leveraging clustering. What about clustering the application
    itself? The objective is to be able to not only make the VM highly available; but also deploy clustered SQL Server  or other cluster aware technology using such HA VM.
    Regards, 
    Shahzad.

    Dear all, 
    I recently had experience creating Hyper-V Server 2012 cluster. This allows for deploying a highly available virtual machine. That's fine. The business machine (virtual machine) becomes highly available. This includes an existing VM enabled to be highly
    available or a new VM installed into cluster from scratch.
    On the other hand; we have cluster aware applications (SQL Server, SCVMM etc.) which are installed in clustered OS (Windows 2008 R2 Enterprise edition which has failover clustering service) . 
    Just for clearing concept; what is correct way of deploying a cluster aware technology (SQL Server, SCVMM) in the scenario where the underlying OS; running in VM(s) can be made highly available. 
    Method 1:
    Create simple non clustered VM, install cluster aware application (SQL Server e.g.). Make this VM highly available using Hyper-V cluster.  (This seems to be clustering the VM running cluster aware application, not the cluster ware application; which
    requires clustering.)
    Method 2:
    Create HA-enabled  VM onto Hyper-V Servers cluster; install cluster aware application within this HA-enabled VM.   (This again; the underlying OS/VM is clustered first, the cluster aware application (SQL server or others) how would it leverage
    the cluster?)   
    Please shed light on what is correct method. In both cases it seems the VM running the cluster aware application; is made highly available; meaning leveraging clustering. What about clustering the application
    itself? The objective is to be able to not only make the VM highly available; but also deploy clustered SQL Server  or other cluster aware technology using such HA VM.
    Regards, 
    Shahzad.
    With SQL Server both M1 and M2 are by far the best solutions. See guest VM cluster is non-optimal as SQL Server works better with own clustering features (AlwaysOn, see link below). And HA would make VM re-boot on another physical host so there would be
    both downtime and potential data loss. Run SQL Server in a pair of VMs on a different physical hosts, configue AlwaysOn (use failover SMB share as a witness) and you'll be fine. See:
    Overview of AlwaysOn Availability Groups (SQL Server)
    http://technet.microsoft.com/en-us/library/ff877884.aspx
    How to Build SQL Server
    2012 AlwaysOn Hyper-V Virtual Machines
    http://social.technet.microsoft.com/wiki/contents/articles/6198.how-to-build-sql-server-2012-alwayson-hyper-v-virtual-machines-for-demos-emu-build.aspx
    SQL Server 2012 AlwaysOn High Availability and Disaster Recovery Design Patterns
    http://blogs.msdn.com/b/sqlcat/archive/2013/11/20/sql-server-2012-alwayson-high-availability-and-disaster-recovery-design-patterns.aspx
    Also the best place to ask about SQL Server High Availability is dedicated MSFT group here:
    SQL Disaster Recovery Forum
    http://social.technet.microsoft.com/Forums/sqlserver/en-US/home?forum=sqldisasterrecoveryHope
    this helped :)
    StarWind VSAN [Virtual SAN] clusters Hyper-V without SAS, Fibre Channel, SMB 3.0 or iSCSI, uses Ethernet to mirror internally mounted SATA disks between hosts.

  • How to get into BIOS of Sat P200D? What is correct temp for CPU/VGA load?

    I tried everything, pressing ESC after power-up,F1, ESC/F1, F2....i cannot get into the bios.
    What is the proper procedure to get into the BIOS? I used the latest BIOS 1.70 from Toshiba homepage, i remember i didn't have this problem with the older bios.
    Furthermore, what are correct temps for the CPU under extreme load as well as VGA testing with OCCT/Furmark or everest?
    If i run OCCT (extreme CPU stress test) i am getting some extreme numbers up to 95 degree on the CPU...
    Thanks!

    *SOLVED!!!*
    It was indeed the case that any standard VGA resolution (like bios screen and bootup screen) was not displayed on the laptop!
    Thats why i only saw a black screen!
    I plugged an external monitor on it, and i see i am actually in BIOS.
    So i went into the BIOS (using the other monitor) and changed the the setting "Analog + External", and now it works and i also have the toshiba logo back and everything

  • What is correct way to run python script in build phases

    in xcode 4.6  build phases i have added a run script
        python build.py
        exit
    when i build project it never finishes it keep on saying running custom shell script
    what is correct way to run python script in build phases ?

    /usr/bin/python build.py
    exit
    still the issue remians.

  • HT3258 What is correct update or upgrade for Mac OSX v 10.5.8? Also can't use sites without updates on firefox & safari. Auto update shows none available?

    What is correct update or upgrade for Mac OSX v 10.5.8? Also can't use sites without updates on firefox & safari. Auto update shows none available?

    Click here.
    (89934)

  • HT201328 i havent received a message from carrier yet, but what is correct procedure to unlock iphone 5....

    i havent received message from carrier yet, but what is correct procedure to unlock iphone 5

    Read here:
    http://support.apple.com/kb/HT5014

  • What is correct billing type to generate invoice ?

    As per our deployment consultant for Debit memo with billing type ZL2 we cannot create Excise invoice through T-code J1IIN and and billing type ZF2 is required.
    But i also heard it is not possible to force a ZF2 for a debit note ZL2 and not the correct process according SAP standard.
    Can you please clarify what is correct approach

    Hi,
    if you want to change J1iin - excise invoice Document type - follow below mentioned Path - give new document type for billing
    SPRO
              Logistics - General
                             Tax on Goods Movements
                                            India
                                                  Maintain Company Code Settings
                                                           11th Column give New Document type ZF2 or ZL2
    save
    Mahesh   

  • What is correct query ?

    I have two tables: tmp and tmp1. the output should be, for each cno in tmp, its pno should be ALL in the tmp1. The correct output should be '1111'.
    I have written a query based on 1111, it works. But how could I extend to 2222, 3333 .... ? what is correct query ?
    Thanks.
    select * from tmp;
    CNO                    PNO                   
    1111                   10506                 
    1111                   10507                 
    1111                   10508                 
    1111                   10509                 
    2222                   10601                 
    2222                   10701                 
    3333                   10800                 
    3333                   10900                 
    8 rows selected
    select * from tmp1;
    PNO                   
    10506                 
    10507                 
    10508                 
    10509                 
    10701                 
    10800                 
    6 rows selected
    select * from tmp where
    cno = 1111
    and
    not EXISTS(select pno from tmp  where cno = 1111 minus select pno from tmp1)
    CNO                    PNO                   
    1111                   10506                 
    1111                   10507                 
    1111                   10508                 
    1111                   10509                 
    4 rows selectedEdited by: user533361 on Sep 27, 2009 1:47 PM

    with tmp as (
                 select 1111 cno,10506 pno from dual union all
                 select 1111,10507 from dual union all
                 select 1111,10508 from dual union all
                 select 1111,10509 from dual union all
                 select 2222,10601 from dual union all
                 select 2222,10701 from dual union all
                 select 3333,10800 from dual union all
                 select 3333,10900 from dual
        tmp1 as (
                 select 10506 pno from dual union all
                 select 10507 from dual union all
                 select 10508 from dual union all
                 select 10509 from dual union all
                 select 10701 from dual union all
                 select 10800 from dual
    select  cno
      from  tmp t1,
            tmp1 t2
      where t1.pno = t2.pno(+)
      group by cno
      having count(t1.pno) = count(t2.pno)
           CNO
          1111
    SQL> SY.

  • Transfered DVD ( via Handbrake )  to Aperture folder. Was able to transfer still photos to iMovie project but DVD project ( in same folder would not transfer. What is correct procedure?

    Transfered DVD ( via Handbrake ) to Aperture folder.  Was able to transfer photo stills to iMovie project BUT DVD project in same folder would not transfer to iMovie. What is correct procedure?

    I actually already checked Pondini's and didn't find the answer.  Any other suggestions?
    thanks

  • What are correct settings on iCloud to make sure photos are on all devices?

    What are correct settings on iCloud to make sure photos are on all devices?

    If your Westell modem (actually, it is likely a gateway...a combination modem/router) is set up for "PPP is on the modem", then the AEBS should be configured to Connect Using = DHCP or Ethernet. The AEBS also needs to be configured in Bridge Mode.
    Open AirPort Utility, click on the AEBS, and click Edit
    Click the Internet tab and change to setting to "Connect Using DHCP"
    Then click the Network tab and set the Router Mode for "Off (Bridge Mode)"
    Update to save changes and restart the network by powering everything off in any order that you want. Then start the Westell device first, followed by the AEBS a minute later, etc until everything is powered back up.
    This type of setup may work OK for you.
    If not, you will need to change the Westell setup to "PPP is on the router" and then configure the AEBS to provide the PPPoE service as you did originally.
    AT&T does generally advise that the modem should be in "Bridge Mode" or "PPP is on the router" when other routers are used with the "modem". See this document for more info:
    http://www.att.com/esupport/article.jsp?sid=KB401764&cv=801,902&title=Connecting +a+non-AT%26T+provided+router+to+your+AT%26T+Internet+connection#fbid=43oi_bcpYy U

  • HT4910 how to refund my iCloud purchase before the 15 ends & whats the correct adress or link used for that

    How to refund my iCloud purchase bill before the 15 ends & whats the correct adress or link used for that

    See Roger's post here: https://discussions.apple.com/thread/4671693?start=0&tstart=0.

  • I have a macbook air late 2010 and keep getting a warning that my hard drive is full and to delete things so I purchased a external hard drive (1TB) but I'm just not sure what the correct way to transfer and store files to the external drive is. First MAC

    I purchased a macbook air about 5 months ago and lately i keep recieving a warning that the hard drive or disk is full and that I will need to move items to trash in order to free up space on it. I purchased a external hard drive 1 TB but I'm very new to mac and ios and unsure as to how I'm suppose to transfer my files (video, pics, music etc.) from my mac over to the external hard drive in the correct way so I won't end up deleting them permenately or screwing anything up with my mac as far as the applications and programs being able to run. Am I supposed to just copy to the external hard drive and then move to and empty the trash? That's pretty much all I could come up with, but then what if i need or want to access that file again at a later time. Also, I have an i Phone and i pad so with i cloud it automatically syncs all my purcheses and if i delete something from itunes on my mac it deletes from my ipad.
    I'd appreciate any kind of input i think im just a little lost here. I have to say i love my Mac and wouldn't trade it for anything (except maybe a macbook pro w/more memory)... Is there something I'm missing???

    To free up hard drive space the best bet is to move data files that you don't need access to all the time. Likely candidates are music, video, and photos. Things like word processing and spreadsheet files can also be moved but they tend not to be very large and so don't free up much space. The problem with moving the above mentioned files is that iTunes and iPhoto need to know where the files are stored.
    Here's an article explaining how to move the iTunes folder. You can move the iPhoto library using the Finder but there is a slight complication. Start iPhoto, open the Preferences and click on the Advanced tab. The first option is "Copy items to the iPhoto Library". If this option is checked, copy the iPhoto library to your external folder (drag it from the Pictures folder to your external drive) and then delete it from your Picture folder. If this option is not checked, it is a bit more complicated and we'll need to talk a bit.

  • What is correct way to join a start/end date driven dimension to a fact table in data foundation?

    I have a bad universe or a data design issue. 
    Several versions of hierarchies reporting store entities in reporting Fact measures.
    Example of date driven Hierarchy Dimension:   ORG_KEY
                                                                                START_DATE
                                                                                END_DATE
                                                                                STORE_NUMBER
                                                                                ORG_HIERARCHY   
                                                                                CURR_FLG   (Y/N)        
    Fact table  :                                                         ORG_KEY
                                                                                 CALENDAR_KEY
                                                                                 TRANS_DATE
                                                                                 $amount  
    Calendar Dimension:                                            CALENDAR_KEY
                                                                                  DAY_DATE
                                                                                   FY_WEEK          (201452)
                                                                                    FY_PERIOD      (201412)
                                                                                    FY_QUARTER   (201401)
                                                                                     FISCAL_YEAR    (2014)
    Users WISH:
    Wish for store number and org hierarchy to pull as of the last day of each pull without prompt.    The Store(ORG_KEY) as in the fact table; but the ORG_HIERARCHY and other attributes as of the last day they pull.
    Daily (Would be Calendar.Day_Date in Filter) ,
    Week to date (would be Max Calendar.Day_Date for (201452) FY_WEEK  as entered,
    Month to date,
    Year to date, 
    AdHoc queries.  
    My problem is I see how they could manually pull this in Webi.   I have tried everything I know to join to no avail.  I have not gotten @Prompts to work in joins, derived tables, etc.  in the data foundation.  Wonder what is difference between parameter in Data foundation vs. filter in buisness layer.    None of them worked. 
    Please help!   ANY ideas would be appreciated.   .

    {Note that abbrevations in brackets are just for short form further down the answer}
    Join Store Dim (SD) to Transaction Fact (TF) on ORG_KEY=ORG_KEY with 1 to Many cardinality
    Create an alias of Calendar Dim and call it Transaction Date (TD)
    Join TD to TF on TD.CALENDAR_KEY=TF.CALENDAR_KEY with 1 to Many cardinality
    Create a predefined condition in your universe called "Return Yesterday's Transactions" as:
    TD.DAY_DATE = trunc(sysdate-1) <-- That assumes Oracle database; use whatever is correct for yesterday for your RDBMS
    The above predefined condition when added to your data query will return only yesterday's transactions.
    However, if you want to return all the different types of sales, you would need an object for each one. To do that, you'd use a case statement. Again, using Oracle syntax, an example of MTD would be:
    SUM(CASE WHEN trunc(TD.DAY_DATE,'yyyymm') = trunc(sysdate,'yyyymm') THEN TF.amount END)
    If you have any more questions about how this approach would work please shout.
    As an alternative, you could create a time hierarchy and add scope of analysis to your report for it and enable drilling at report level.

  • Whats the correct procedure to installing/updating Audigy 2

    Hi all, I am terribly confused with all the updates.
    Is this correct?
    I install the drivers and software that came with my Audigy 2.
    Then I go to Creative site and download all the updates? Or just some? if so, which ones and how do I know which ones I need and which ones I already have or do not need?
    Also, how do I install the latest BETA openAL driver? Do I uninstall all Creative software or JUST the driver?
    Thanks.

    After your original cd has been installed and you have rebooted to your sound working correctly,install the older software updates (the ones before the August '05 ones).
    Then install the Nov. '03 Driver using the downloaded setup.
    After reboot, extract that driver setup with an extracting tool like Winzip or WinRar.
    From the extracted driver folder, run CTZAPP.EXE and choose to overwrite previously installed and shared files.
    Reboot twice.
    Install the .84.55-R Driver setup.
    You shouldn't need to run CTZAPP.EXE over itself this time as this file seems to have fixed the problem of the older releases where the driver files were not completely updated or reported as Microsoft signed in Device Manager. You may want to verify this in Windows Device Manager. Mine updated fine with this setup without needing the additional CTZAPP step. All driver files were the correct version and the "signed" designation icon's were all there.
    Now, you may install all the other software updates from August, as well as the latest Audio Console software.
    You don't need to install the latest beta driver unless you play newer OpenAL games. Those drivers break some aspects of the Creative software, although you can still control those broken parts of EAX Console through the new Audio Console.
    If you want to install those beta's, read the instructions first and do what Creative instructs. I successfully applied everything I told you to do, but have no experience using those beta drivers to this point so can not help you there.

Maybe you are looking for