What wrong with this sql?
What wrong with my sql? When I try to run a plain explain command against it. I get it that perfectly well... If the syntax was wrong, I won't get the plan to explain it, then why am I getting an error number invalid? What is the data? I'm on 10.2.0.3Published by: S2K on August 18, 2009 10:21
Check out this site that has a lot of regular expressions submitted by users: [Library of regular expressions | http://regexlib.com/DisplayPatterns.aspx?cattabindex=2&categoryId=3]
Then you should do something like you posted:
WHERE REGEXP_LIKE(RSLT_QTY,)
Tags: Database
Similar Questions
-
What wrong with this Manager?
Hello
I created a simple Manager where I put a label and a button. Here is the code:
public class TitleManager extends Manager { private Bitmap bg = Bitmap.getBitmapResource("res/top_btm_bar.png"); protected Field field; private String title; private LabelField titleLbl; public TitleManager(String titleText, Field field) { super(Manager.USE_ALL_WIDTH); this.title = title; this.field = field; titleLbl = Common.getLabelFieldForList(title); titleLbl = new LabelField(title) { public void paint(Graphics g){ g.setColor(Color.WHITE); super.paint(g); } }; setBackground(BackgroundFactory.createBitmapBackground(bg)); add(titleLbl); add(field); } protected void sublayout(int width, int height) { int displayWidth = Display.getWidth(); int displayHeight = bg.getHeight(); layoutChild(titleLbl, width, height); //displayWidth, displayHeight layoutChild(field, displayWidth - titleLbl.getPreferredWidth(), displayHeight); setPositionChild(titleLbl, 50, 3); setPositionChild(field, 272, 3); setExtent(displayWidth, displayHeight); } /* protected void paint(Graphics g) { g.setFont(Font.getDefault().derive(Font.PLAIN, 18)); g.setColor(Color.WHITE); g.drawText(title, (bg.getWidth()/2)-50, field.getContentTop()+8); }*/ public int getPreferredWidth() { return Display.getWidth(); } public int getPreferredHeight() { return bg.getHeight(); } }
I'm passing a text to display as the title and a button to be placed next to him. I create LabelField using the text and I try to place the labelfield.
But I don't see the button, but not the titleLbl. Can someone tell me what is the problem with the above code. Why don't I see the titleLbl. Even I tried to paint text using object, but failed their also.
Any line help is very much appreciated.
Thank you
It's much better than before. You may want to consider laying off field (button?) first because it has a width the better, then with the label - making it an operation of a single pass (without calculations of rgdSpace). Something like
layoutChild(field, displayWidth, displayHeight); layoutChild(titleLbl, displayWidth - field.getWidth(), displayHeight);
I always use the width rather than displayWidth in all your calculations (and ditch displayWidth altogether).
I do not mean the same thing with height is because you're likely to add that the Manager of a MainScreen() which, by default, gives to his 'children' a total of Integer.MAX_VALUE > 1 height (due to having a default VERTICAL_SCROLL value - see screen explained knowledge base article for more information). Using height in this case needlessly will propel the way the fields past the bottom of the screen. You can avoid this by using MainScreen (MainScreen.NO_VERTICAL_SCROLL) constructor, as explained in the article - then you can bring your Display.get... call and use the width and height as basis.
-
Pls whats wrong with this code?
It gives me an error.create or replace trigger o_time_trig after update on o_time for each row begin update o_time set hours_overtime =>35 where emp_id = :NEW.emp_id; end; / Warning: Trigger created with compilation errors. SQL> show errors; Errors for TRIGGER O_TIME_TRIG: LINE/COL ERROR -------- ----------------------------------------------------------------- 2/1 PL/SQL: SQL Statement ignored 3/20 PL/SQL: ORA-00927: missing equal sign
I just want to write a trigger...
create or replace trigger o_time_trig before update on o_time for each row begin :new.hours_overtime = :new.hours_worked - 35; end;
-
Please tell me what wrong with this paypal purchase code?
< form id = "form1" name = "form1" method = "post" action = "" >
" < p > < form action =" https://www.PayPal.com/cgi-bin/webscr "method ="post"> "
< input type = "hidden" name = "cmd" value = "_s-xclick" >
< input type = "hidden" name = "hosted_button_id" value = "PBG8WAM6N6G2S" >
< table >
< tr > < td > < input type = "hidden" name = "on0" value = "& quot; Showtime & quot;-paper print "> & quot;" Showtime & quot; - paper printing < table > < /tr > < tr > < td > < select name = "os0" >
< option value = '1-11 x 14' > 1-11 x $14 50.00 < / option >
< option value = '1-12 x 18' > 1-12 x $18 65.00 < / option >
< option value = "1-16 x 20" > 1-16 x $20 90.00 < / option >
< option value = '1-24 x 36' > 1-24 x $36 170.00 < / option >
< / select > < table > < /tr >
< /table >
< input type = "hidden" name = "currency_code" value = "Us $" >
" < input type ="image"src =" https://www.PayPal.com/en_US/i/BTN/btn_buynowCC_LG.gif "border ="0"name ="submit"alt ="PayPal - the safer, easier way to pay online how!"> "
< img alt = "" border = "0" src =" " https://www.PayPal.com/en_US/i/SCR/pixel.gif "width ="1"height ="1"> "
< / make >When I insert this code and try the button 'Buy' nothing happens. My site is www.ritacortesi.com. PayPal doesn't really have a good Web site.
[email protected] wrote:
When I insert this code and try the button 'Buy' nothing happens. My site is www.ritacortesi.com. PayPal doesn't really have a good Web site.
Look at the first line of what you posted. You have 2 opening tags form it and I suspect that there could be other HTML errors on your page. Run your page through the validator and fix errors that come back. Once you have done this, if you still have errors after return.
-
Mr President.
What is wrong with this sequence, it does not work when, after 3 inserts, I add a new record with the trigger it gives an error.
--SL_CUSTOMERS table data INSERT INTO SL_CUSTOMERS VALUES(1,'Kamrul Hasan',NULL,NULL,'Moghbazar', 'Dhaka','0456789123',NULL,NULL,NULL,'Y',NULL); INSERT INTO SL_CUSTOMERS VALUES(2,'Rabiul Alam',NULL,NULL,'Motijheel', 'Dhaka','0567891234',NULL,NULL,NULL,'Y',NULL); INSERT INTO SL_CUSTOMERS VALUES(3,'Shahed Hasan',NULL,NULL,'2-G/1,2-2,Mirpur', 'Dhaka','0678912345',NULL,NULL,NULL,'Y',NULL);
CREATE SEQUENCE "ALIZA"."SL_CUSTOMERS_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 NOCACHE NOORDER NOCYCLE ; CREATE OR REPLACE TRIGGER SL_CUSTOMERS_TRG BEFORE INSERT ON "ALIZA"."SL_CUSTOMERS" FOR EACH ROW BEGIN IF :NEW.CUSTOMER_ID IS NULL OR :NEW.CUSTOMER_ID < 0 THEN SELECT SL_CUSTOMERS_SEQ.nextval INTO :NEW.CUSTOMER_ID FROM DUAL; END IF; END; /
When I try to insert several records with the seq.nextval it gives error
violation of primary key.
INSERT INTO "ALIZA"."SL_CUSTOMERS" (CUSTOMER_NAME) VALUES ('sdfsd') ORA-00001: unique constraint (ALIZA.SL_CUSTOMERS_PK) violated ORA-06512: at line 1 One error saving changes to table "ALIZA"."SL_CUSTOMERS": Row 4: ORA-00001: unique constraint (ALIZA.SL_CUSTOMERS_PK) violated ORA-06512: at line 1
Concerning
Mr President.
I find the solution by creating a function before the triiger
as below
CREATE SEQUENCE "ALIZA"."SL_CUSTOMERS_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 NOCACHE NOORDER NOCYCLE ; CREATE OR REPLACE FUNCTION get_SL_CUSTOMERS_vId RETURN VARCHAR2 AS BEGIN RETURN SL_CUSTOMERS_SEQ.NEXTVAL; END; / CREATE OR REPLACE TRIGGER SL_CUSTOMERS_TRG BEFORE INSERT ON "ALIZA"."SL_CUSTOMERS" FOR EACH ROW DECLARE dummy VARCHAR2(200); BEGIN dummy := get_SL_CUSTOMERS_vId(); :NEW.CUSTOMER_ID := dummy; END; /
It works very well
Thank you all for the suggestions.
Concerning
-
Which is wrong with this query?
SELECT THE PRODUCT. PRODUCT_ID PRODUCT. PRODUCT_DESCRIPTION, PRODUCT. PR_CURRENT_YEAR_SALES_GOAL, (ORDER_QUANTITY * PRODUCT_PRICE) AS sales so far
ORDER, ORDER_LINE, PRODUCT, PRODUCT_LINE
WHERE TO ORDER. ORDER_NUMBER = ORDER_LINE. ORDER_NUMBER
AND THE PRODUCT. PRODUCT_ID = ORDERED_PRODUCT. PRODUCT_ID
AND THE PRODUCT. PRODUCT_ID = PRODUCT_LINE. PRODUCT_ID
AND THE PRODUCT. PRODUCT_LINE_NAME = 'Home Office ';
There is something wrong with this request, but I don't see what it is. Anyone know whats wrong with it and perhaps what would be the correct way to request program?There is another thing that I noticed:
You seem to have used a Table name: "ORDERED_PRODUCT. PRODUCT_ID' in your WHERE clause that is not in your FROM clause
See you soon-
-
I don't know whats wrong with my windows but somerone direct email account seems to be to use it to send advertisements to my contacts. I clicked on air currents and there were hundreds of ads, but the meter does not have to indicate that I had at all drafty. I tried to change my password but I can't access the password reset function either. I used the same years email address and hate having to change. What should I do?
What happens when you connect to your Windows Live/Hotmail through Internet Explorer account on your computer, and try to change your password?
Tips on creating a decent password:
http://www.Microsoft.com/security/online-privacy/passwords-create.aspx -
* Original title: DD Realtek Audio Manager... »
I had to do a cleaning and reloading my system 64 windows 7 # when I return it to the tecknician that I have now no DD Realtek audio Manager... just a generic system of its whats up with this? is there a way that I can download this from Microsoft or can I get it on the original disc supplied with my system or this tech who fixed my PC has changed my motherboard? can someone help me with this please... it's just not in my system and I'm very angry m.. .thank you.
Hello
Thank you for visiting Microsoft Community.
According to the description, I understand that you want to download the Realtek audio Manager on your PC running Windows 7. I will certainly help you to question.
I suggest you to download the software from the link below and check if it helps:
http://www.Realtek.com.tw/downloads/downloadsView.aspx?langid=1&PNid=23&PFID=23&level=4&Conn=3&DownTypeID=3&GETDOWN=falseHope this information helps.
Sincerely,
Ankit Rajput -
I'm trying to load another computer with CC, I was told that I have to disable my PC mine. I did once before and lost a lot of my images from LR, suggestions on this please.
I do the LR back ups system too.
Thank you very much
PAM
Hi goaliemom
There is no way to disable CC products. When you enable a CC product on another computer, simply connect to Creative Cloud.CC will ask you if you it will activate on more than 2 computers.
I've done it before and I lost many of my images that were on LR. No matter WHAT HELP with this please
On the computer on which you will see that your images are not displayed?
Catalog check the most recently used file > open recent in Lightroom
Try opening a recent backup made on your newly added computer
~ Assani
-
What am I doing wrong with this idea of menu?
Hi team,
I am trying to build a menu but have two problems, as you can see on the vid when I press one of my button fly, closing at all (which could be authorized)
Quen worst is that even if I have the names of instance for all the steps and the target tool allows you to find the path to these buttons, I can't access it from the main timeline.
Here's the code...
import flash.events.MouseEvent;
import flash.display.MovieClip;
GSmain.gsshape.gss1.gssr1.addEventListener (MouseEvent.CLICK, page2go);
function page2go(e:MouseEvent) {}
gotoAndStop (2);
}
and the error...
TypeError: Error #1009: cannot access a property or method of a null object reference.
to aavar / frame1 () [aavar::frame1:4]
aavar is the document class associated with this file
If
GSmain.gsshape.gss1.gssr1.addEventListener (MouseEvent.CLICK, page2go);
is frame 1/4, GSmain.gsshape.gss1.gssr1 does not exist when this code runs.
you have also nested named functions which is always problematic:
function whatever() {}
function whatevernested() {}
}
}
should be
function whatever() {}
}
function nolongernested() {}
}
-
What wrong with the search bar?
Firefox is seriously p * ing me off today, what's wrong with the browser, it serves to be one of the best, now an absolute piece of software of the waste processed sound.
Anway my problem is, AFTER upgrading firefox, I can't use my SEARCH BAR to look for anything!
I continue to redirect to this
file:///C:/users/Kamran/appdata/roaming/ToolbarInstaller/ToolbarInstaller/1.0.0.0/Google.html
which is not very useful!
I think it might be interesting to switch to google chrome and get rid of that junk!
Edited by a moderator because of the language. See the rules and lines guidelines .
Hi, I did what you said and disabled all add ons and one allowed them and managed to make it work. It was the 'googlebar update"add that I disabled it and everything went back to normal
Thank you very much
-
Hi friends,
When I try to run the following query
Im getting error asselect user_name from xx_user where lower(user_name) in( select substr(lower(supf.first_name),1,1)|| lower(supf.last_name) from per_all_people_f papf, per_all_assignments_f paaf, per_all_people_f supf where papf.business_group_id = 216 and papf.person_id = paaf.person_id and NVL(paaf.supervisor_id, papf.person_id) = supf.person_id and sysdate between papf.effective_start_date and papf.effective_end_date and sysdate between paaf.effective_start_date and paaf.effective_end_date and sysdate between supf.effective_start_date and supf.effective_end_date and papf.person_type_id = 5145 and level >=1 start with substr(lower(papf.first_name),1,1)|| lower(papf.last_name) in (select substr(lower(papf.first_name),1,1)|| lower(papf.last_name) from xx_history xx, per_all_people_f papf where xx.emp_no=papf.person_id and xx.old_mrg_id <> xx.new_mgr_id) connect by papf.person_id = prior paaf.supervisor_id and level <=1 order by rownum desc)
ORA-00907: lack the right parenthesis
But if I run this part of the single application, it works very well
This query returns a correct in a rowselect substr(lower(supf.first_name),1,1)|| lower(supf.last_name) from per_all_people_f papf, per_all_assignments_f paaf, per_all_people_f supf where papf.business_group_id = 216 and papf.person_id = paaf.person_id and NVL(paaf.supervisor_id, papf.person_id) = supf.person_id and sysdate between papf.effective_start_date and papf.effective_end_date and sysdate between paaf.effective_start_date and paaf.effective_end_date and sysdate between supf.effective_start_date and supf.effective_end_date and papf.person_type_id = 5145 and level >=1 start with substr(lower(papf.first_name),1,1)|| lower(papf.last_name) in (select substr(lower(papf.first_name),1,1)|| lower(papf.last_name) from xx_history xx, per_all_people_f papf where xx.emp_no=papf.person_id and xx.old_mrg_id <> xx.new_mgr_id) connect by papf.person_id = prior paaf.supervisor_id and level <=1 order by rownum desc)
tmcdermott
guess if I run as the means below, it works
But I don't know why it doesn't work if I run as the way to above(top-most).select user_name from xx_user where lower(user_name) in 'tmcdermott'
What's wrong with him
Brgds,
MiniHello
Move the bracket, so last two lines become
AND LEVEL <= 1) ORDER BY ROWNUM DESC
Concerning
Peter -
Please help me with this SQL query
I'm practicing of SQL queries and met one involving the extraction of data from 3 different tables.
The three paintings are as below
< pre >
Country
Location_id country
LOC1 Spain
loc2 England
LOC3 Spain
loc4 USA
loc5 Italy
loc6 USA
loc7 USA
< / pre >
< pre >
User
user_id location_id
loc1 U1
loc1 U2
loc2 U3
loc2 U4
loc1 U5
U6 loc3
< / pre >
< pre >
Publish
user_id post_id
P1 u1
P2 u1
U2 P3
P4 u3
P5 u1
P6 u2
< / pre >
I am trying to write a SQL query - for each country of the users, showing the average number of positions
I understand the logic behind all this that we must first consolidate all locations, and then the users in one country and then find the way to their positions.
But, I'm having a difficulty to this format SQL. Could someone help me please with this request.
Thank you.Select
Country.Country,
Count (*) Totalpostspercountry,
Count (distinct post.user_id) Totaldistincuserspercountry,
count (*) / count (distinct post.user_id) Avgpostsperuserbycountry
Of
countries, have, post
where country.location_id = muser.location_id
and muser.user_id = post.user_id
Country.country groupThe output is like this for your sample data - hope that's what you're looking for :)
COUNTRY, TOTALPOSTSPERCOUNTRY, TOTALDISTINCUSERSPERCOUNTRY, AVGPOSTSPERUSERBYCOUNTRY
In England, 1, 1, 1.
Spain, 5, 2, 2.5. -
Hello
I'm trying to concatenate the value of SQL_TEXT in multiple lines in a single string using this SQL statement. The problem is that it works fine if I use the PIECE, but if I use SQL_TEXT I get this error ORA-30004: when you use the SYS_CONNECT_BY_PATH function, cannot have a separator in the value of the column. As you can see I tried a number of separators I know are not in SQL_TEXT but still error. And help would be great.
I tested on 11 GR 2 11.2.0.3 but need to run it on 10.2.0.4 so I can't use LISTAGG. I'm open to other methods but I don't have the ability to place and PLSQL nto the database. It must be done in SQL.
select CURRENT_SID, sys_connect_by_path(PIECE,'~') -- Works --sys_connect_by_path(SQL_TEXT,'') -- Does Not Work -- trim(max(sys_connect_by_path(SQL_TEXT,'~')) keep (dense_rank last order by CURR),'~') as FULL_SQL_TEXT -- Does Not Work --ltrim(max(sys_connect_by_path(PIECE,'!')) keep (dense_rank last order by CURR),'!') as FULL_SQL_TEXT -- Does Not Work from ( select S.USERNAME, S.SID as CURRENT_SID, S.SERIAL#, T.PIECE, T.SQL_TEXT, ROW_NUMBER() over (partition by S.USERNAME, S.SID, S.SERIAL# order by T.PIECE) as CURR, ROW_NUMBER() over (partition by S.USERNAME, S.SID, S.SERIAL# order by T.PIECE) -1 as PREV from V$SESSION S, V$SQLTEXT_WITH_NEWLINES T where S.SQL_ID is not null and S.SQL_ID = T.SQL_ID and S.SID = sys_context('USERENV', 'SID') order by T.PIECE ) group by CURRENT_SID connect by PREV = prior CURR start with CURR = 1;
Hi SY,
Thanks for the reply that your SQL worked very well. You're right about the GROUP BY and AGGREGATIONS, I had tried so many different things, I had pasted in a version with a bit of my test which was a little strange looking.The key was just as you say I was looking at my current SQL contained now my ' ~ 'or'!' delimiter. Thanks for all the help!
-
Hi all
I try to read two different audio files with the following code piece. individually, they play well. When I try to play at the same time which is at the same time, it is give IllegalStateException and does not play any audio file.
When I play them separately, they play well. My requirement is to play 1 file as background music and another as foreground.
Audio playback code.
public class Audio implements Runnable//extends Thread { private Class clazz; private InputStream is; public Player player; private String audiofile; private int fileType; private int mode; public Audio(String path, int type, int mode) { audiofile = path; fileType = type; this.mode = mode; } public void run() { //this sample demonstrates playing an MP3 file that has been //added as a resource to the project try { //retrieve the MP3 file clazz = getClass(); //create an instance of the player from the InputStream is = clazz.getResourceAsStream(audiofile); // 1-- mpeg, 2-- wav audio files if(fileType == 1) player = javax.microedition.media.Manager.createPlayer(is, "audio/mpeg"); else if(fileType ==2) player = javax.microedition.media.Manager.createPlayer(is, "audio/x-wav"); player.setLoopCount(mode); player.realize(); player.prefetch(); player.start(); } catch (Exception ex) { UiApplication.getUiApplication().pushScreen(new CloseScreen("Hello")); } } }
// if call this, commenting section2 it works well //section1 Audio at = new Audio("/neon1.wav",2, -1); Thread at1 = new Thread(at); at1.start(); // if call this, commenting section1 it works well //section2 Audio at3 = new Audio("/neon1.wav",2, -1); Thread at2 = new Thread(at3); at2.start(); // when i uncomment both section1 and section2 and execute it is not playing giving an exception IllegalStateException.
all aid should be of great use.
Thank you and best regards,
PraveenG
On the storm, it is not possible to play 2 sounds loaded from a file at a time. If you try this, the first sound stops and the second sound will be played.
You can, however, load and play a sound (background music) and play other sounds (sound effects) by using Alert.startAudio (). The first noise not would be cut. The only problem with this is that the Alert.startAudio sounds are not the best.
Maybe you are looking for
-
Can not turn on WiFi on my Satellite C660-2RP
Hello I can't seem to activate / disable the wireless network.FN + F8 key does not work, but other combinations FN + Fx works well. Flash cards for UTILITIES-TOSHIBA-START restart does not work and flash cards are not displayed.The drivers are up to
-
Simulate signals wired to the DAQ assistant for USB-6009 device
Hello I'm trying to send a signal to the DAQ Assistant Express VI. I watched the movie "Generating a Signal" on the Web site of NOR (www.ni.com/academic/students/learnlabview/generate.htm) and I have my Signal simulate connected directly on the DAQ
-
WINDOWS UPDATE 80070002 ERROR CODE.
WINDOWS TROUBLESHOOTING I TRIED, STILL CANNOT DOWNLOAD WINDOWS UPDATE
-
Apllication failed startl does not start cannot locate wmv core.dill
VHS dvd 4.0 deluxe sections ask mode advanced and recorder digital audio will not start up error message that this application has failed to start because core.dill wmv not found. Re-installing may correct the problem. Have reinstalled several times
-
In BLackberry AES256 encryption,
How can I do in Blackberry AES256 encryption, I use this method but the result does not come to the standard... private static ubyte [] encrypt (byte [] keyData, byte [] data) throws IOException, CryptoException{Create the AES key to use for data enc