Can i do this in one statement

Assuming I have the following column:
COLUMN
2.6
1.8
4.6
1.1
0.4
Is it possible to round to the nearest 0.5, for example:
COLUMN
2.5
2
4.5
1
0.5
Preferably in a single SQL query?

You could consider the ROUND function.
As in
with t as (select 2.6 col from dual union all
select 1.8 from dual union all
select 4.6 from dual union all
select 1.1 from dual union all
select 10.4 from dual)
select col, round(col), round(col*2)/2 from t
Row#     COL     ROUND(COL)     ROUND(COL*2)/2
1     2,6     3     2,5
2     1,8     2     2
3     4,6     5     4,5
4     1,1     1     1
5     10,4     10     10,5

Similar Messages

  • I need to deactivate two old computers and reinstall CS3 on two new computers. How can I do this if one is long gone and the other just crashed?

    I need to deactivate two old computers and reinstall CS3 on two new computers. How can I do this if one is long gone and the other just crashed?

    contact adobe support and request an activation count reset, http://helpx.adobe.com/x-productkb/global/service1.html

  • Can we combine this into one query, just curious

    Dear all;
    I have a query of the following form
    select t.id, t.place  from tbl_one t
    where t.create_date < sysdateand
    select t.id, t.place  from tbl_one t
    where t.create_date < sysdate + 28just curious, can those two queries be combined to one. Thank you. All help is appreciated.

    Is this a trick question? You could combine the two queries using AND / OR clause but it wouldn't really solve anything.
    Lets look at each query.
    SELECT t.id, t.place FROM tbl_one t WHERE t.create_date < sysdateThe above query would return all records whose create_date is older than sysdate (now).
    SELECT t.id, t.place FROM tbl_one t WHERE t.create_date < sysdate OR t.create_date < sysdate + 28The above query would return all records whose create_date is older than sysdate (now) OR records whose create_date is older than sysdate (now) + 28 (or 28 increments in the future). These two queries are the same because if create_date is older than sysdate (now) by default it is older than any time future time. And since OR clause only requires one condition to be true sysdate+28 is unnecessary.
    Similarly, we could combine the two queries using the AND clause.
    SELECT t.id, t.place FROM tbl_one t WHERE t.create_date < sysdate AND t.create_date < sysdate + 28The above query would return all records whose create_date is older than sysdate AND older than sysdate+28. However, since the AND clause requires both conditions to be true, and since all sysdate +28 > sysdate the above query is equal to
    SELECT t.id, t.place FROM tbl_one t WHERE t.create_date < sysdate + 28Basically you COULD combined the two select statements but it would be pointless

  • Simulate Signal Express VI is sending two periods of the wave per loop iteration - how can I reduce this to one period?

    Hello,
    I've been trying to use the Signal Generator Express VI and DAQ Assistant in order to generate an output waveform, as seen in this NI tutorial video:
    http://www.ni.com/academic/students/learn-daq/generate/ (timestamp is at 2:07 for what I'm trying to do)
    For background, I'm trying to move a piston device using Labview. The sine waveform is intended to move the piston at a smooth speed. For every loop iteration, the Simulate Signal VI running into my DAQ Assistant moves the piston to its maximum displacement and back twice. I cannot determine why this is occuring.
    The settings in my "Configure Simulate Signal" tab are as follows:
    Frequency: 1Hz
    Phase: 90 deg
    Amplitude: 2
    Offset: -2
    I would like my piston to only reach its maximum displacement and return for every iteration of the loop. I've tried adjusting all of the settings within "Configure Simluate Signal" but I can only work in even numbers - sending the piston back and fourth two, four, or eight times, ect.

    The Simulate Signal VI is set for integer number of cycles and the default frequency set in the Cycles per Second control is 3.75 Hz. That results in the signal containing three complete cycles and the data array contains 8000 elements, not the nominla 10000 specified in the Express VI dialog.
    If you only want one cycle, you need to specify the signal so that you only get one. Either reduce the frequency or reduce the number of samples.
    As you have noticed Express VIs do one thing exceedingly well: They obscure what is going on inside.  I pulled your signal generation code out into a separate VI and then created a generator which will generate the same signal but allow you to select the number of cycles. It uses the Sine Waveform.vi from the Signal Processing  >> Waveform Generation palette.
    I also recommend that you change the structure of your program. The use of sequence structures is discouraged in LabVIEW  because they defeat dataflow are very inflexible when changes need to be made. A Producer/Consumer Design Pattern plus a state machine would probably be a good choice. This will allow separation of the daq acquisition from the saving to file so that the timing of one does not constrain the timing of the other.
    Setting the Analog Input Read to read multiple samples simultaneously and using the hardware timing of the data acquisiton device will get data faster and the timing will be precisely (compared to software timing) controlled by the hardware.
    Writing to the same file in parallel loops probably results in some strange behavior such as differing numbers of writes from acquired data compared to generated cycles. As the file grows, the writes may slow down due to the OS needing to fragment or reallocate space for the file.
    Lynn
    Attachments:
    Signal generator.vi ‏49 KB

  • Can I put more than one statement into a Condition in TestStand

    I'm trying to learn to use the Conditional statement in more than it's simplest form and I have 2 questions:
    Question 1:
    For instance simple statement is:
    Locals.nValue=(Locals.Compare>5) ? 1 : 2
    However, I want to do 2 things in the Condition
    Locals.nValue=(Locals.Compare>5) ? 1,Locals.sString = "Yes" : 2, Locals.sString = "No"
    But, this doesn't work (using the comma separator). Is there a way to put 2 statements into the conditional case?
    Question 2:
    For a series:
    Locals.nValue=(Locals.Compare>5) ? 1 : Locals.nValue
    Locals.nValue=(Locals.Compare<=5)? 2 : Locals.nValue
    Also, is there a way to do NOTHING in the Else? (The folowing was suggested in the TestStand class that I took but
    it doesn't work:
    Locals.nValue=(Locals.Compare>5 ? 1 : NOTHING
    This makes "Locals.nValue" = Nothing and I find that I can't leave the "False" condition blank.
    Mike

    Mike -
    1) You wanted to do something like this:
    Locals.nValue=(Locals.Compare>5) ? 1,Locals.sString = "Yes" : 2, Locals.sString = "No"
    You can do this like this:
    Locals.nValue=(Locals.Compare>5) ? (Locals.sString = "Yes", 1) : (Locals.sString = "No", 2)
    By using the parethesis, the parser assumes that last element in the list is the final value to be "returned".
    2) There is no way to do nothing in a conditional assignment. You wanted to do this:
    Locals.nValue=(Locals.Compare>5 ? 1 : NOTHING
    You have to assign the orginal value back to the target, like this:
    Locals.nValue=(Locals.Compare>5) ? 1 : Locals.nValue
    Scott Richardson (NI)
    Scott Richardson
    National Instruments

  • I have a large numbers spreadsheet and I need to delete a lot of blank rows. Can I do this in one lump sum, or do they have to be deleted singularly ?

    I have a large numbers spreadsheet that I inherited and I need to delete a lot of rows. Can this be accomplished collectively, or does each row have to be deleted one by one ?

    You can delete multiple rows at once.
    Hold down the command key and select the rows (which do not have to be contiguous) by clicking the row numbers on the left, then do this:
    SG

  • Why don't you guys have a phone number so I can talk to someone? I can't summarise this in one sentence!

    I want to have Firefox as an alternative email site on my new smart phone (LG - P930 Android) but according to the phone I need the following info to set this up.
    Is it POP3 or IMAP
    account email address
    Protocol type POP3/IMAP4
    Incoming server - server address
    Secure type - TLS/SSL/off
    Incoming server number
    I have had to sign up with gmail since this is an LG unit but I want to be able to get my Firefox emails on it just like on my laptop.

    Although you access your email through Firefox, your account is actually hosted on someone else's web site. Different email hosts have different policies about whether you can access your mail through an email program, such as the Android email program, or whether you always have to use a browser.

  • HT4571 can i pay this fee one time for one month with no contract or further charges

    if I activate my ipad with internet service by using this method... is it a one time charge, 30 day charge?
    no contract?  I would like to do this on occasion but not on a month to month basis with auto charges...
    help?

    It depends on your carrier; you'll have to ask them. But in the US, it's month-to-month for all three supported carriers, to the best of my knowledge, with automatic renewal; you have to cancel or you get billed automatically the next month.
    Regards.

  • Can I do this?  One external drive, two computers.

    This is what I would like to do. I have an iMac and a MacBook. I use both equally.
    I just got a 250gig FireLite drive.
    My ideal situation would be to have my iTunes music and Library stored on the FireLite, and each computer referencing that.
    So when I am at work with my MacBook, I plug in the FireLite and everything is all good. Then, say, maybe while I am at work, I buy some music on iTunes, or import a CD. Then I go home, and plug in the FireLite to the iMac, and everything is all good. It sees and plays the newly imported music just fine.
    I can switch the drive from computer to computer, and everything is always all good on both machines.
    Is this possible? Nothing would live on the computers....nothing in the User/Music folder. Everything would be on the FireLite.
    It seems like it should work...but before I go moving things around and changing settings, I want to make sure, or else I'll end up with a huge mess later on.
    Thanks!

    Copy your /Music/iTunes folder to the external.
    Start iTunes holding the Option key.
    Select *Choose existing library*.
    Select the iTunes library file in the iTunes folder on the external.
    Delete the /Music/iTunes folder.
    Connect it to the other computer.
    Start iTunes holding the Option key.
    Select *Choose existing library*.
    Select the iTunes library file in the iTunes folder on the external.
    File -> Add to library.
    Select the iTunes music folder in /Music/iTunes/.
    This will add all music from the other computer.
    Delete the /Music/iTunes folder.
    That's it.
    Everything will be available wherever you connect the external.
    Make sure the external is connected, powered on and mounted before starting iTunes.

  • Can i join these sql select statement in one

    Hi All,
    Can i join this two select statement in to one select statement.
    select username from dba_users where username like 'SAP%%%'; # to the Schemaid of the below /BMC/YGO_CPROD.
    select YOP_PRD_NM, YOP_VERS from <schemaid>."/BMC/YGO_CPROD"; # To know a version from the table.
    I am using this in a script can any help to join the above select statements into one.
    Schemaid should be passed to this select YOP_PRD_NM, YOP_VERS from <schemaid>."/BMC/YGO_CPROD"; and i need to get output!
    Thanks a lot

    Are you asking about using the output of one query as the input to the WHERE clause of another?
    If so look at the demos here: http://www.psoug.org/reference/conditions.html
    PS: There is zero value in the construct 'SAP%%%'
    What is it you are trying to do?
    One "%" wildcard is sufficient.

  • Can I do this with .Mac?

    I work at a nonprofit organization with four offices. I would like to use photocasting to make it easy for the other offices to send me photos. But, we only have two .Mac accounts. I'm using one. One computer in each of the other three offices is set up with the other .Mac account.
    I started by setting two of them up on iPhoto and one was able to publish a photocast. I was able to subscribe to it. But the second one didn't work so well. And then both stopped working. I would get a message saying that the photocast did not exist on that .mac account. However when I searched for them in the iDisk they were actually there.
    I'm basically wondering if the problem is just that I can't do this with one .Mac account or if I should be looking for some other problem. If anyone has an idea about this I would appreciate the advice.

    mchavo:
    Set up your Public folder with a user name and password and have the other offices access that folder on your iDisk to upload their photos in folders with appropriate titles to let you know where they came from and the date. The senders could archive the folder of photos, zip them, and send. Might make sending a bit quicker.
    Have you tried emailing or are there too many and too big?
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've written an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • IDVD is producing DVDs which chop the edges off my video.  I have tried changing the aspect ratio between 4:3 and 16:9 but it hasn't helped.  My TV is definitely on the correct settings.  How can I solve this?

    iDVD is producing DVDs which chop the edges off my video.  I have tried changing the aspect ratio between 4:3 and 16:9 but it hasn't helped.  My TV is definitely on the correct settings.  How can I solve this?

    One way to to put the videos into an iDVD slideshow
    and set iDVD's Slideshow preferences to always scale slides to TV Safe Area. 
    However, some users have reported that the audio quality using this method is lessened.  I've not noticed it but then I don't have a good ear when it comes to that sort of thing. If you add more than one video in the same slideshow do not select any transition.
    OT

  • The website recommending that I download Codec Performer opens in a new window about every 10 seconds. How can I stop this?

    A website recommending that I install Codec Performer opens a new window about every 10 seconds. How can I stop this?

    One potential cause of this is an unwanted extension. Try disabling ALL nonessential or unrecognized extensions on the Add-ons page. Either:
    * Ctrl+Shift+a
    * orange Firefox button (or Tools menu) > Add-ons
    In the left column, click Extensions. Then, if in doubt, disable.
    Usually a link will appear above at least one disabled extension to restart Firefox. You can complete your work on the tab and click one of the links as the last step.
    If you are adventurous about installing software from various websites, you may have loaded a bundle that contains some, well, crap. To review recent additions, go to your Windows Control Panel, Uninstall a Program, and click the "Installed on" column heading to bring the most recent items to the top. Remove anything unexpected or unwanted.
    Success?

  • I have an ipad mini. From one moment to another a document that was created and used on pages app ( on the ipad mini) does not want to open ( When pressed it states " document cant be opened). How can I make this document open again?

    I have an ipad mini. From one moment to another a document that was created and used on pages app ( on the ipad mini) does not want to open ( When pressed it states " document cant be opened). How can I make this document open again?
    I have tried back ups and  restoring, resetting, and even updating the pages app. And nothing has worked.

    I have an ipad mini. From one moment to another a document that was created and used on pages app ( on the ipad mini) does not want to open ( When pressed it states " document cant be opened). How can I make this document open again?
    I have tried back ups and  restoring, resetting, and even updating the pages app. And nothing has worked.

  • It just doesn't work and help is needed, hence why I'm on a Forum? Brownie points for whoever can help on this one...

    So. As always, it's about iTunes - as Apple is the most inconvenient corporation ever founded. Anyway! I've had this problem for about 6 months and haven't bothered to ask anyone. I've restored the computer numerous times and tried to fix the issue with help from other nonsensical forums. The problem is that 'apple mobile device service' is eating up a large amount of CPU, and therefore tends to make the computer run like a log. I have uninstalled it before but then iTunes won't recognize my iPod - funnily enough. As well as this, iTunes won't connect to the store? However, it doesn't say it's not, it just doesn't load. It states that it is 'accessing iTunes store', but it's not. I'm running all of this on a windows 7 Acer extensa 5235 - just in case that helps. It probably won't, but you guys are clever, right? I mean, I could probably ask you to peel an orange for me, and you'd do it without even physically touching it. Just with the power of your omnipotent minds. Anyway yeah, if anyone can help on this one, would be much appreciated.

    Wow what a rambling mess and complete waste of time.
    Did you try a search of the forums for similar issues?  Doing so would have revealed multiple similar issues with valid troubleshooting, saved you time, and saved those that have read that crap from being subject to your rambling psychosis.
    FYI, in the future, get to the point and cut the crap when asking for help.
    Oh, completely uninstall iTunes and reinstall the current version of iTunes.

Maybe you are looking for

  • How can I create an internal space from the border in every cell in a table?

    How can I create an space between the text contents and the border inside in every cell in a table in Pages?

  • Sos Grid Control install on RedHat as4

    oms configuration error message: Applying of patch /home/oracle/OracleHomes/oms10g/install/oneoffs/p4620348_101210_LINUX.zip completed successfully INFO: Configuration assistant "EM Technology Stack Upgrade" succeeded INFO: Command = oracle.sysman.em

  • Activation Windows des serveurs DMZ via KMS

    Bonjour tout le monde, On dispose de 3 serveurs KMS pour l'activation des OS et office des serveurs et postes de travail se trouvant dans le réseau LAN et je voudrais savoir comment faire pour activer aussi les serveurs figurant dans la DMZ via ces s

  • Progress Billing Invoices in OM with Project Reference ?

    Hello Guys, Can anyone help me on this Question, Version - > 11i Sales Company -> Different OU and LE. Manufacturing Plant -> Different OU and LE. Billing from OM to AR. Their will be progress billing invoices generated from manufacturing plant agani

  • Harmonize lead vocal Routing Midi with Antares Harmony Engine Evo

    After a long day researching and NOT getting the job done... I need correct midi routing instructions to get Antares Harmony Engine Evo to play 2 different midi harmony tracks: i.e., one on track 7 and one on track 8 wince I couldn't get any of the '