Pls help with RegEx
Hello,
I can't figure out how to write a simple regex.
For example I have a String ("12345678") and I'd like to find out whether my String contaings "456".String str1 = "12345678";
String str2 = "456";
System.out.println(str1.matches(?)); // what is the right regex to find out if str1 contains str2?
For such a simple example, regex is overkill. You could just test for String.indexOf("456") >= 0
However, to answer your question, the expression would be:
.*456.*
Similar Messages
-
HOW TO INSERT MICRO SIM IN I PAD MODEL- A1416? Pls help with a picture...
My Ipad doesnt have the space to pin out the sim card tray...?
I think i have been gifted the Ipad which doesnt support sim card. Is it so?
My model no is- A1416....? -
Hi,
I need a help to resolve my problem.Actually i have a JSP page with a list box. When i select some value in the list box, appropriate values must list out according to the selected value.And i have a submit button to process that jsp page.
I wrote a validation as all the fields must be entered to submit a page.
But when i tried with the following code,it's just moving to processing page when i select a values from the list box.This is happening when i cheked the validation.
Pls help with this code.This is very urgent.
Code is as follows
"Example1.jsp"
<%
String str1 = request.getParameter("Modem");
%>
<html>
<head>
<script language = "JavaScript">
function Validate()
if(document.UpdateFiosAccounts.Modem.value == "Select One")
alert("Please select the value")
document.UpdateFiosAccounts.Modem.focus()
return false
if(document.UpdateFiosAccounts.text1.value == "")
alert("Please type some text")
document.UpdateFiosAccounts.text1.focus()
return false
return true
</script>
</head>
<body>
<form name = "UpdateFiosAccounts" action="./Example1.jsp" method ="post" onSubmit= "return Validate()">
Pls select One:<select name="Modem" size="1" onChange="document.UpdateFiosAccounts.submit()">
<%
if(str1 == null)
%>
<option value="Select One">Select One</option>
<option value="One">One</option>
<option value="Two">Two</option>
<option value="Three">Three</option>
<option value="Four">Four</option>
<%
else
%>
<option value="<%=str1%>"><%=str1%></option>
<%
%>
</select><br>
Pls type something: <input type ="text" name="text1">
<input type ="submit" value="submit" onClick="document.UpdateFiosAccounts.action='./Accounts.jsp'">
</form>
</body>
</html>Hi! The reason is that in the onChange property you are doing the submit, so, when you select something, it goes automatically and never pases through your validation function. So, remove that onChange. Next, the button is a submit buton, so, no matter what your validation does, the page will go. You need to change the submit type of the button to just button (<input type="button" onclick="function to validate">) and then you will get what you want. By the way, this is NOT a Java question, is more JavaScript question.
Hope this helps. -
I'm making a quiz, and i store the questions in a textfile. The user can choose from 3 quizes, either Plate Tectonics, Rivers or Rocks. I managed to call the questions from Java. Each quiz has a set of 10 questions. In the code below i only included the answers to the Plate Tectonics Quiz, which i stored in an array. What i'm having problem with is, that its not working correctly, since it is displaying, after answering all the questions correctly that i have answered 0 questions from 1 question. First of all it should say out of 10 questions because i have 10 questions, and its not really working because even if i answer them all corrctly it still says 0 out of 1 question. Can someone pls help me find the error? Thanks a lot.
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.io.*;
import java.util.Scanner;
import java.util.Arrays;
public class GeographyQuiz extends JFrame implements ActionListener {
private static final int FRAME_WIDTH = 140;
private static final int FRAME_HEIGHT = 160;
private static final int FRAME_X_ORIGIN = 70;
private static final int FRAME_Y_ORIGIN = 50;
AnswerStore answerStore = new AnswerStore();
public static void main (String[] args) {
JFrame jFrame;
jFrame = new JFrame();
JOptionPane.showMessageDialog(jFrame, "This is a Geography Quiz");
JOptionPane.showMessageDialog(null, "Good Luck");
char choice;
int i, choice1, Password;
String yourChoice, passString;
passString = JOptionPane.showInputDialog("Enter the Password");
//Password = passString.nextInt();
Password = Integer.parseInt(passString);
if (Password == 123) {
JOptionPane.showMessageDialog(null, "Valid. You typed the right password. Now choose from the following menu");
GeographyQuiz frame = new GeographyQuiz();
frame.setVisible(true);
} else {
JOptionPane.showMessageDialog(null, "Invalid Password. Try Again");
public GeographyQuiz() {
Container contentPane;
JButton button1, button2, button3, button4, button5;
setSize (FRAME_WIDTH, FRAME_HEIGHT);
setTitle("Geography Quiz");
setLocation(FRAME_X_ORIGIN, FRAME_Y_ORIGIN);
contentPane = getContentPane();
contentPane.setBackground(Color.pink);
contentPane.setLayout(new FlowLayout());
button1 = new JButton("Plate Tectonics");
button2 = new JButton("Rivers");
button3 = new JButton("Rocks");
button4 = new JButton("Quit");
contentPane.add(button1);
contentPane.add(button2);
contentPane.add(button3);
contentPane.add(button4);
button1.addActionListener(this);
button1.setActionCommand("b1");
button2.addActionListener(this);
button2.setActionCommand("b2");
button3.addActionListener(this);
button3.setActionCommand("b3");
button4.addActionListener(this);
button4.setActionCommand("b4");
setDefaultCloseOperation(EXIT_ON_CLOSE);
public void actionPerformed(ActionEvent e) {
String ac = e.getActionCommand();
String[] questions = null;
try {
if (ac.equals("b1")) {
questions = readFile("plate_tectonics.txt");
} else if(ac.equals("b2")) {
questions = readFile("rivers.txt");
} else if(ac.equals("b3")) {
questions = readFile("rocks.txt");
} else if (ac.equals("b4")) {
System.exit(0);
askQuestions(questions);
catch (java.io.FileNotFoundException f)
JOptionPane.showMessageDialog(null, "File not found.");
private String[] readFile(String path)throws FileNotFoundException {
Scanner s = null;
StringBuilder sb = new StringBuilder();
String separator = "\n";
try {
s = new Scanner(new BufferedReader(new FileReader(path)));
s.useDelimiter(",\\s*");
while (s.hasNext()) {
JOptionPane.showInputDialog(null,s.nextLine());
finally {
if (s != null)
s.close();
return sb.toString().split("\\s");
private void askQuestions(String[] questions) {
int count = 0;
for(int j = 10; j < questions.length; j++) {
String input = JOptionPane.showInputDialog(null, questions[j]);
// Use reference to AnswerStore instance to access data in it.
if(answerStore.answer[j].equals(input))
count++;
JOptionPane.showMessageDialog(null, "You answered " + count +
" out of " + questions.length +
" questions correctly.");
class AnswerStore {
String[] answer = {
"Hellenic", "constructive", "100km", "Italy", "Wegner",
"constructive", "100km", "Italy", "destroyed", "Meditteranean"
}Edited by: saytri on Dec 23, 2007 2:07 AM
Edited by: saytri on Dec 23, 2007 2:29 AMstripped to bare bones, it works OK for me
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
class GeographyQuiz extends JFrame implements ActionListener {
AnswerStore answerStore = new AnswerStore();
public static void main (String[] args) {
JOptionPane.showMessageDialog(null, "This is a Geography Quiz\n\nGood Luck");
char choice;
int i, choice1, Password;
String yourChoice;
GeographyQuiz frame = new GeographyQuiz();
frame.setVisible(true);
public GeographyQuiz() {
Container contentPane;
JButton button1;
setSize (140, 160);
setTitle("Geography Quiz");
setLocationRelativeTo(null);
contentPane = getContentPane();
contentPane.setBackground(Color.pink);
contentPane.setLayout(new FlowLayout());
button1 = new JButton("Plate Tectonics");
contentPane.add(button1);
button1.addActionListener(this);
button1.setActionCommand("b1");
setDefaultCloseOperation(EXIT_ON_CLOSE);
public void actionPerformed(ActionEvent e) {
String ac = e.getActionCommand();
String[] questions = null;
if (ac.equals("b1")) {
questions = new String[]{"what is 1+1","what is 2+2"};
askQuestions(questions);
private void askQuestions(String[] questions) {
int count = 0;
for(int j = 0; j < questions.length; j++) {
String input = JOptionPane.showInputDialog(null, questions[j]);
if(answerStore.answer[j].equals(input)) count++;
JOptionPane.showMessageDialog(null, "You answered " + count +
" out of " + questions.length +
" questions correctly.");
class AnswerStore {
String[] answer = {"2", "4"};
}either the problem is in the file, or the posted code is not what you're using -
Pls help with extracting dates
I wish to produce the output in table customer1 based on the customer table DOP field.
The values in DOP (0030500) indicates wed and fri, (0000007) indicates sunday.
how can i extract all the dates for wed and fri (0030500) between the period ST_DT and ED_DT (23/02/2005) to (20/03/2005).
SQL> select * from customer;
CUSTOMER_ID ST_DT ED_DT DOP
429100 23/02/2005 20/03/2005 0030500
428950 14/03/2005 02/04/2005 0000007
SQL> select * from customer1;
CUSTOMER_ID ST_DT ED_DT DOP DT
429100 23/02/2005 20/03/2005 0030500 23/02/2005
429100 23/02/2005 20/03/2005 0030500 25/02/2005
429100 23/02/2005 20/03/2005 0030500 02/03/2005
429100 23/02/2005 20/03/2005 0030500 04/03/2005
429100 23/02/2005 20/03/2005 0030500 09/03/2005
429100 23/02/2005 20/03/2005 0030500 11/03/2005
429100 23/02/2005 20/03/2005 0030500 16/03/2005
429100 23/02/2005 20/03/2005 0030500 18/03/2005
428950 14/03/2005 02/04/2005 0000007 20/03/2005
428950 14/03/2005 02/04/2005 0000007 27/03/2005
pls help, thanks.SQL> select * from customer;
CUSTOMER_ID ST_DT END_DT DOP
429100 23-FEB-05 20-MAR-05 0030500
428950 14-MAR-05 02-APR-05 0000007
SQL> select a.customer_id,a.st_dt,a.end_dt,a.dop,a.st_dt+b.tita
2 from customer a,(select rownum-1 tita from user_objects) b
3 where a.st_dt+b.tita <= a.end_dt
4 and instr(a.dop,decode(to_char(a.st_dt+b.tita,'d')-1,0,7,to_char(a.st_dt+b.tita,'d')-1))>0
5 order by a.customer_id,a.st_dt+b.tita;
CUSTOMER_ID ST_DT END_DT DOP A.ST_DT+B
428950 14-MAR-05 02-APR-05 0000007 20-MAR-05
428950 14-MAR-05 02-APR-05 0000007 27-MAR-05
429100 23-FEB-05 20-MAR-05 0030500 23-FEB-05
429100 23-FEB-05 20-MAR-05 0030500 25-FEB-05
429100 23-FEB-05 20-MAR-05 0030500 02-MAR-05
429100 23-FEB-05 20-MAR-05 0030500 04-MAR-05
429100 23-FEB-05 20-MAR-05 0030500 09-MAR-05
429100 23-FEB-05 20-MAR-05 0030500 11-MAR-05
429100 23-FEB-05 20-MAR-05 0030500 16-MAR-05
429100 23-FEB-05 20-MAR-05 0030500 18-MAR-05
10 rows selected.
SQL> Assuming the date range does not exceed the number of user objects :-) -
Help with REGEX to block invalid characters
I have a regex that is used to block unusual characters from being entered into a user name, so they can put pipes etc in there, I just want 0-9 and a-z (upper or lowercase), but I just noticed that it's not working. I am not up to speed on regex, I took this from somewhere else
here is the expression:
<cfif len(trim(ReReplaceNocase(form_username, '^[A-Za-z][A-Za-z0-9_]*', '', 'ALL'))) gt 0>
It is failing when I enter 2kljlkll3456 as the username
Anybody have any idea why it's not working?
After posing this I found out that the issue is that it does not allo me to have a username that starts with a number, only a letter, anybody have any idea how to fix that?
Thanks
MarkHey Dan,
I found a link that explained how the regex is actually formed which helped!
http://stackoverflow.com/questions/336210/regular-expression-for-alphanumeric-and-undersco res
Now I have managed to get a basic understanding of how they are formed the fix was easy
I had:
<cfif len(trim(ReReplaceNocase(form_username, '^[A-Za-z][A-Za-z0-9_]*', '', 'ALL'))) gt 0>
But should have had
<cfif len(trim(ReReplaceNocase(form_username, '^[A-Za-z0-9_]*', '', 'ALL'))) gt 0>
Simply removing [A-Za-z] from the start fixed it. I get it now ... so the first section defined the first character which was restricted to A-Za-z only.
I'll mark this as answered
Thanks
Mark -
Pls. help with JMS monitor
I need all the help I can get from each of you.
I have to implement a GUI for system admin to interact with JMS activities and I have no clues what kind of activities I should display on the GUI in term of JMS. Pls. advice if you have done something like/similar to this or have some ideas.
Thanks in advance!Check out Hermes JMS Explorer (http://hermesjms.sourceforge.net) - it can do just about all you can do without actually using server libraries and hooking into preexisting JMS server code.
It allows you to browse JMS destinations (queues, topics) as well as monitor, consume and produce (put) messages.
Hope this helps,
-Scott -
Hi,
I want to detect the presence of "fromCharCode" in a String.
But only when it is not preceded by "String." and not followed by "(34)".
I have already managed to do the "String." with this regex: (?<!string\.)fromCharCode --> uses the negative look behind
This will detect the "fromCharCode", but not when it is preceded by "String.".
But I don't know how to do the "(34)" ?
Can somebody help me with this?thanks, but the problem with this regex now is that "fromCharCode" is not detected in the String fromCharCode(34) and the String String.fromCharCode.
The text "fromCharCode" must only be detected when not preceded by "String." AND not followed by "(34)".
Can you do this? -
Still trying to solve a problem in Dreamweaver - and think that using Regex is the way to go - but never used it before
I have 2 tables on 4000 pages and want to delete 1 table from each page but they have different links and content etc
The 2 tables on each page are also distinguished by different table widths
If the table I want to delete looks like this example below - what Regex do I use to make the find and replace delete only the table with <table width=100%>
<table width="100%"><tr><td><a href="aberley.htm"><font size="-7">aberley</font></a></td></tr></table>
Many thanksThanks Nancy O - you are a Star - have tried it out and it worked perfectly
- and this will new piece of knowledge will save me many many hours of work
I had no previous knowledge of that Find and Replace Special Tags option
Thanks again for your help - it is greatly appreciated -
Help with regex. How to escape "|"
Hi, this is my code:
String line = "00001740 00 a 01 able 0 003 = 04866033 n 0000 = 05262099 n 0000 ! 00002062 a 0101 | (usually followed by `to') having the necessary means or skill or know-how or authority to do something; "able to swim"; "she was able to program her computer"; "we were at last able to buy a car"; "able to get a grant for the project" ";
//I want to capture with group(0) only the first half og the line, that preceeding "|".
//Could anyone help me figure out why this piece of code does not work ?
String patternStr = "(.*?)|(.*?)";
Pattern pattern = Pattern.compile(patternStr);
Matcher matcher = pattern.matcher(line);
boolean matchFound = matcher.find();
if (matchFound){
relLine = (String)matcher.group(0);
System.out.println("LINE " + relLine);
} else {
System.out.println("ATTENTION MATCH WAS NOT FOUND FOR LINE " + line);
}"\\|"You need to use the backslash.
However, since backslash is also a special character in a Java String literal, you need two of them. The first one gets eaten by the compiler, escaping the second one, which is used by regex to escape the pipe. -
Can you pls help with theis OIM issue
1. How can I assign as APPROVER dynamically without using the OIM defaul approval process. Is there any way to use custom process?
Any Code/Help will be hioghly appreciated.There are two ways you can do this (actually three if you want to use process determination rules and route the object to a completely different approval process - those are developed in the role designer and placed in the "process determination rules" tab on the Resource Object).
The easiest way to do it is to build a couple of task assignment rules (also in the rule designer). Assuming you want to use some value in the object form to determine which approver is assigned, you just make sure you build the rule with the type = Task Assignment, subtype = user provisioning and the object and process fields filled in (process should be the approval process). Then you will be able to build a role using the object form data.
example: Object form field A == "value A".
Build as many of these as you need and place them in the task assignment tab of the approval task, selecting the proper approver for each rule.
Note that you can also write the rule to route based on user data, only be aware that some versions of oim (actually all that I have tried, but it may be fixed in 9.1, not sure) will not process this correctly if there is a request submitted for multiple users. Rather than route each correctly it will assign all of them to approver determined for the last user submitted (this also holds true if you are assigning to user's manager). Oracle added an option in 9.0.3.1.6 to restrict requests to one user to get around this issue.
The other alternative is to write a task assignment adapter in the adapter factory. I've done this in cases where I need to lookup the approver in an external data source. Write the adapter to take in any user or object form data it needs to make the assignment. These adapters return two parameters (which do not need to be mapped in the task assignment tab where you map the input parameters). One return value is a string containing the Target Type ("User", "Group", etc) and the other containing either the user key or group key the approval is being routed to.
Note that for some reason you cannot just set the target type string in the adapter with a "Set Variable" adapter task, you actually have to call java code that returns the string you want to set this to. -
Pls Help with date format picture ends ......error
Hi Everyone,
I am getting the following error when I run my crystal report.
Failed to retrieve data from the database.
Details: HY000:[DataDirect][ODBC Oracle driver][Oracle]ORA-01830: date format picture ends before converting entire input string
[Database Vendor Code: 1830]
I am using SQL Command for my report and in the command my date fields are of "Date" datatype.
I am using Crystal Reports XI R2,driver - CR Oracle ODBC Driver 5.1
Any help is greatly appreciated.
Thanks in advance
My SQL Command is as follows:
<
with MAXNEWSTAT as
(select
/--Added by HAN--/
HRHISTORY.COMPANY,
HRHISTORY.EMPLOYEE,
MAX(HRHISTORY.ACT_OBJ_ID) ACT_OBJ_ID
FROM
LAWSON.HRHISTORY
WHERE
HRHISTORY.FLD_NBR=20
and TO_DATE(HRHISTORY.DATE_STAMP)
>= TO_DATE((TO_CHAR((ADD_MONTHS(SYSDATE,-1)),'YYYY/MM')||'/01'),'YYYY/MM/DD')
AND TO_DATE(HRHISTORY.DATE_STAMP) <= (TO_DATE((TO_CHAR((ADD_MONTHS(SYSDATE,0)),'YYYY/MM')||'/01'),'YYYY/MM/DD'))-1
/--Added by HAN--/
GROUP BY COMPANY,
EMPLOYEE),
NEWSTAT AS
(SELECT
/--Added by HAN--/
HRHISTORY.COMPANY,
HRHISTORY.EMPLOYEE,
HRHISTORY.A_VALUE,
HRHISTORY.DATE_STAMP,
HRHISTORY.BEG_DATE,
HRHISTORY.ACT_OBJ_ID NS_OBJ_ID,
HRHISTORY.SEQ_NBR
FROM
LAWSON.HRHISTORY
INNER JOIN LAWSON.MAXNEWSTAT
ON
/--Added by HAN--/
HRHISTORY.COMPANY = MAXNEWSTAT.COMPANY
/--Added by KAM--/
AND HRHISTORY.EMPLOYEE = MAXNEWSTAT.EMPLOYEE
AND HRHISTORY.ACT_OBJ_ID = MAXNEWSTAT.ACT_OBJ_ID
WHERE
HRHISTORY.FLD_NBR=20
and TO_DATE(HRHISTORY.DATE_STAMP)
>= TO_DATE((TO_CHAR((ADD_MONTHS(SYSDATE,-1)),'YYYY/MM')||'/01'),'YYYY/MM/DD')
AND TO_DATE(HRHISTORY.DATE_STAMP) <= (TO_DATE((TO_CHAR((ADD_MONTHS(SYSDATE,0)),'YYYY/MM')||'/01'),'YYYY/MM/DD'))-1
PREVSTATID AS
(SELECT
/--Added by HAN--/
HRHISTORY.COMPANY,
HRHISTORY.EMPLOYEE,
MAX(HRHISTORY.ACT_OBJ_ID)OBJ_ID
FROM
LAWSON.HRHISTORY
INNER JOIN LAWSON.NEWSTAT
/--Added by HAN--/
ON HRHISTORY.COMPANY = NEWSTAT.COMPANY
AND HRHISTORY.EMPLOYEE = NEWSTAT.EMPLOYEE
WHERE
HRHISTORY.FLD_NBR=20
AND TO_DATE(HRHISTORY.BEG_DATE)
< to_date(NEWSTAT.BEG_DATE)
GROUP BY
/--Added by HAN--/
HRHISTORY.COMPANY,
HRHISTORY.EMPLOYEE
PREVSTAT AS
(SELECT
/--Added by HAN--/
HRHISTORY.COMPANY,
HRHISTORY.EMPLOYEE,
HRHISTORY.A_VALUE A_VALUE,
HRHISTORY.DATE_STAMP DATE_STAMP,
HRHISTORY.BEG_DATE BEG_DATE,
HRHISTORY.ACT_OBJ_ID OBJ_ID,
HRHISTORY.SEQ_NBR SEQ_NBR
FROM
LAWSON.HRHISTORY
INNER JOIN LAWSON.PREVSTATID
/--Added by HAN--/
ON HRHISTORY.COMPANY = PREVSTATID.COMPANY
AND HRHISTORY.EMPLOYEE = PREVSTATID.EMPLOYEE
WHERE
HRHISTORY.FLD_NBR=20 AND
HRHISTORY.ACT_OBJ_ID = PREVSTATID.OBJ_ID
MAXPERSACTHST AS
(SELECT
PERSACTHST.EMPLOYEE,
/--Added by KAM--/
PERSACTHST.COMPANY,
MAX(PERSACTHST.DATE_STAMP)DATE_STAMP
FROM
LAWSON.PERSACTHST
WHERE
(PERSACTHST.ACTION_CODE='LOASTATUS' OR PERSACTHST.ACTION_CODE='STATUS')
AND TO_DATE(PERSACTHST.DATE_STAMP)
>= TO_DATE((TO_CHAR((ADD_MONTHS(SYSDATE,-1)),'YYYY/MM')||'/01'),'YYYY/MM/DD')
AND TO_DATE(PERSACTHST.DATE_STAMP) <= (TO_DATE((TO_CHAR((ADD_MONTHS(SYSDATE,0)),'YYYY/MM')||'/01'),'YYYY/MM/DD'))-1
GROUP BY PERSACTHST.EMPLOYEE,
/--Added by KAM--/
PERSACTHST.COMPANY
CHANGELIST AS
(SELECT
PERSACTHST.EMPLOYEE,
/--Added by KAM--/
PERSACTHST.COMPANY,
PERSACTHST.ACTION_CODE,
PERSACTHST.REASON_01,
PERSACTHST.DATE_STAMP,
PERSACTHST.EFFECT_DATE,
PERSACTHST.REASON_02,
PREVSTAT.A_VALUE PS_A_VALUE,
PREVSTAT.DATE_STAMP PS_HR_DATE_STAMP,
PREVSTAT.BEG_DATE PS_HR_BEG_DATE,
PREVSTAT.OBJ_ID PS_HR_OBJ_ID,
PREVSTAT.SEQ_NBR PS_HR_SEQ_ID,
NEWSTAT.A_VALUE NS_A_VALUE,
NEWSTAT.DATE_STAMP NS_DATE_STAMP,
NEWSTAT.BEG_DATE NS_BEG_DATE,
NEWSTAT.NS_OBJ_ID,
NEWSTAT.SEQ_NBR NS_SEQ_NBR
FROM
LAWSON.PERSACTHST PERSACTHST
INNER JOIN LAWSON.PREVSTAT
ON PERSACTHST.EMPLOYEE=PREVSTAT.EMPLOYEE
/--Added by KAM--/
AND PERSACTHST.COMPANY = PREVSTAT.COMPANY
INNER JOIN LAWSON.NEWSTAT
ON PERSACTHST.EMPLOYEE = NEWSTAT.EMPLOYEE
/--Added by KAM--/
AND PERSACTHST.COMPANY = NEWSTAT.COMPANY
INNER JOIN LAWSON.MAXPERSACTHST
ON PERSACTHST.EMPLOYEE = MAXPERSACTHST.EMPLOYEE
/--Added by KAM--/
AND PERSACTHST.COMPANY = MAXPERSACTHST.COMPANY
WHERE
(PERSACTHST.ACTION_CODE='LOASTATUS' OR PERSACTHST.ACTION_CODE='STATUS')
AND NEWSTAT.A_VALUE <> PREVSTAT.A_VALUE
AND MAXPERSACTHST.DATE_STAMP = PERSACTHST.DATE_STAMP
PAEMPPOSENDDATE AS
(SELECT
PAEMPPOS.EMPLOYEE,
PAEMPPOS.COMPANY,
CASE
WHEN PAEMPPOS.END_DATE = TO_DATE('1700,01,01','YYYY,MM,DD')
THEN to_date(SYSDATE + 1,'YYYY,MM,DD')
ELSE PAEMPPOS.END_DATE
END END_DATE,
PAEMPPOS.EFFECT_DATE
FROM LAWSON.PAEMPPOS),
CURRFTE AS
(SELECT
PAEMPPOS.EMPLOYEE,
/--Added by KAM--/
PAEMPPOS.COMPANY,
PAEMPPOS.FTE CURR_FTE,
PAEMPPOS.EFFECT_DATE,
PAEMPPOSENDDATE.END_DATE
FROM
LAWSON.PAEMPPOS
INNER JOIN LAWSON.NEWSTAT
ON (PAEMPPOS.EMPLOYEE = NEWSTAT.EMPLOYEE)
/--Added by KAM--/
AND (PAEMPPOS.COMPANY = NEWSTAT.COMPANY)
INNER JOIN LAWSON.PAEMPPOSENDDATE
ON PAEMPPOS.EMPLOYEE = PAEMPPOSENDDATE.EMPLOYEE
/--Added by KAM--/
AND PAEMPPOS.COMPANY = PAEMPPOSENDDATE.COMPANY
AND PAEMPPOS.EFFECT_DATE=PAEMPPOSENDDATE.EFFECT_DATE
WHERE
(PAEMPPOSENDDATE.EFFECT_DATE <= NEWSTAT.BEG_DATE AND PAEMPPOSENDDATE.END_DATE >= NEWSTAT.BEG_DATE)
PREVFTE AS
(SELECT
PAEMPPOS.EMPLOYEE,
/--Added by KAM--/
PAEMPPOS.COMPANY,
PAEMPPOS.FTE PREV_FTE,
PAEMPPOSENDDATE.END_DATE
FROM
LAWSON.PAEMPPOS
INNER JOIN LAWSON.NEWSTAT
ON (PAEMPPOS.EMPLOYEE = NEWSTAT.EMPLOYEE)
/--Added by KAM--/
AND (PAEMPPOS.COMPANY = NEWSTAT.EMPLOYEE)
INNER JOIN LAWSON.PAEMPPOSENDDATE
ON (PAEMPPOS.EMPLOYEE = PAEMPPOSENDDATE.EMPLOYEE)
/--Added by KAM--/
AND (PAEMPPOS.COMPANY = PAEMPPOSENDDATE.COMPANY)
AND (PAEMPPOS.EFFECT_DATE = PAEMPPOSENDDATE.EFFECT_DATE)
WHERE
PAEMPPOS.EFFECT_DATE <= (NEWSTAT.BEG_DATE-1)AND PAEMPPOSENDDATE.END_DATE >= (NEWSTAT.BEG_DATE -1)
SELECT DISTINCT
EMPLOYEE.EMPLOYEE,
EMPLOYEE.DEPARTMENT,
EMPLOYEE.PROCESS_LEVEL,
EMPLOYEE.EMP_STATUS,
EMPLOYEE.FIRST_NAME,
EMPLOYEE.LAST_NAME,
EMPLOYEE.MIDDLE_INIT,
EMPLOYEE.POSITION,
PAPOSITION.DESCRIPTION,
CHANGELIST.PS_A_VALUE,
/--Added by KAM--/
CHANGELIST.COMPANY,
CHANGELIST.PS_HR_DATE_STAMP,
CHANGELIST.PS_HR_BEG_DATE,
CHANGELIST.PS_HR_OBJ_ID,
CHANGELIST.NS_A_VALUE,
CHANGELIST.NS_DATE_STAMP,
CHANGELIST.NS_OBJ_ID,
CHANGELIST.ACTION_CODE,
CHANGELIST.REASON_01,
CHANGELIST.REASON_02,
CHANGELIST.DATE_STAMP PERSACTSDATESTAMP,
CHANGELIST.EFFECT_DATE PERSACTEFFDATE,
DEPTCODE.R_NAME DEPTNAME,
PRSYSTEM.R_NAME PLNAME,
PREVFTE.PREV_FTE,
CURRFTE.CURR_FTE,
CHANGELIST.NS_BEG_DATE,
PGSELECT.GROUP_NAME,
PAEMPLOYEE.SENIOR_DATE
FROM
LAWSON.CHANGELIST
INNER JOIN LAWSON.EMPLOYEE
ON (EMPLOYEE.EMPLOYEE = CHANGELIST.EMPLOYEE)
/--Added by KAM--/
AND (EMPLOYEE.COMPANY = CHANGELIST.COMPANY)
INNER JOIN LAWSON.DEPTCODE
ON ((EMPLOYEE.COMPANY=DEPTCODE.COMPANY)
AND (EMPLOYEE.PROCESS_LEVEL=DEPTCODE.PROCESS_LEVEL)
AND (EMPLOYEE.DEPARTMENT=DEPTCODE.DEPARTMENT))
INNER JOIN LAWSON.PRSYSTEM
ON ((EMPLOYEE.COMPANY=PRSYSTEM.COMPANY)
AND(EMPLOYEE.PROCESS_LEVEL=PRSYSTEM.PROCESS_LEVEL))
LEFT OUTER JOIN LAWSON.PREVFTE
ON (CHANGELIST.EMPLOYEE=PREVFTE.EMPLOYEE)
/--Added by KAM--/
AND (CHANGELIST.COMPANY=PREVFTE.COMPANY)
LEFT OUTER JOIN LAWSON.CURRFTE
ON (CHANGELIST.EMPLOYEE=CURRFTE.EMPLOYEE)
/--Added by KAM--/
AND (CHANGELIST.COMPANY=CURRFTE.COMPANY)
INNER JOIN LAWSON.PGSELECT PGSELECT
ON ((EMPLOYEE.COMPANY=PGSELECT.COMPANY)
AND (EMPLOYEE.EMP_STATUS=PGSELECT.BEGIN_VALUE))
LEFT OUTER JOIN LAWSON.PAPOSITION
ON (EMPLOYEE.POSITION=PAPOSITION.POSITION)
AND (EMPLOYEE.COMPANY=PAPOSITION.COMPANY)
INNER JOIN LAWSON.PAEMPLOYEE
ON (CHANGELIST.EMPLOYEE=PAEMPLOYEE.EMPLOYEE)
/--Added by KAM--/
AND (CHANGELIST.COMPANY=PAEMPLOYEE.COMPANY)
WHERE
(PGSELECT.GROUP_NAME='G:ACTIVE' OR PGSELECT.GROUP_NAME='G:INACTIVE')
>Hi Arsh,
The error message you receive i.e.
ORA-01830: date format picture ends before converting entire input string
is an Oracle error.
The following document would be helpful:
ORA-01830: date format picture ends before converting entire input string
Cause: A valid date format picture included extra data. The first part of the format picture was converted into a valid date, but the remaining data was not required.
Action: Check the specifications for date format pictures and correct the statement.
Regards,
Alpana -
I have been working with Dreamweaver CS4 for sometime now. I tried to open a file but it took forever so I tried to force quit it. Still it was not responding so I shut my computer down and waited for 30 minutes. I tried to open it again but after i click the icon it jumps on the dock for a few seconds and goes away. Now All my other CS4 applications will not launch either. I tried to delete preferences but nothing so I uninstalled it. I just installed a fresh CS4 copy but it still will not work/launch. Thank you. I am using mac OS 10.5 Leopard. Never had a problem with any CS4 before. All my other applications work well only Adobe CS4 will not
Please!!!!!! I really need your help guys!
ThanksAlways run disk utility before deleting prefs or reinstalling anything. Usually deleting prefs will cure what ails your apps. Use uninstall utility to uninstall apps if you have to go that route. Don't just drag them to the trash. The uninstall will remove all associated files for each apps. Be aware there are usually more than one pref file for an app.
-
Hi
I want regex for following condition:(case insensitive)
1)First letter must be always an alphabet(case insensitive).
2)It should be maximum of 64 characters.
3)Rest all letter can be number alphabets and underscore.(case insensitive)
4)Defines an inverse domain name like "com.sun.yyyy.xxxx". Restricted to max 20 dot-separated identifiers of max. 30 chars each.
5)After . there must not be number for eg com.sun.1awt is not valid.Not properly tested, but here goes:
// some tests
String[] tests = {
"com.sun.yyyy.xxxx",
"com.sunsd.yy435yy.xxxx",
"com.sun.yyyy.5xxxx",
"com.sun.yyyeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeey.xxxx",
"com.sun.yyyy..xxxx"
// An atom must start with a letter follwed by 0 to 29 numbers, letters or underscores
String atom = "[a-z][a-z0-9_]{0,29}";
String regex =
"(?i)"+ // ignore case
"(?=^.{1,64}$)"+ // must be between 1 and 64 characters
atom+ // start atom
"(?:\\."+atom+"){0,19}"; // followed by 0 to 19 atoms with a '.' in front of it
for(String t: tests) {
System.out.println(t.matches(regex)+" -> "+t);
} -
Hi,
I have an expression like this
<select name="contact_list">
<option value="SS109445168429566">Mark
<option value="SS109445173826096">Keith
</select>
this is not in its entire state, i have trimmed the expression to make it a bit readable
no what i want is both the options value to be extracted and stored in a value i am using the pattern like this to do the same
pattern="(?s)(?i)<option value="(.*?)""
but i am always getting th first value only, whereas i want both the values.
Can anyone help me on this.
Thank you in advanceHow are you using the regex? Pattern p = Pattern.compile("(?is)<option value=\"(.*?)\"");
Matcher m = p.matcher(input);
while (m.find())
System.out.println("value is " + m.group(1));
}That should work.
Maybe you are looking for
-
Error Code A12E1 and Creative Cloud Update Loop
Possible Windows Solution - this applies to Windows systems only. Problem: 1) You try to open the Adobe Creative Cloud and receive notification of an update. The options are to Update or Quit. When you click Update, the process starts and then quits
-
Country of Delv.Plant in Sale order
Dear all, Could anybody tell me that where to specify country of delivering plant in the sale order. Since i have created a condition table that has fields as country of delv.plant and region of delv.plant. During creation of sales
-
Anyone notice a slowdown in accessing topics?
While there will be a learning curve in getting used to the new "look" and use of these forums, I'm a bit disappointed in the lag in getting to the information. Before the upgrade, it was almost instantaneous. Now, it takes at least 20 secs or more t
-
Hi, How can you populate an Infopath form with values from the SOAP web service GetUserProfileByName operation when anonymous access is (and has to be) enabled on the server? Looks like the facility is redundant when this is the case?
-
I have a system that will be scanning a specific area of a solar cell (see good-broken.jpg). The region of interest (see region of interest.jpg) is what I would like for an IMAQ edge find to operate. The dark area in the middle doesnt allow for accu