What is wrong with select? rownum, unique

SELECT o FROM ( SELECT UNIQUE(OWNER) AS o, ROWNUM AS the_row_num FROM all_tables) WHERE the_row_num BETWEEN 1 and 3;
I wanted to have unique values from owner column from 1 to 3 (there are more unique values there).

The UNIQUE applies to the entire column list - not just owner.
One way:
select o
  from (select unique owner as o
          from all_tables
         order by owner)
where rownum <= 3;If you want to get rows x to y based on some order instead of just the first three, then:
http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:127412348064

Similar Messages

  • Can't perceive what's wrong with SELECT.

    Hello,
    I've executed this select -
    select *
    from tax.tax_payer@reis tp
    left outer join re_right@reis r on (tp.tin = r.tin or tp.tin = r.tin_a1 or tp.tin = r.tin_a2)
    where (r.right_status = -1 or r.right_status is null)
    --and r.right_id is not null
    and tp.je_id = 12;
    As a result, I've gotten an error message -
    ORA-00933: SQL command not properly ended.
    It is curious, that if I remove comment from the last but one line, the select has bee succesfully done -
    select *
    from tax.tax_payer@reis tp
    left outer join re_right@reis r on (tp.tin = r.tin or tp.tin = r.tin_a1 or tp.tin = r.tin_a2)
    where (r.right_status = -1 or r.right_status is null)
    and r.right_id is not null
    and tp.je_id = 12;
    What's wrong?
    P.S. Oracle 10.2.0.1.0

    Hi,
    As Preta has said above, Everything seems to be correct.
    Can you check like this
    First run the following
    select count(0)
    from tax.tax_payer@reis tp
    left outer join re_right@reis r on (tp.tin = r.tin or tp.tin = r.tin_a1 or tp.tin = r.tin_a2)
    where (r.right_status = -1 or r.right_status is null)If ths above is ok then try
    select count(0)
    from tax.tax_payer@reis tp
    left outer join re_right@reis r on (tp.tin = r.tin or tp.tin = r.tin_a1 or tp.tin = r.tin_a2)
    where (r.right_status = -1 or r.right_status is null)
    and r.right_id is not nulland then
    select count(0)
    from tax.tax_payer@reis tp
    left outer join re_right@reis r on (tp.tin = r.tin or tp.tin = r.tin_a1 or tp.tin = r.tin_a2)
    where (r.right_status = -1 or r.right_status is null)
    and r.right_id is not null
    and tp.je_id = 12This will tell you where you may be missing something.
    Cheers!!!
    Bhushan

  • What's wrong with my select?

    Hi! What's wrong with my select? The message I got is:
    "("has no closing ")"
    SELECT SINGLE iclclaim~claim
         INTO os_namir_stabi-claim
         FROM ( ( iclclaim
        INNER JOIN iclpoloau
          ON iclpoloauclaim = iclclaimclaim
        CLIENT specified
         WHERE iclclaim~client   = c_client1
         AND   iclpoloau~client   = c_client1
         AND iclpoloau~plateno = is_namir_stabi-plateno
         AND iclclaim~dateloss = is_namir_stabi-dateloss )
         INNER JOIN iclpartocc
          ON iclpartoccclaim = iclpoloauclaim
        CLIENT specified
         WHERE iclpartocc~client   = c_client1
           AND iclpartocc~bpartner = gv_bpartner ) .

    Please try it like this.  I'm pretty sure that you can not format your inner join with multiple where clauses.
    SELECT SINGLE iclclaim~claim
    INTO os_namir_stabi-claim
    FROM  iclclaim
          INNER JOIN iclpoloau
            ON iclpoloau~claim = iclclaim~claim
         INNER JOIN iclpartocc
            ON iclpartocc~claim = iclpoloau~claim
         WHERE iclclaim~client = c_client1
           AND iclclaim~dateloss = is_namir_stabi-dateloss
           AND iclpoloau~client = c_client1
           AND iclpoloau~plateno = is_namir_stabi-plateno
           and iclpartocc~client = c_client1
           AND iclpartocc~bpartner = gv_bpartner  .
    Regards,
    Rich Heilman

  • After upgrade my Iphone 4 to iso5, I can't add contact and I can't access the settings for mail,contacts and calender. The moment I select the setting for Mails, Contact and Calender it will jump back to home. Can someone advice what's wrong with it?

    After upgrade my Iphone 4 to iso5, I can't add contact and I can't access the settings for mail,contacts and calender. The moment I select the setting for Mails, Contact and Calender it will jump back to home. Can someone advice what's wrong with it?Problr

    Dear All
    i have done the same activity ( buy a new iphone 4 -> upgrade to ios5 - > configure email) with success-
    than when i start to move the contacts from old mobile to iphone (using the microsim) i receive the same crash
    in disgnosis e use i saw 2 dump with this title 'latestCrash-Preferences.plist and LatestCrash.plist. in each file the date is the same and i read:
    Exception Tyle: EXC_CRASH (SIGABRT)
    Exception code: 0x00000000, 0x00000000
    Chrashed Thread: 6
    in thread 6: name: Dispatch queue:
    com.apple.addressBookUI.ContactsSettingPlugin
    and thaan a lot of data.
    Have you any idea?
    thank in advance
    Fabio

  • Trouble with calculating fields. Can't select (check) fields. Also can't figure out what's wrong with a division field (percent) that I created. Keep getting the pop up that format of the field doesn't allow blah blah blah... Help!

    Trouble with calculating fields. Can't select (check) fields. Also can't figure out what's wrong with a division field (percent) that I created. Keep getting the pop up that format of the field doesn't allow blah blah blah... Help!

    1. Use the mouse to select the field and then press the space bar.
    2. A null string is the same as zero. What is the result for division by zero?

  • Apple TV3 doesn't start automatically when i select airplay from my iMac and Ipad 3. i have to manually turn it on then it works fine after that! what is wrong with which setting.

    Apple TV3 doesn't start automatically when I select airplay from my iMac (Yosemite) and Ipad 3( iOS 8.1.3) i have to manually turn it on then it works fine after that! what is wrong with which setting.

    You need to re install OSX. If you have the dmg file downloaded via torrentz this is how you can create a bootable external HD or Flash drive (8 GB+)
    https://discussions.apple.com/message/23957654#23957654
    Peace
    Harry

  • What is wrong with as3

    this is not a question about 'how i do X'. is rather a 'discussion' (flame or whatever, but to defend or argue about aspects, not people) about 'what is wrong with as3' and what aspects whould be taken into consideration for updates. right now i am using as3, and since i paid for this license, i choose this tool over some alternatives and i am using it to do stuff for other people who pay me to do it, i think it can be helpful for all of us if some actions are started in the right direction. i have already posted about 'all people in adobe are dumbasses that do not know how to make a scripting tool and are messing up my work', but i was pissed at the time (i still am pissed) but i believe this is not the right aproach. instead, if this goes to the right people in adobe, we all may get something in the future, like better and easier todo apps and web presentations.
    pre: not only about the as3 specification, but COMPLY with the specification that you set. for example, some time ago there were problems with matrix transforms. this was corrected later with a patch. but this means it is not even doing what is is supposed to do
    1. scriptable masks and movement, sprites and child sprites: there is a sprite with a mask, the mask is a shape drawn via script, something like
    somemask=new shape();
    somemask.graphics.beginfill();
    (...etc)
    somesprite.mask=somemask;
    just like that. now add some child sprites to 'somesprite', and make 'somesprite' move, scale and rotate. there you will have something like a kaleidoscope, but not what you expected to do with your script. as the child sprites move in the parent mask, you will see that the child sprites appear or dissapear kind of randomly, and if the child sprites are textfields, it may be that the text is rendered outside the mask, or partially rendered outside the mask (as in only part of the text), rendered with the wrongf rotation or in the wrong place. some child sprites are clipped correctly, some dissapear totally when only a part should dissapear (clipped) etc.
    way around: have not tried it yet, but i have the impression that bitmaps have different criteria for clipping, so i am thinking of trying this: appli an empty filter (a filter with params so it does not have any effect on the sprite or in the textfield) so the sprite is rendered as bitmap before doing anything else with it. as i said, i have not done it yet, but it may be a way around this problem, to avoid all this inconsistency with clipping
    1-b. inconsistency between hierarchy and coordinates, specially masks: you apply a mask to a sprite, yet the sprite has a set of coordinates (so 'x' in the sprite means an x relative to its container), yet the mask applied to the very same sprite, as another reference as reference for coordinates (like the stage)
    2. painting via script: in any other languaje, in any other situation, something like:
    beginFill(params);
    (...stuff 1)
    endFill();
    beginFill(params);
    (...stuff 2)
    endFill();
    (...etc)
    means: render region of block 1, then render region of block 2 etc, and no matter what, it should be consistent, since there is noplace for ambiguity. if you read it, you may think what that means, even if you dont run it you may have an idea of the picture you want to draw, but not with as3. as3 somehow manages to screw something that simple, and mixes all the blocks, and somehow uses the boundaries of one block as boundaries for other block. is like all blocks are dumped into whatever, and then uses all lines defined into it as boundaries for a unique block. it changes all boundaries and generates inconsistency between what is shown and redraw regions of the resulting picture, like lines that go to the end of the screen and then dont go away in the next frames, even tough the beginfill endfill block should prevent it
    3. event flow: i dont know what was the policy behind as3 event flow design. it is in no way similar or an extension to previous event flow, neither with any event flow in any other plattform. i dont know how most people start with as3; in my case, i unpacked, installed and when i tried to do something with what i already knew i could not, so i started reading the as3 docs, and since is like 800 pages long, i just read the basics and the rest i would 'wing it'. in the part of the event flow, there was something about bubbling and stuff, it was not clear at all and when i tried to do what is was said in the documentation (like preventing events to 'bubble', as is called in the documentation), i could not see any effect but i could see it was a mess. flash is not the only thing out there to work with pictures or to work with mouse events, but is the only one that deals with things like 'target' and 'currentTarget'. my first experience on needing this was when i was dealing with my own event handlers (so the only thing that had control over mouse was the stage, and i would admin everything via script). there were events generated everywhere, the stage got events that were not genrated directly over the stage, but got there not with stage coordinates but the coordinates relative to the sprite that generated the event. so if i hover the mopuse over the stage, and the stage has some things on it how does it work? i get multiple event calls, like it was hovering multiple times over the stage in a single frame, but in each call with different coordinates? and what if i set all child sprites as mouseenabled=false or compare like 'if (event.target != event.currenttarget)', what if i move the mouse over a child, does it prevent the move mouse event at all? or does it filter only the event call with only stage coordinates? in my case, every time i move over another clip (with mouseenabled = true), the stage gets it as 'mouse up', even tough there was never a mouse release, what the hell? do even the people at adobe know how to handle events with their own tool when they require it? why does an event 'bubble' when i have not specifically tell it to do it? mi thought is that this event flow was very poorly conceived, and tough the intention may have been that there were different cases and it shopuld cover all cases, they actually introduced new problems that were not present in traditional ways to handle it, and it is neither the easier way to handle things, and this way, a very simple problem turns into a very ugly thing because it must handle things that were not neccesary to handle, or were implicit in other situations.
    4. legacy: since as3, all interaction is different, and if you want to do things in the new plattform, using the new features, what you already knew just goes to the garbage can. when a new tool arrives, it should be an extension to previous tools (which is a reason to update instead of just buying a new tool from a different vendor). if everything i had or knew just means nothing from now on, then i can not say 'i know flash script', and my previous knowledge gives me no advantage when aproaching the new version. as3 is a new aproach that requires doc reading and stuff, even if you knew something about previous as specifications or other oo languajes. if you decide to change things from now on, like the things mentioned in this post, instead of just throwing away everything the users alerady knew about the tool, do like in java releases, they mark some things as 'deprecated', they keep working as they should, give a warning, but also a message saying this feature is deprecated, we suggest you use this library instead.
    5. lack of previous functionality: if you 'update' something, it meand all previos functionality is still there (probably improved, but not with bugs if it was working fine), plus something else. now it seems backwards, there are some things that could be done in previous versions but not in this one, like 'duplicatemovieclip'
    6. inconsistency with scripting/programming paradigms: (ok, fancy work, but fits perfectly here): as3 proposed ways to handle things, but the people who designed it got 'too creative', and they did something that is not consistent neither with previous versions of as or with other languajes. the documentations is full of things like 'it looks like x languaje or languaje family, but instead of using XXX word, you must use YYY'. great, what is this? namespaces 'work like', but 'differently' for example from java, .net, .c. its got the idea that a namespace means a grouped functionality but there are rules about where should be placed the file (ok, java has this also, .net takes care of it automatically if all files are registered in the project), but what you got is a mess that 'if you know other languajes you got the general idea, but nonetheless, even if you knew this or previosu versions of as, you still have to read whatever we decided arbitrarily just to be different'. namespaces, event handling, vars definition which is not like previous scripting neither like fully typed languajes.. is just a mess.
    7. lack of scripting and graphics integration: unlike flash and adobe tools that just got on the graphics side leaving all the scripting integratuion apart, most tools from other vendors integrate very well interacton with what is on the screen. the script editor: very poor. autocompletion? a drop down list that does not heklp at all, appears in the wrong places, and when you need it to go, it does not go (so if i want to move away from the uncalled drop down list, i have to click somewhere else, making developement slowewr instead of helping, so the drop down list does not capture all events when i dont want to). in other ides you double click somewhere and it will go to the part of code relevant to that event or whatever. for example microsoft tools, ok i am antimicrosoft, and one of the reasons was that when windows 95 got to market proposing itself as the ONLY pc os you could use if you wanted to keep useing the apps you already had, it was a lousy product full of flaws but you had to keep using it because you had no choice. what is so different from what is happening with flash just now? yet the ide of c# is awesome, works very well and seems reliable.
    adobe people: not all user are designers that just make pretty pictures. if it is not intended for scripting then why is it there. and if there are corrections to be done, they should patch all versions, not only the last one. previous version users also paid for their versions.

    Well, there is no point in arguing.
    I personally believe AS3 does exactly what it promises to do within limits (read: reasonable limits) of ECMA type of language. And sometimes it doesn’t do what we expect it to for it cannot possibly emulate everyone’s thinking process. The task, I guess, is to learn to think in terms of AS3 – not to try to make AS3 think like us. No language covers all the grounds. And no, it is not Java - with no negative or positive connotation. It is what it is. Period. I just hope that AS5 will be more Java like.
    You are right about the fact that it is not necessary to know all the aspects of language in order to perform the majority of tasks. But it is paramount to have a clear idea about such fundamental concepts as display list model and events. For instance, depth swap has no meaning in terms of AS3 because display list object stacking is controlled automatically and there is no need for all these jumping through hoops one has to perform in order to control depth in AS2. There no more gaps in depths and one always know where to find things.
    Similarly, there is no point in having duplicateMovieClip method. More conventional OOP ways of object instantiation accomplishes just that and much more. Just because OOP object instantiation needs to be learned doesn’t mean past hacks have place in modern times. duplicateMovieClip is a horse carriage standing next to SUV. What one should choose to travel?
    Events are implemented to the tee in the context of ECMA specifications. I consider Events model as very solid, it works great (exactly as expected) and never failed me. True, it takes time to get used to it. But what doesn’t?
    By the way, speaking about events, contrary to believe in Adobe’s inconsideration to their following. Events are implemented with weakly reference set to false although it would be better to have it set to true. I think this is because there are smart and considerate people out there who knew how difficult it would be for programming novices to deal with lost listeners.
    I think AS3 is million times better than AS2. And one of the reasons it came out this way is that Adobe made a very brave and wise decision to break totally loose from AS2’s inherent crap. They have created a totally new and very solid language. If they had tried to make it backward compatible – it would be a huge screw up, similar to how our friends at Microsoft are prostituting VB and VBA – extremely irritating approach IMHO.
    Also, Flash legacy issues shouldn’t be overlooked. Flash did not start as a platform for programmers. Entire timeline concept in many ways is not compatible with the best OOP practices and advancements. I think for anyone who is used to writing classes the very fact of coding on timeline sounds awkward. It feels like a hack (and AS2 IS a pile of hacks) – the same things can be nicely packaged into classes and scale indefinitely. As such I wouldn’t expect Adobe to waste time on hacking timeline concept issues by making smarter editor. They have made a new one – FlexBuilder – instead. Serious programmers realize very soon that Flash IDE is not for developing industrial strength applications anyway. So, why bother with channeling great minds into polishing path to the dead end?
    I would like to state that all this is coming form a person who knew Flash when there was no AS at all. And I applaud every new generation of this wonderful tool.
    I believe Adobe does a great job making transition from timeline paradigm to total OOP venue as smooth as possible. And no, they don’t leave their devoted followers behind contrary to many claims. They are working on making developing Flash applications as easy as possible for people of all walks. Welcome Catalyst!
    Of course there is not enough information about AS3 capabilities and features. But, on the other hand, I don’t know any area of human kind activities that does.

  • What is wrong with my Macbook Pro? (distorted screen, beeping, slow)

    I have a late 2012 Macbook Pro (13-inch) that I got from Best Buy. It worked perfectly fine for a year, but then went crazy.
    First, it started shutting down here and there, and icons bounced a lot in the dock. Then, one day, I googled something and it froze, then flashed a strip of multicolored barcode-like lines. So, I shut it down and it overheated then began to beep 3 times and flash a light.
    I brought it in and they just wiped the hard drive. Then, it happened again while I was watching a video only a short time later. I was going to re-seat the RAM myself but the inside of the computer looked all messed up. I took it in and they gave me a new LCD but it has a dead pixel now. It worked fine for 1 month after that.
    Then, I was using the laptop on my bed and it shut off randomly a couple of times while I was on Facebook and started beeping. I rebooted it and tried to fix it but it happened again the next day. I brought it back to Best Buy and they said it was hot and sold me a $20 cooling pad.
    That worked for a few days, then I was watching TV online and it happened again. I brought it back to Best Buy and they replaced the RAM. Now, I was watching something online and it happened yet again. I was able to reboot and it worked okay now for a couple of hours but it did freeze again and I had to shut it down.
    Everytime I go to Best Buy, they tell me "If we have this issue 1 more time, we will replace your computer." But, then, they say the same thing every time and that it's their policy. I have paid for Office now and only have 1 download left. Also, this is ridiculous because I'm a student and I've had my Mac gone for 2 weeks at a time at least 3 or 4 times. When this happens, I get stuck using my iPad and can't use flash so I've spent tons of money of apps for flash and other things to make my iPad functional.
    Can somebody just tell me what's wrong with it? It "passes the hardware test" every time and the Geek Squad keeps asking me stupid questions like "Did you check your internet connection and reset your modem?" When I asked them the first time to do a PRAM test, they didn't know what that was and asked me to go on iTunes or clear my cache or something like that.
    I have had a bad experience with them altogether. I got my Macbook for $500 because I had a PC before that I paid $700 for and it eventually broke. They were unable to repair that one because the hard drive had failed, although they had previously been convinced that I needed to uninstall my Norton to fix that problem.
    Sorry if I'm ranting, but my Macbook is like a child to me (not to sound weird) and I'm sick of this problem. It's working fine at the moment but I know this will happen again randomly like always.

    If you're able to boot, launch the Console application by entering the first few letters of its name into a Spotlight search, and select the most recent panic log under "System Diagnostic Reports." Post the contents -- the text, please, not a screenshot. For privacy’s sake, I suggest you edit out the “Anonymous UUID” and "Kernel UUID," two long strings of letters, numbers, and dashes in the header and body of the report. Please don't post "shutdownStall" or "hang" reports.
    If you can't boot in the usual way, try a safe boot. The instructions provided by Apple are as follows:
    Be sure your Mac is shut down.
    Press the power button.
    Immediately after you hear the startup tone, hold the Shift key. The Shift key should be held as soon as possible after the startup tone, but not before the tone.
    Release the Shift key when you see the gray Apple icon and the progress indicator (looks like a spinning gear).
    During startup, you will see "Safe Boot" on the login screen, which appears even if you normally log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Safe mode is slower than normal, and some things won’t work at all, including your login items.

  • What's wrong with this function

    What's wrong with this Function(PL/SQL) in this formaula column definition in Reports 6i
    function currdateFormula return Date is
    curr_date date;
    begin
    select to_char(sysdate, 'DD-MM-YYYY') into curr_date from dual;
    return(curr_date);
    end;
    I get the following error in compiling
    REP-1401. 'currdateformula'.Fatal PL/SQL error occured. ORA-01843 not a valid month.
    The SQL select to_char(sysdate, 'DD-MM-YYYY') from dual; worked well in SQL Plus prompt.
    I got a clean compile when i use just sysdate in the function (see below).
    function currdateFormula return Date is
    curr_date date;
    begin
    select sysdate into curr_date from dual;
    return(curr_date);
    end;
    Appreciate your help
    Raja Lakshmi

    hello,
    what you are trying to do :
    fetch the current date and return it as the result of the formula-column.
    what you are actually doing :
    fetch the current date, convert it to text, assign this text to a date-variable which causes an implicit type-conversion.
    in your case you create a date-string with the format dd-mm-yyyy. the implicit conversion then tries to convert this string back to date using the NLS settings of your session. depending on your NLS_LANG and NLS_DATE_FORMAT this might work, if your session-date-format is dd-mm-yyyy which obviously it is NOT as you get the error.
    what you should do :
    select sysdate into curr_date from dual;
    this fetches the sysdate and stores it in your date-variable. there is no type conversion needed what so ever.
    regards,
    the oracle reports team

  • What's wrong with the regular expression?

    Hi all,
    For the life of me I can not figure out what is wrong with this regular expression
    .*\bA specific phrase\.\b.*
    This is just an example the actual phrase can be an specific phrase. My problem comes when the specific phrase ends in a period. I've escaped the period but it still gives me an error. The only time I don't get an error is when I take off the end boundry character which will not suffice as a solution. I need to be able to capture all the text before and after said phrase. If the phrase doesn't have a period it would look like this...
    .*\bA specific phrase\b.*
    which works fine. So what is it about the \.\b combination that is not matching?
    I've been banging my head on this for a while and I'm getting nowhere.
    The application highlights text that comes from a server. The user builds custom highlights that have some options. Highlight entire line, match partial word, and ignore case. The code that builds my pattern is here
    String strHighlight = _strHighlight;
            strHighlight = strHighlight.replaceAll("\\*", "\\\\*");
            strHighlight = strHighlight.replaceAll("\\.", "\\\\.");
            String strPattern = strHighlight;
            if(_bEntireParagraph)
                if(_bPartialWord)
                    strPattern = ".*" + strHighlight + ".*";
                else               
                    strPattern = ".*\\b" + strHighlight + "\\b.*";           
            else
                if(_bPartialWord)
                    strPattern = strHighlight;
                else               
                    strPattern = "\\b" + strHighlight + "\\b";  
            if(_bIgnoreCase)
                _patHighlight = Pattern.compile(strPattern, Pattern.CASE_INSENSITIVE);
            else
                _patHighlight = Pattern.compile(strPattern);So for example I matching the phrase: The dog ate the cat. And that phrase came over in the following text: Look there's a dog. The dog ate the cat. "Oh my!"
    And my user has the entire line and ignore case options selected then my regex woud look like this: .*\bThe dog ate the cat\b.*
    That should get highlighted, but for some reason it doesn't. Correct me if I'm wrong but doesn't the regex read as follows:
    any characters
    word boundry
    The dog ate the cat[period]
    word boundry
    any characters until newline.
    Any help will be much appreciated

    A word boundary (in the context of regexes) is a position that is either followed by a word character and not preceded by one (start of word) or preceded by a word character and not followed by one (end of word). A word character is defined as a letter, a digit, or an underscore. Since a period is not a word character, the only way the position following it could be a word boundary is if the next character is a letter, digit or underscore. But a sentence-ending period is always followed by whitespace, if anything, so it makes no sense to look for a word boundary there. I think, instead of \b, you should use negative lookarounds, like so:   strPattern = ".*(?<!\\w)" + strHighlight + "(?!\\w).*";

  • What's wrong with this SQL?

    what's wrong with this SQL?
    Posted: Jan 16, 2007 9:35 AM Reply
    Hi, everyone:
    when I insert into table, i use the fellowing SQL:
    INSERT INTO xhealthcall_script_data
    (XHC_CALL_ENDED, XHC_SWITCH_PORT, XHC_SCRIPT_ID, XHC_FAX_SPECIFIED)
    VALUES (SELECT TO_DATE(HH_END_DATE||' '||HH_END_TIME,'MM/DD/YY HH24:MI:SS'), HH_SWITCHPORT, HH_SCRIPT,'N'
    FROM tmp_healthhit_load WHERE HH_SCRIPT !='BROCHURE' UNION
    SELECT TO_DATE(HH_END_DATE||' '||HH_END_TIME,'MM/DD/YY HH24:MI:SS'), HH_SWITCHPORT, HH_SCRIPT,'N' FROM tmp_healthhit_load WHERE HH_SCRIPT !='BROCHURE');
    I always got an error like;
    VALUES (SELECT TO_DATE(HH_END_DATE||' '||HH_END_TIME,'MM/DD/YY HH24:MI:SS'), HH_SWITCHPORT,
    ERROR at line 3:
    ORA-00936: missing expression
    but I can't find anything wrong, who can tell me why?
    thank you so much in advance
    mpowel01
    Posts: 1,516
    Registered: 12/7/98
    Re: what's wrong with this SQL?
    Posted: Jan 16, 2007 9:38 AM in response to: jerrygreat Reply
    For starters, an insert select does not have a values clause.
    HTH -- Mark D Powell --
    PP
    Posts: 41
    From: q
    Registered: 8/10/06
    Re: what's wrong with this SQL?
    Posted: Jan 16, 2007 9:48 AM in response to: mpowel01 Reply
    Even I see "missing VALUES" as the only error
    Eric H
    Posts: 2,822
    Registered: 10/15/98
    Re: what's wrong with this SQL?
    Posted: Jan 16, 2007 9:54 AM in response to: jerrygreat Reply
    ...and why are you doing a UNION on the exact same two queries?
    (SELECT TO_DATE(HH_END_DATE||' '||HH_END_TIME,'MM/DD/YY HH24:MI:SS') ,HH_SWITCHPORT ,HH_SCRIPT ,'N' FROM tmp_healthhit_load WHERE HH_SCRIPT !='BROCHURE' UNION SELECT TO_DATE(HH_END_DATE||' '||HH_END_TIME,'MM/DD/YY HH24:MI:SS') ,HH_SWITCHPORT ,HH_SCRIPT ,'N' FROM tmp_healthhit_load WHERE HH_SCRIPT !='BROCHURE');
    jerrygreat
    Posts: 8
    Registered: 1/3/07
    Re: what's wrong with this SQL?
    Posted: Jan 16, 2007 9:55 AM in response to: mpowel01 Reply
    Hi,
    thank you for your answer, but the problem is, if I deleted "values" as you pointed out, and then execute it again, I got error like "ERROR at line 3:
    ORA-03113: end-of-file on communication channel", and I was then disconnected with server, I have to relogin SQLplus, and do everything from beganing.
    so what 's wrong caused disconnection, I can't find any triggers related. it is so wired?
    I wonder if anyone can help me about this.
    thank you very much
    jerry
    yingkuan
    Posts: 1,801
    From: San Jose, CA
    Registered: 10/8/98
    Re: what's wrong with this SQL?
    Posted: Jan 16, 2007 9:59 AM in response to: jerrygreat Reply
    Dup Post
    jerrygreat
    Posts: 8
    Registered: 1/3/07
    Re: what's wrong with this SQL?
    Posted: Jan 16, 2007 10:00 AM in response to: Eric H Reply
    Hi,
    acturlly what I do is debugging a previous developer's scipt for data loading, this script was called by Cron work, but it never can be successfully executed.
    I think he use union for eliminating duplications of rows, I just guess.
    thank you
    jerry
    mpowel01
    Posts: 1,516
    Registered: 12/7/98
    Re: what's wrong with this SQL?
    Posted: Jan 16, 2007 10:03 AM in response to: yingkuan Reply
    Scratch the VALUES keyword then make sure that the select list matches the column list in number and type.
    1 insert into marktest
    2 (fld1, fld2, fld3, fld4, fld5)
    3* select * from marktest
    UT1 > /
    16 rows created.
    HTH -- Mark D Powell --
    Jagan
    Posts: 41
    From: Hyderabad
    Registered: 7/21/06
    Re: what's wrong with this SQL?
    Posted: Jan 16, 2007 10:07 AM in response to: jerrygreat Reply
    try this - just paste the code and give me the error- i mean past the entire error as it is if error occurs
    INSERT INTO xhealthcall_script_data
    (xhc_call_ended, xhc_switch_port, xhc_script_id,
    xhc_fax_specified)
    SELECT TO_DATE (hh_end_date || ' ' || hh_end_time, 'MM/DD/YY HH24:MI:SS'),
    hh_switchport, hh_script, 'N'
    FROM tmp_healthhit_load
    WHERE hh_script != 'BROCHURE'
    UNION
    SELECT TO_DATE (hh_end_date || ' ' || hh_end_time, 'MM/DD/YY HH24:MI:SS'),
    hh_switchport, hh_script, 'N'
    FROM tmp_healthhit_load
    WHERE hh_script != 'BROCHURE';
    Regards
    Jagan
    jerrygreat
    Posts: 8
    Registered: 1/3/07
    Re: what's wrong with this SQL?
    Posted: Jan 16, 2007 11:31 AM in response to: Jagan Reply
    Hi, Jagan:
    thank you very much for your answer.
    but when I execute it, I still can get error like:
    ERROR at line 1:
    ORA-03113: end-of-file on communication channel
    so wired, do you have any ideas?
    thank you very much

    And this one,
    Aother question about SQL?
    I thought I already told him to deal with
    ORA-03113: end-of-file on communication channel
    problem first.
    There's nothing wrong (syntax wise) with the query. (of course when no "value" in the insert)

  • What is wrong With My Query

    Pleas what is wrong with this query
         select h.business_unit_id bu, h.edi_sequence_id seq, d.edi_det_sequ_id dseq, s.edi_size_sequ_id sseq, h.po_number po, h.total_unit tUnit, h.total_amount tDollar, s.quantity qty, s.unit_price price,
    (select (case when count(*) = 0 then 'N' else 'Y' end)
    from(select s.business_unit_id, s.edi_sequence_id, s.edi_det_sequ_id, s.edi_size_sequ_id
    from sewn.nt_edii_purchase_size s
    where s.business_unit_id='01'
    and s.edi_sequence_id = '168420'
    and (s.edi_sequence_id, s.edi_det_sequ_id, s.edi_size_sequ_id) not in
    (select edi_sequence_id, edi_det_sequ_id, edi_size_sequ_id
    from sewn.nt_edii_po_det_error
    where business_unit_id = '01'
    and edi_sequence_id='168420'
    and error_code in(select error_code
    from sewn.nt_edii_error_codes
    where severity='CR'))))eligible
    from sewn.nt_edii_purchase_size s, sewn.nt_edii_purchase_det d,
    sewn.nt_edii_purchase_hdr h
    where h.business_unit_id = '01'
    and h.edi_sequence_id = '168420'
    and h.business_unit_id = d.business_unit_id
    and h.edi_sequence_id = d.edi_sequence_id
    and d.business_unit_id = s.business_unit_id
    and d.edi_sequence_id = s.edi_sequence_id
    and d.edi_det_sequ_id = s.edi_det_sequ_id
    group by h.business_unit_id, h.edi_sequence_id, d.edi_det_sequ_id,
    s.edi_size_sequ_id,h.po_number, h.total_unit, h.total_amount, s.quantity,s.unit_price

    Never mind, I got it working

  • What is wrong with my nokia e72!!!???

    Hi I recently purchased the e72 it's really nice but it has so many problems! I am clueless on what to do! Can anyone help me please!
    1) My phone dose not upgrade each time it says it failed to install.
    2) When I select the ovi store application on my phone it just does not work.
    3) I go on the ovi store online and I try to download apps it either says the certificate I am getting is too old but I still accept it. And when I do accept to download it just fails.
    4) The gps is just not working every time I connect it to my pc it gives me this error saying i have to disconnect my phone enter maps quit maps and then connect my phone to the computer again. But it keeps giving me the same error and asking me to repeat the steps.
    5) And every time I try to do anything regarding nokia it keeps saying it is giving me a certificate that is out of date.
    Can someone please help me I really don’t know what is wrong with my phone I haven’t done anything to it it's the first time this has happened to me with any nokia device.

    Right on!! Am enjoying my Lumia 900 and looking foward to a 920 later on this year! I find the windowsphone os quick, clean & easy to use and the multi size live tiles ( 7.8 ) make the interface way more innovative & attractive than the dreary grid of icons of the bloated android & overpriced and overrated Ios! although I buy my phones for my own use & satisfaction whenever I use it in company the appearance always brings interest & positive comment. Windowsphone is a "young" os and will hopefully go on to get smarter & better. Yes the tight control that microsoft keep over it causes a few limitations - but if u can't live with that don't buy it! Presumably anyone buying a top range smartphone does at least a little research first! Personally im happy that there's no danger of my handset being killed by a virus, I bought a windowsphone coz having looked around - thats what I wanted and the only handset i'll swap my 900 for will be a 920!!

  • What is wrong with my font? Squares instead of letters - Help!

    Can someone tell me what is wrong with my system font? Everytime I need to put my administrator key the login page will appear but with weird glitched font of squared A's all around (see picture).  I can't recall that I have done any installations that would mess with it.
    Any help greatly appreciated.
    Regards,
    Bart

    You have a bad System Font.
    "Try Disk Utility
    1. Insert the Mac OS X Install disc, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu at top of the screen. (In Mac OS X 10.4 or later, you must select your language first.)
    *Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.*
    3. Click the First Aid tab.
    4. Select your Mac OS X volume.
    5. Click Repair Disk, (not Repair Permissions). Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214
    Then try a Safe Boot, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it completes.
    (Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive.)
    If perchance you can't find your install Disc, at least try it from the Safe Boot part onward.
    Once Disk Reports OK, reinstall the OS.

  • What is wrong with my shipping address? I want to order pictures via apple store with iPhoto. Apple Id and payment seem ok. My current and correct shipping address appears with red letters. Why and what to do?

    What is wrong with my shipping address? I want to order pictures via apple store with iPhoto. Apple Id and payment seem ok. My current and correct shipping address appears with red letters. Why and what to do?
    Maybe this is relevant: I bought iphoto from the German apple store but I now live in Italy. I have tried German credit card with German invoicing address and Italian shipping address. And I have tried Italian credit card with Italian invoicing address and Italian shipping address. The phenomenon is the same: shipping address appears in red and I am asked to fill in the mandatory fields (which turn red whatever I enter).

    KarinavD,
    what is the setting for the Print Products Store in the Advanced Tab of the iPhoto Preferences?
    The country you select there has to match the billing address. And your billing address should match the country of your AppleID and credit card used with the AppleID.
    Regards
    Léonie

Maybe you are looking for

  • Why does it take soooooooo long to update ??

    Hi there ,,, am not sure is it only me ? or the same with all ?? i have N80 , every time - not once or twice - but every time i attend to update my phone`s s/w it takes me almost 2 - 3 hours at least to finish the prossess , although i`m using a high

  • How to fade image into background?

    I am trying to achieve this in photoshop: http://www.quantunet.com/fireworksstudio8/skills/samples/fading_image_background_color.htm l How can I do this with photoshop CS4 for a website's background I am creating...?

  • Objects Identification

    Hi Gurus, I am having trouble idetifying source of some of the keyFigures. Can someone help finding R/3, APO datasources or source tables and relavant Infosources or Infoobject. Stock: Target days of supply On hand On Hold Reserved Mortgaged Shipment

  • ADF mobile: Reuse taskflows for different device models (resolutions) ?

    Hi, ADf 11.1.2.3.0 + mobile extension. What's best practice to create the same mobile app for different device models (= different screen resolutions = different layout)? I mean an app on a smartphone may use different gui components and layout than

  • Using shift key to constrain proportions while scaling

    I notice that using the shift key doesn't currently constrain proportions when scaling objects. This is pretty standard behaviour in graphics apps and it would be good to have this included in Muse. There seems to be nowhere to manually enter a scale