Significance of prior keyword
Hi,
can anybody explain the meaning of using the keyword prior in the following query,
create table test
parent number,
child number
select lpad(' ',level)||child from test start with parent is null connect by parent = prior child
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/queries4a.htm#2053937
Rgds.
Similar Messages
-
Hi,
In 2005, this link (AskTom) discussed connect by without prior and Tom Kyte said:
"I shall file a documentation bug to have the documentation updated to accurately reflect reality."In 2007 11g was released and Oracle 11g doc states:
* In a hierarchical query, one expression in condition must be qualified with the PRIOR operator to refer to the parent row.
PRIOR is most commonly used when comparing column values with the equality operator. (The PRIOR keyword can be on either side of the operator.) PRIOR causes Oracle to use the value of the parent row in the column. Operators other than the equal sign (=) are theoretically possible in CONNECT BY clauses. However, the conditions created by these other operators can result in an infinite loop through the possible combinations. In this case Oracle detects the loop at run time and returns an error.But connect by without prior is still allowed in 11g
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
PL/SQL Release 11.1.0.6.0 - Production
CORE 11.1.0.6.0 Production
TNS for Linux: Version 11.1.0.6.0 - Production
NLSRTL Version 11.1.0.6.0 - Production
select level lvl from dual connect by level <= 10
LVL
1
2
3
4
5
6
7
8
9
10Does this mean that connect by without prior is now officially allowed?Bishòp wrote:
In 2007 11g was released and Oracle 11g doc states:
* In a hierarchical query, one expression in condition must be qualified with the PRIOR operator to refer to the parent row.
PRIOR is most commonly used when comparing column values with the equality operator. (The PRIOR keyword can be on either side of the operator.) PRIOR causes Oracle to use the value of the parent row in the column. Operators other than the equal sign (=) are theoretically possible in CONNECT BY clauses. However, the conditions created by these other operators can result in an infinite loop through the possible combinations. In this case Oracle detects the loop at run time and returns an error.
Tom saw it as a bug in the documentation because of the way that Oracle allows connect by without prior to be used.
I know some people who still argue that the documentation says you shouldn't do a connect by without a prior and that it will be unsupported, but...
a) In 10.1.0.2 if you did "select rownum from dual connect by rownum <= 10" it would actually return 11 rows and this was "corrected" in 10.2 so that it returned 10 rows. Why would Oracle correct something that they didn't support?
b) I think the key thing is to try and understand what is being said by the documentation...
In a hierarchical query_, one expression in condition must be qualified with the PRIOR operator to refer to the parent row.
A hierarchical query is where you want to refer to a parent row, but are we doing that with our "select rownum|level from dual connect by rownum|level <= X" statements that don't have a PRIOR in them? I would consider it that we are not asking for a "hierarchical" query but are in fact just asking for it to connect to itself, therefore creating a loop, while the loop condition holds true.
In fact, if you try and use PRIOR with rownum or level you get...
SQL> ed
Wrote file afiedt.buf
1 select rownum
2 from dual
3* connect by rownum = prior rownum + 1
SQL> /
connect by rownum = prior rownum + 1
ERROR at line 3:
ORA-00976: LEVEL, PRIOR, or ROWNUM not allowed here
SQL>which is actually telling you, in no uncertain terms, that if you are going to use PRIOR then you can't use level or rownum, and conversely, if you are going to use level or rownum then you can't use PRIOR.
This would therefore indicate that it is expected behaviour and it is just the documentation that is worded badly and often taken wrongly.
;) -
Best way to group data and show details of only last result in group
Hi All! First off, just letting everyone know that this is a great place to explore and learn Oracle - I've learned more here than I have in some classes. Just exploring the forums and searching for an answer leads me to functions that I hadn't otherwise known existed.
Here's what I'm looking to accomplish now... let's say I have a table that holds family information - if two or more persons are related in a family (determined by a separate table) then it should return the person identification and then the details of the group.
For instance, the following data is contained in two tables, the current result follow and then the result I'm looking for...
PERSONS TABLE
PERSON PERSON_ID ADDRESS
John Smith 101 1 Oracle Drive
Jane Smith 102 1 Oracle Drive
RELATIONSHIPS TABLE
PERSON_ID RELATEDPERSON_ID
101 102
102 101A simple query would result in the following:
WITH PERSONS AS
SELECT 'John Smith' AS person, 101 AS person_id, '101 Oracle Drive' AS address FROM dual union all
SELECT 'Jane Smith', 102, '101 Oracle Drive' FROM dual
, RELATIONSHIPS AS
SELECT 101 AS person_id, 102 AS relatedperson_id FROM dual union all
SELECT 102, 101 FROM dual
SELECT
person
, address
FROM PERSONS p
JOIN RELATIONSHIPS r ON r.person_id = p.person_idRESULT
PERSON ADDRESS
John Smith 101 Oracle Drive
Jane Smith 101 Oracle DriveI'm looking to generate the following result but I'm not sure how to accomplish this... I'm confident it's something simple.
DESIRED RESULT
PERSON ADDRESS
John Smith
Jane Smith 101 Oracle DriveNotice that the address for the related family members is not displayed until the last family member is returned. It would repeat this process for each family.
Thanks everyone for any help you can provide! 11g
Edited by: nage62587 on Oct 16, 2012 8:20 PMHi,
nage62587 wrote:
I've done a lot of forum searching and revised my question a bit to hopefully make things a bit clearer... I've taken a query Frank wrote and revised to meet my criteria; Searching the forum (and other places on the web) is great! Not only do you find things yourself, but people on this forum are more likely to help you when they see that you're doing all you can.
If you find something that you try to adapt, post a link to it. Seeing the correct way to adapt it can be very instructive.
essentially, if I can determine what relatives a person has, then I can create a unique "FAMILY_ID" for them - once I have that, it would appear as though I could then use the FAMILY_ID to group their addresses and other info together.
The problem I'm having is that if a RELATEDPERSON_ID is linked to a PERSON_ID (PERSON_ID linked to RELATEDPERSON_ID works great), it assigns them a new FAMILY_ID rather than including them into the correct family.
Here's my sql
WITH PERSONS AS
SELECT 'John Smith' AS person, 101 AS person_id, '1 Oracle Drive' AS address FROM dual union all
SELECT 'Jane Smith', 102, '1 Oracle Drive' FROM dual union all
SELECT 'Jack Smith', 103, '8 Oracle Drive' FROM dual union all
SELECT 'John Doe', 104, '10 Oracle Drive' FROM dual union all
SELECT 'Jane Doe', 105, '10 Oracle Drive' FROM dual union all
SELECT 'Pete Smith', 106, '1 Oracle Drive' FROM dual
, RELATIONSHIPS AS
SELECT 101 AS person_id, 102 AS relatedperson_id FROM dual union all
SELECT 102, 101 FROM dual union all
SELECT 104, 105 FROM dual union all
SELECT 105, 104 FROM dual union all
SELECT 106, 101 FROM dual
, table_x
AS
SELECT person_id AS col1
, relatedperson_id AS col2
FROM relationships
, got_relatives AS
SELECT col1
, CONNECT_BY_ROOT col2 AS relative
FROM table_x
CONNECT BY NOCYCLE col1 = col2
OR col2 = col1
SELECT col1
, DENSE_RANK () OVER ( ORDER BY MIN (relative)
) AS family_id
FROM got_relatives
GROUP BY col1The result I expect is:
COL1 FAMILY_ID
102 1
106 1
101 1
105 2
104 2
I suspect that whatever you copied originally had the PRIOR keyword somewhere in the CONNECT BY clause.
Here's one way to do what you want:
WITH all_relationships AS
SELECT person_id
, relatedperson_id
FROM relationships
UNION
SELECT relatedperson_id AS person_id
, person_id AS relatedperson_id
FROM relationships
, got_relatives AS
SELECT CONNECT_BY_ROOT person_id AS person_id
, relatedperson_id
FROM all_relationships
CONNECT BY NOCYCLE person_id = PRIOR relatedperson_id
OR relatedperson_id = PRIOR person_id
, got_family_id AS
SELECT person_id
, MIN (relatedperson_id) AS family_id
, ROW_NUMBER () OVER ( PARTITION BY MIN (relatedperson_id)
ORDER BY person_id DESC
) AS r_num
FROM got_relatives
GROUP BY person_id
SELECT p.person
, CASE
WHEN f.r_num = 1
THEN p.address
END AS address
, p.person_id
, f.family_id
FROM got_family_id f
JOIN persons p ON p.person_id = f.person_id
ORDER BY family_id
, person_id
;Output:
PERSON ADDRESS PERSON_ID FAMILY_ID
John Smith 101 101
Jane Smith 102 101
Pete Smith 1 Oracle Drive 106 101
John Doe 104 104
Jane Doe 10 Oracle Drive 105 104Obviously, you don't have have to display all the columns I displayed above In your first message, you said you wanted only person and address. In your last message, you said you only wanted person_id and family_id. Change the main SELECT clause any way you wish.
I used the lowest person_id in each family as the family_id. You could use DENSE_RANK if you really wanted to have the families numbered 1, 2, 3, ..., but I suspect you don't really care what family_id is, as long as all the members of the family have the same value.
You relationship table has some symmetrical relationships, such as
SELECT 104, 105 FROM dual union all
SELECT 105, 104 FROM dual union alland some asymmetrical relationships. For example, the only relationship involving person_id=106 is
SELECT 106, 101 FROM dualthat is, there is no mirror-image row:
-- SELECT 101, 106 FROM dual union all -- THIS IS NOT IN THE SAMPLE DATAI assume there is no significance to that. As long as 101 and 106 appear on the same row, they are in the same family, regardless of which is the person_id and which is the relatedperson_id.
So the first thing I did above was make sure all the mirror-image rows were represented. That's what all_relationships does.
The next sub-query, got_relatives, is probably what you meant to adapt, but you left off the PRIOR operators.
Got_family_id actually does the grouping, and also computes r_num to determine which is the last member of the family. Only that family member's address will be displayed in the main query.
You could combine got_family_id and the main query; you don't really need a sub-query for that. It would be a little less coding, but I wrote it this way because I think it's a little easier to understand and maintain. -
My 200GB Aperture Library shows 0KB! Not Happy!!
Hi All...
ARRRGH!!
A Charlie Brown moment to be sure... I had resisted switching to Leopard on my field machine (MBP) until just last week, and I am now sorry I did. I do not know if it was definitely Leopard that caused this, but Tiger had been rock-solid reliable for a year running Aperture, and now I have wasted lots of time trying to figure this out...with no progress... hope one of you folks has a good answer.
Problem is as follows...
First, I did not lose my master images...they are in 3 other locations and that is, of course, a good thing.
BUT, what I did lose is almost a week of tweaking, retouching, keywording, etc. on about 3500 images, while working with the client at their offices 2000 miles from here, and I am having a very hard time letting that go...it is part of a book that has already been approved by the client, while we can redo this selection/tweaking/collage work, it will of course not be what they have approved...since that was done in the library. The last thing I want to do is tell the client the dog ate my homework here, and I need a do-over...in this market, that level of incompetence causes the phone to stop ringing.
Before you chastise me for not using vaults, our in-house network backup system is supposed to mirror the files on a nightly basis to a master RAID that gets streamed to tape in the background, and has been fine for 2 years, but over the past week there was some network error that prevented the successful completion of that task from my machine. A Leopard issue with the client software???...the jury is still out.
OK, so as I said I updated to Leopard upon my return from the client, using archive & Install...no apparent issues...
I was attempting to importing/updating a Project captured in the field with my main 200GB library for this client (on a mirrored 500GBx2 RAID FW800), and started getting errors (no good import) and VERY slow performance. Clicking around to any other project in the library was causing it to rebuild previews, it would not import at all from cards or project....nausea begins to set in as I see my weekend plans dissolve, lol
OK, after the performance went into the dumper, I quit Aperture, restarted the Mac, tried it again....same problem. I run Cocktail doing permissions repair on a schedule on Mondays, and DW monthly...and have not run into significant problems prior to this. I then looked at the Info dialog on my Aperture library, and it said the Owner of the file was "_unknown" and that I did not have permissions to R/W the file. I ran Cocktail and rebuilt permissions, log says it was successful...no change to the Aperture library, still says "_unknown". In the Info dialog, I then intuitively changed the owner of the library to my username, typed my password in the dialog to confirm when asked, the system cranked for a bit, and when it stopped...my Aperture library size was ZEROKB in the info dialog!!! Yuck! I tried to change it back...no effect...the one good thing is that the space available on the drive remained at about 179GB, the same as when I started...even though the library dialog says zero...
I need a real tried and true answer, folks...I assume that playing with this or guessing at a fix will end badly. I do not want to have to fly back to the client and spend all that time (mine and theirs) redoing their tweaks and selections...unless I have no other choice.
I am kicking myself over this Leopard upgrade...given its previous rock-solid performance on Tiger, this is simply too much of a coincidence for moi.
I really wanted to be all excited about my new D3 and D300 stuff going into 2.0...darn it....please somebody out there have a magic command line statement that will restore my library...Apple folks, feel free to jump in anytime here... I am scrambling...please help.
Thanks,
KevinOuch. We really feel your pain.
The only thing that jumped out at me was "Project captured in the field with my main 200GB library for this client (mirrored 500GBx2 RAID FW800)." Is it possible that Drive A of the A/B RAID1 array failed and that drive B still has your original data? I use RAID0 (striped), never used RAID1 (mirrored), so I am unfamiliar with how a failed RAID1 drive array presents.
-Allen Wicks -
Best Practices for setting up InDesign Effects for offset printing.
I'm new to the forum so I hope I'm posting my question in the correct place. I'm a prepress supervisor for a company that receives most of it's work as PDFs exported from InDesign. I notice on more and more work (proabably 75%) our customers are setting up their effects in InDesign. We receive files exported from CS3 and CS4, mac and pc. Our prepress system is Prinergy 4.1. We have job options that we recommend customers use for PDF export directly out of the applicaton and we are currently testing PDFX4. The problem is we don't have consistent results with our ripped files, we often see artifacts around items that use certain effects (such as the bevel and emboss effect), many times the customer uses a drop shadow along with the bevel and emboss and we see "pixelation" or low-resolution "jagginess." Files that use feathering often drop part of the feathered image and if black text is touching an effect it will process out to CMYK. If we have the InDesign file it sometimes works to change how the effect is applied (text, object, fill), sometimes we have to flatten on export or write a PDFX4. If we are working with the customer's PDF we often have to flatten at the rip, save the PDF as a postscript file or request the native files to troubleshoot. Are there guidelines to applying effects in Indesign? We would like to try to document for our customers recommended processes for creating files.
Thanks!Our strongest recommendation at Adobe for best PDF print publishing workflow results is to use the PDF/X-4 settings for exporting PDF from InDesign 6 and saving PDF from Adobe Illustrator 14. (The "draft PDF/X-4" support of InDesign 5 and Illustrator 13 was based on a draft version of the ISO PDF/X-4 specification that was significantly modified prior to final ISO standard ratification and publication!) PDF/X-4 provides for a reliable workflow in which live transparency and color management is carried in the PDF file itself; no "flattening" of transparency effects or color conversions occur until as late as possible in the print workflow, preferably at the RIP itself!
PDF/X-4 is an excellent choice for PDF if you have a workflow which uses the Adobe PDF Print Engine technology in the RIP. In your case, Prinergy 4.1 does in fact provide Adobe PDF Print Engine technology. Make sure that (1) you enable the Adobe PDF Print Engine as opposed to CPSI and (2) you don't refine the pages as part of the Prinergy workflow (that process ruins your PDF by converting to PostScript and converting back to PDF - not something you want to do for a reliable PDF workflow with transparency and color management).
Note that even if you do use PDF/X-4 and properly configure your PDF workflow system / RIP, it is still incumbent upon the designer to produce reasonable content. Just because "it looks good on the screen" (additive screen color) doesn't mean that it will reasonably translate to ink on substrate (subtractive printing color). Adobe does provide guidelines for use of transparency and color on its website for use by designers to guide them.
- Dov -
Help needed in understanding the concept of hierarchical queries
I really need help in this matter. I have a flafile containing about 4000 rows. It is from my supplier, it's structure is as follows:
create table Flatfile
(Pgroup varchar2(30),
Pclass varchar2(30),
Manufacturer varchar2(30),
Article varchar2(30),
Price Number(6,2));
Insert into Flatfile Values
('Application Software','Database Software','Oracle','Oracle 10G',115);
Insert into Flatfile Values
('Application Software','Database Software','Microsoft','MS SQL Server 2000',200);
Insert into Flatfile Values
('Application Software','Spreadsheet Software','Microsoft','Excel',100);
Insert into Flatfile Values
('Monitor','15"','Acer','Acer 15"" TFT superscreen',199);
Insert into Flatfile Values
('Monitor','15"','Sony','Sony R1500 flat',225);
Insert into Flatfile Values
('Monitor','17"','Philips','Philips Flatscreen',250);
Insert into Flatfile Values
('Monitor','19"','Viewsonic','Viewsonic PLasma Monitor',275);
Insert into Flatfile Values
('Processor','AMD','AMD','FX-55',600);
Insert into Flatfile Values
('Processor','Intel','Intel','P4 3 GHZ',399);
My goal is to make a hierarchical query with the start with and connect by clauses. From what I have read is that I need to normalize the data of the flatfile.
How do I achieve a table which I can query so that the query will represent the hierarchy that exists. Namely
Pgroup
++Pclasse
Application Software
++Database Software
++Spreadsheet Software
So a 2-level hierarchy. I'd like to understand this simple concept first. I built on the knowledge that I gain. So the questions are:
1.What do I need to do to make the table so that I can use a hierarchical query on it?
2. How should the query syntax be?
3. Is it also possible to get the data in the hierarchical query sorted asec?
I would only like to use the simple structures of the start with and connect by clauses first. I've read there are some new additions to 10G. The problem with the examples used by the tutorials is that the tables are already made so that they are suitable for hierarchical queries. I hope to understand it by this example. And take it a step further.
Sincerely,
PetePrimarily hierarchy query serves to process tree-like structures which RDBMS simulates using through parent-child relation, often in a single table (see famoust
EMP table where employee can have the manager who is an employee at the same time).
In your case it could look like:
SQL> select pgroup, pclass from flatfile;
PGROUP PCLASS
Application Software Database Software
Application Software Database Software
Application Software Spreadsheet Software
Monitor 15"
Monitor 15"
Monitor 17"
Monitor 19"
Processor AMD
Processor Intel
Application Software
Monitor
Processor
12 rows selected.
SQL> select decode(level,1,pclass,' ' || pclass), Manufacturer from flatfile
2 start with pgroup is null
3 connect by prior pclass = pgroup
4 /
DECODE(LEVEL,1,PCLASS,''||PCLASS MANUFACTURER
Application Software
Database Software Oracle
Database Software Microsoft
Spreadsheet Software Microsoft
Monitor
15" Acer
15" Sony
17" Philips
19" Viewsonic
Processor
AMD AMD
Intel Intel
12 rows selected.The hierarchy syntax is described completely in the documentation including
LEVEL and PRIOR keywords.
As for the ordering question you can use siblings ordering:
SQL> select decode(level,1,pclass,' ' || pclass), Manufacturer from flatfile
2 start with pgroup is null
3 connect by prior pclass = pgroup
4 order siblings by 1 desc
5 /
DECODE(LEVEL,1,PCLASS,''||PCLASS MANUFACTURER
Processor
Intel Intel
AMD AMD
Monitor
19" Viewsonic
17" Philips
15" Acer
15" Sony
Application Software
Spreadsheet Software Microsoft
Database Software Oracle
Database Software Microsoft
12 rows selected.Rgds. -
Regular expressions in Format Definition add-on
Hello experts,
I have a question about regular expressions. I am a newbie in regular expressions and I could use some help on this one. I tried some 6 hours, but I can't get solve it myself.
Summary of my problem:
In SAP Business One (patch level 42) it is possible to use bank statement processing. A file (full of regular expressions) is to be selected, so it can match certain criteria to the bank statement file. The bank statement file consists of a certain pattern (look at the attached code snippet).
:61:071222D208,00N026
:86:P 12345678BELASTINGDIENST F8R03782497 $GH
$0000009 BETALINGSKENM. 123456789123456
0 1234567891234560
:61:071225C758,70N078
:86:0116664495 REGULA B.V. HELPMESTRAAT 243 B 5371 AM HARDCITY HARD
CITY 48772-54314
:61:071225C425,05N078
:86:0329883585 J. MANSSHOT PATTRIOTISLAND 38 1996 PT HELMEN BIJBETA
LING VOOR RELOOP RMP1 SET ORDERNR* 69866 / SPOEDIG LEVEREN
:61:071225C850,00N078
:86:0105327212 POSE TELEFOONSTRAAT 43 6448 SL S-ROTTERDAM MIJN OR
DERNR. 53846 REF. MAIL 21-02
- I am in search of the right type of regular expression that is used by the Format Definition add-on (javascript, .NET, perl, JAVA, python, etc.)
Besides that I need the regular expressions below, so the Format Definition will match the right lines from my bankfile.
- a regular expression that selects lines starting with :61: and line :86: including next lines (if available), so in fact it has to select everything from :86: till :61: again.
- a regular expression that selects the bank account number (position 5-14) from lines starting with :86:
- a regular expression that selects all other info from lines starting with :86: (and following if any), so all positions that follow after the bank account number
I am looking forward to the right solutions, I can give more info if you need any.Hello Hendri,
Q1:I am in search of the right type of regular expression that is used by the Format Definition add-on (javascript, .NET, perl, JAVA, pythonetc.)
Answer: Format Definition uses .Net regular expression.
You may refer the following examples. If necessary, I can send you a guide about how to use regular expression in Format Defnition. Thanks.
Example 6
Description:
To match a field with an optional field in front. For example, u201C:61:0711211121C216,08N051NONREFu201D or u201C:61:071121C216,08N051NONREFu201D, which comprises of a record identification u201C:61:u201D, a date in the form of YYMMDD, anther optional date MMDD, one or two characters to signify the direction of money flow, a numeric amount value and some other information. The target to be matched is the numeric amount value.
Regular expression:
(?<=:61:\d(\d)?[a-zA-Z]{1,2})((\d(,\d*)?)|(,\d))
Text:
:61:0711211121C216,08N051NONREF
Matches:
1
Tips:
1. All the fields in front of the target field are described in the look behind assertion embraced by (?<= and ). Especially, the optional field is embraced by parentheses and then a u201C?u201D (question mark). The sub expression for amount is copied from example 1. You can compose your own regular expression for such cases in the form of (?<=REGEX_FOR_FIELDS_IN_FRONT)(REGEX_FOR_TARGET_FIELD), in which REGEX_FOR_FIELDS_IN_FRONT and REGEX_FOR_TARGET_FIELD are respectively the regular expression for the fields in front and the target field. Keep the parentheses therein.
Example 7
Description:
Find all numbers in the free text description, which are possibly document identifications, e.g. for invoices
Regular expression:
(?<=\b)(?<!\.)\d+(?=\b)(?!\.)
Text:
:86:GIRO 6890316
ENERGETICA NATURA BENELU
AFRIKAWEG 14
HULST
3187-A1176
TRANSACTIEDATUM* 03-07-2007
Matches:
6
Tips:
1. The regular expression given finds all digits between word boundaries except those with a prior dot or following dot; u201C.u201D (dot) is escaped as \.
2. It may find out some inaccurate matches, like the date in text. If you want to exclude u201C-u201D (hyphen) as prior or following character, resemble the case for u201C.u201D (dot), the regular expression becomes (?<=\b)(?<!\.)(?<!-)\d+(?=\b)(?!\.)(?!-). The matches will be:
:86:GIRO 6890316
ENERGETICA NATURA BENELU
AFRIKAWEG 14
HULST
3187-A1176
TRANSACTIEDATUM* 03-07-2007
You may lose some real values like u201C3187u201D before the u201C-u201D.
Example 8
Description:
Find BP account number in 9 digits with a prior u201CPu201D or u201C0u201D in the first position of free text description
Regular expression:
(?<=^(P|0))\d
Text:
0000006681 FORTIS ASR BETALINGSCENTRUM BV
Matches:
1
Tips:
1. Use positive look behind assertion (?<=PRIOR_KEYWORD) to express the prior keyword.
2. u201C^u201D stands for that match starts from the beginning of the text. If the text includes the record identification, you may include it also in the look behind assertion. For example,
:86:0000006681 FORTIS ASR BETALINGSCENTRUM BV
The regular expression becomes
(?<=:86:(P|0))\d
Example 9
Description:
Following example 8, to find the possible BP name after BP account number, which is composed of letter, dot or space.
Regular expression:
(?<=^(P|0)\d)[a-zA-Z. ]*
Text:
0000006681 FORTIS ASR BETALINGSCENTRUM BV
Matches:
1
Tips:
1. In this case, put BP account number regular expression into the look behind assertion.
Example 10
Description:
Find the possible document identifications in a sub-record of :86: record. Sub-record is like u201C?00u201D, u201C?10u201D etc. A possible document identification sub-record is made up of the following parts:
u2022 keyword u201CREu201D, u201CRGu201D, u201CRu201D, u201CINVu201D, u201CNRu201D, u201CNOu201D, u201CRECHNu201D or u201CRECHNUNGu201D, and
u2022 an optional group made up of following:
a separator of either a dot, hyphen or slash, and
an optional space, and
an optional string starting with keyword u201CNRu201D or u201CNOu201D followed by a separator of either a dot, hyphen or slash, and
an optional space
u2022 and finally document identification in digits
Regular expression:
(?<=\?\d(RE|RG|R|INV|NR|NO|RECHN|RECHNUNG)((\.|-|/)\s?((NR|NO)(\.|-|/))?\s?)?)\d+
Kind Regards
-Yatsea -
In need of Forensic Specialist to perform complete analyisis on laptop - been hacked -
Hey folks -
This is Paintbrush a 56 year old who is relatively new to computers & currently at full all out war with hackers & going through a lonely hell for several months now - using defective weaponry - This devious and
insidious infection must be extinguished before others suffer the way I have - I'll provide a thumb-nail sketch of what's up & what I think I need to resolve this crisis - any input will be welcome -
Apparently I have been hacked for several months now and been taken for some cash -
Many unauthorized credit card applications attempted
HP Smart Friends - In 8 problem solving sessions in the past few weeks - failed
Hackers and viruses still present
Discovered my computer, purchased new 9/2012 on line Wallmart was manufactured in 2005 and was previously owned or at least used several times before it was sold to me as new -
I believe Vista or XP or both were previously installed OS with Windows 7 layed over without thorough clean out-
Event logs - even on windows 7 installed 2009, show significant activity prior to purchase or the installation of windows 7 - with thousands of event errors logged - many critical dating back to 2005
several attempts to completely restore computer to pristine factory condition have - failed - viruses remain in creases & hide in innocuous files such as sample pictures and you-cam which I never downloaded - can't uninstall the files as they
multiply - many games remain installed - last I played was probably Mario brothers - Parameters can't be reset - etc. etc.
Many unauthorized users present with full permissions - can't delete them
Before I introduce new equipment into a contaminated environment & have MS clean out the OS and have HP deal with the hardware, I'd like to have a full accounting of exactly what has transpired with this laptop since its manufacture date
- including - all prior OS - all software - prior users - current unauthorized users - and their activities -
Experience tells me - that it is important to enter any negociations from a stand-point of accurate knowledge & I need this as evidence should any problems arise with new equipment in the future which leads back to the root
of present difficulties. This list could continue on and on and I need immediate assistance in securing the safety of my current life as well as my future. In the meantime - I am frozen and frightened without functioning tools to proceed and
not knowing who to trust.
To the right professional, I am more than willing to grant remote access & pay a modest fee. I need for everything to first be backed up in case of error - and then perform a handful of task specific reports.
I am in desperate need of help right now so any assistance would be greatly appreciated -
Sincerely, PaintbrushHey folks -
This is Paintbrush a 56 year old who is relatively new to computers & currently at full all out war with hackers & going through a lonely hell for several months now - using defective weaponry - This devious and
insidious infection must be extinguished before others suffer the way I have - I'll provide a thumb-nail sketch of what's up & what I think I need to resolve this crisis - any input will be welcome -
Apparently I have been hacked for several months now and been taken for some cash -
Many unauthorized credit card applications attempted
HP Smart Friends - In 8 problem solving sessions in the past few weeks - failed
Hackers and viruses still present
Discovered my computer, purchased new 9/2012 on line Wallmart was manufactured in 2005 and was previously owned or at least used several times before it was sold to me as new -
I believe Vista or XP or both were previously installed OS with Windows 7 layed over without thorough clean out-
Event logs - even on windows 7 installed 2009, show significant activity prior to purchase or the installation of windows 7 - with thousands of event errors logged - many critical dating back to 2005
several attempts to completely restore computer to pristine factory condition have - failed - viruses remain in creases & hide in innocuous files such as sample pictures and you-cam which I never downloaded - can't uninstall the files as they
multiply - many games remain installed - last I played was probably Mario brothers - Parameters can't be reset - etc. etc.
Many unauthorized users present with full permissions - can't delete them
Before I introduce new equipment into a contaminated environment & have MS clean out the OS and have HP deal with the hardware, I'd like to have a full accounting of exactly what has transpired with this laptop since its manufacture date
- including - all prior OS - all software - prior users - current unauthorized users - and their activities -
Experience tells me - that it is important to enter any negociations from a stand-point of accurate knowledge & I need this as evidence should any problems arise with new equipment in the future which leads back to the root
of present difficulties. This list could continue on and on and I need immediate assistance in securing the safety of my current life as well as my future. In the meantime - I am frozen and frightened without functioning tools to proceed and
not knowing who to trust.
To the right professional, I am more than willing to grant remote access & pay a modest fee. I need for everything to first be backed up in case of error - and then perform a handful of task specific reports.
I am in desperate need of help right now so any assistance would be greatly appreciated -
Sincerely, Paintbrush -
Consolidating multiple mini DV tapes through dubbing
I have numerous historical family miniDV tapes captured by various family members over the years. Most have significant timecode resets and lots of blank space at end of tape. I was starting to capture this media into FCPX (and maybe this discussion isn't for this specific community) and realized it would be much easier in the long run to manage the media if there were no gaps in the timecode for each tape. Fortunately I have access to 2 miniDV cameras and was going to dub the tapes to create a new tape without gaps in the timecode. My first thought was to just play the tape in cam1 and record in cam2 via 4pin to 4pin firewire. Then I wondered if its possible to have Cam1 play, stop, ffwd, play (repeat), eject, put in another tape, play, stop, ffwd, play (repeat) all the while Cam2 is recstart and recstop appropriately. Will I still get an end to end timecode on Cam2. It seems reasonable and ould potentially reduce the tape collection by over 50%. Just wondering if there are significant issues prior to starting this "consolidation project" that others may have experienced. Equipment is Sony DCR-HC1000 and a Canon Vixia HV30. If this question should go to the Apple "Other Pro Video" community please let me know. Thank you in advance.
The key is to only pause the recording camcorder. Don't stop it and review the contents during a recording session or you'll need to ensure you restart on existing timecode. Otherwise it will reset to zero if it starts recording on a blank section of tape. What you propose should work.
-
Doubt regarding avoiding group by function
i just came to know about a query which will avoid group by function,
select sum(column_name) over ( partition by <coulmns> order by <solumns> )
from <table_name>
now columns specified in the partition by clause, are the one which will be specified under group by clause, i know this works, but can anyone expalain the meaning and significance of over keyword and is it a function, i mean with respect to SQL language that syntax seems to be very much different isn't it???
cheereHi
Analytic functions are not alternative for group by.
Analytic functions are the last set of operations performed in a query except for the
final ORDER BY clause. All joins and all WHERE, GROUP BY, and HAVING clauses are completed before the analytic functions are processed. Therefore, analytic functions can appear only in the select list or ORDER BY clause.
And regarding your question,
see this example from oracle documentation
The following example calculates, for each manager in the sample table
hr.employees, a cumulative total of salaries of employees who answer to that
manager that are equal to or less than the current salary. You can see that Raphaely and Cambrault have the same cumulative total. This is because Raphaely and Cambrault have the identical salaries, so Oracle adds together their salary values and applies the same cumulative total to both rows.
SELECT manager_id, last_name, salary,
SUM(salary) OVER (PARTITION BY manager_id ORDER BY salary
RANGE UNBOUNDED PRECEDING) l_csum
FROM employees;
MANAGER_ID LAST_NAME SALARY L_CSUM
100 Mourgos 5800 5800
100 Vollman 6500 12300
100 Kaufling 7900 20200
100 Weiss 8000 28200
100 Fripp 8200 36400
100 Zlotkey 10500 46900
100 Raphaely 11000 68900
100 Cambrault 11000 68900
100 Errazuriz 12000 80900
149 Taylor 8600 30200
149 Hutton 8800 39000
149 Abel 11000 50000
201 Fay 6000 6000
205 Gietz 8300 8300
King 24000 24000
For clear understanding read the following point:
Whenever the order_by_clause results in identical
values for multiple rows, the function returns the same result for
each of those rows
ITS THE CUMULATIVE SUM HERE.
SO,IF TRY GIVING SAME NAME FOR ALL EMPLOYESS AND see the same result as you were getting with (partition by dept).
so , sum function which u are using here is analytic function and so results in cumulative sum. and when identical values are identified, same result is displayed.
Hope you got it!
Cheers,
Kishore KVR -
Space hog after setting "enable disk"
Hi,
I recently moved my iTunes data form a PC with an XP OS to a Visto OS. I followed the directions in the support pages on how to do that using the ENABLE DISK USE option to synch the ipod playlists etc. to my new PC. It worked fine. However....after I finished, I unchecked the box titled ENABLE DISK USE and the space usage on my ipod grew significantly!
Prior to the move (and prior to checking the "enable disk use" box, I had maybe 1 GB of OTHER on the ipod. Now it is 10.23 GB and I cannot get it to return to the smaller #. I have not added anything of significance; I do not have any vidoes or photos, it is all music and podcasts.
Any tips on why the space is being eaten up? How can I compress it?
Thanks,
LoriTry restoring your iPod. Restoring will erase the iPod's hard drive, reload the software and put it back to default settings. Once the restore is complete follow the on screen instructions and it should connect to iTunes and give you a prompt to automatically update your library onto the fresh installation. If you want to update manually or using selected playlists choose no and it will default to manual mode and you can choose whatever setting you like: Restoring iPod to factory settings with iTunes 7
-
Problems after Battery Update 1.4
Has anyone noticed that since installing the Battery Update 1.4, their battery life has been reduced significantly? Prior to the patch I was getting a good several hours from a full charge, now I am lucky to get 1.5 hours.
Also, while the patch was meant to improve the Macs ability to +'maintain its charge when shut down and not used for an extended period'+, I immediately noticed the first night that I shut down with 3/4 battery and woke up the next morning with 1/4.
I have read of several people having issues with the battery not charging or taking a long time to charge - I haven't noticed if I am having this trouble as well.
Anyone??
Specs:
System Version: Mac OS X 10.5.8 (9L31a)
Battery Information:
Model Information:
Serial Number: DP-ASMB016-3891-2b88
Manufacturer: DP
Device name: ASMB016
Pack Lot Code: 0003
PCB Lot Code: 0000
Firmware Version: 0110
Hardware Revision: 0500
Cell Revision: 0102My battery was great I never had to take my charger with me, but after Battery Update 1.4 my battery only lasts half as long now, and if I didn't use it for a week my battery was still 80%-90% now if I don't use it for a week I only get half an hour before I have to plug it in.
THIS UPDATE HAS CAUSED THE PROBLEMS THAT IT WAS MEANT TO FIX!
I only installed this update to be a good little consumer and have now ruined the performance of my macbook, I have tried to uninstall it and rollback to the previous version with out success.
Please help?
Battery Information:
Model Information:
Serial Number: DP-ASMB016-3770-5315
Manufacturer: DP
Device name: ASMB016
Pack Lot Code: 0003
PCB Lot Code: 0000
Firmware Version: 0110
Hardware Revision: 0500
Cell Revision: 0102 -
Reading previous period value is logic
Hi,
There's a need to read previous period value is logic for some processing, can you please help me out how this can be achieved. I have a selection for time in the package called %TIME_DIM% and I am running for the current period. I have tried following options
First
*WHEN XYZ
*IS "ABC"
*REC = (FACTOR=GET(TIME=PRIOR), SOMEDIM=VALUE)
*ENDWHEN
When above code executed with current period (no record exists for current period) nothing is read.
Second
*XDIMMEBERSET TIME = PRIOR, %TIME_DIM%
*WHEN XYZ
*IS "ABC"
*REC = (FACTOR=GET(TIME=PRIOR), SOMEDIM=VALUE)
*ENDWHEN
In the above case no record is selected and surprisingly the select statement fired (got it form the log) is for the last time period maintained in the system - 1. So if I have time dimension members till 2020.DEC this picks up 2020.NOV. I didn't understand why?
Would appreciate help on this.
ThanksAnand,
It is not very clear what you are trying to achieve here.
Perhaps you already have this, but below some explanation about special time selections that you can use in SQL logic.
The time shift instructions
To simplify the calculation of leads and lags in financial reporting applications, the following new instructions have been implemented for SQL-based logics:
PRIOR
NEXT
BASE
FIRST
The instructions PRIOR and NEXT support an optional numeric parameter. This parameter represents the number of time periods by which the current period must be shifted. If omitted, the functions will assume a time shift of 1 period (forward or backwards). Negative values are accepted (A negative value for a NEXT function corresponds to a positive value for a PRIOR function and vice-versa).
Examples:
TIME=NEXT // In a monthly application this means next month
TIME=PRIOR(3) // Three periods backwards
TIME=NEXT(-3) // Same as PRIOR(3)
The keyword BASE always represents the last period of prior fiscal year. When the fiscal year is a normal calendar year and the frequency is monthly, the base period of 2004.JUN is 2003.DEC.
The instruction BASE can be useful in YTD applications, where the opening balances need to be retrieved from the last period of prior year.
The keyword FIRST always represents the first period of the current fiscal year. When the fiscal year is a normal calendar year and the frequency is monthly, the base period of 2004.JUN is 2004.JAN.
In case the time shift goes past the boundaries of the TIME dimension, these time shift functions will return no period.
These functions can be used in four ways:
- To re-direct the destination period in a *REC statement
Example 1: *REC(TIME=NEXT)
Example 2: *REC(TIME=BASE)
- To retrieve a value from a different period in a *REC statement
Example 1: *REC(FACTOR=GET(TIME=PRIOR(3))
Example 2: *REC(FACTOR=GET(TIME=BASE)
- To add periods to the selected data region in a XDIM_MEMBERSET statement
Example: *XDIM_MEMBERSET TIME=PRIOR, %TIME_SET%
In this example, if the first modified period is 2004.APR, the instruction PRIOR will add 2004.MAR to the region to process).
- When the keywords PRIOR, FIRST or BASE are added to a XDIM_MEMBERSET instruction, the time period PRIOR, FIRST or BASE can be also evaluated in a WHEN / ENDWHEN structure, like in the following example:
*WHEN TIME
*IS PRIOR
// ignore
*ELSE
*REC(u2026)
*ENDWNHEN
In presence of an XDIM_MEMBERSET containing the PRIOR keyword, like in the above example, the WHEN structure here shown will recognize 2004.MAR as PRIOR period.
Following is an example of logic that performs a carry-forward of account ACCREC, while adding to it the periodic amount from EXTSALES.
*XDIM_MEMBERSET TIME=PRIOR,%SET%,%PREFIX%.DEC
*CALC_EACH_PERIOD
*WHEN TIME
*IS PRIOR
*WHEN ACCOUNT
*IS ACCREC
*REC(ACCOUNT=u201DOPEACCRECu201D,TIME=NEXT)
*ENDWHEN
*ELSE
*WHEN ACCOUNT
*IS EXTSALES
*REC(FACTOR=-1,ACCOUNT="OPEACCREC",TIME=NEXT)
*REC(FACTOR=-1,ACCOUNT="ACCREC")
*IS OPEACCREC
*REC(ACCOUNT=u201DACCRECu201D)
*REC(ACCOUNT=u201DACCRECu201D,TIME=NEXT)
*ENDWHEN
*ENDWHEN
Hope this helps,
Alwin -
I am trying to resolve an issue with our staff calendar using our iCal server. Our iCal server is accessed in two ways. We use both the webcalendar feature of our group wiki via the local web server and we also sync our ical applications to this same calendar. The issue we are having is that if a user adds an event to the calendar via iCal the timezone is correctly set. If the event is entered on the web calendar the event show correctly on the web calendar only but the event is off by one day in the iCal app due to an incorrect time zone setting - the event is set to UTC rather than the correct timezone of EST.
In both Server Admin and System Preferences our timezone is correctly set to Washington DC - EST.
Any help of insight would be awesome - thanksHi,
I relocated all of the relevant originals to a single directory, ran the exiftool command there and then re-consolidated.
Here's my suspicion of what's going on. First, here's the overall story of what I did:
Import pictures into aperture
Add keywords in aperture
Re-locate the originals
Run the exiftool
(note that the original keywords have been lost -- only on the files that passed the -if condition)
Re-consolidate the originals
My understanding is that when you add a keyword in aperture, it does not edit the original image file but rather adds the keyword in the Aperture metadata database. I *think* keyword is actually a single text string which aperture parses (looking for commas) to separate individual keywords. When exiftool changes this string, it does, in fact, append the "No GPS Time Stamp" keyword, but it is appending it to a blank string (since the prior keywords are stored in the Aperture metadata DB -- which exiftool isn't accessing -- rather than the original image files). Then Aperture sees the updated "Keywords" tag -- which now contains only "No GPS Time Stamp" -- and seems to replace its keyword list with the contents of this EXIF tag, rather than intelligently determining which changes were incremental and applying them.
Put another way, I think Aperture says "hey, the keywords field has been updated on this file. let me update my metadata DB to match -- which means overwriting the existing list 'PriorTag' with the string 'No GPS Time Stamp'." rather than saying "hey, this keywords field has been updated on this file. I notice it didn't use to have 'No GPS Time Stamp' included in its comma-separated list and it does now, so let's append 'No GPS Time Stamp' to the list of keywords I have for this file in my metadata DB.")
For what it's worth, I saw the same behavior if I replace 'No GPS Time Stamp' in your command with ', No GPS Time Stamp'.
But I'm all set now; thanks again!!
-Mike -
Want to use analytical function as a Virtual column
I am wondering if I can use an analytic function as a virtual column to a table?
The table conatins a field named BUSINESS_RUN_DATE, which becomes the EXPIRY_DATE of the on the previous record. So we want to add this value right into the table without resorting t a view.
This is what I tried to add the column to the table:
alter table stg_xref_test_virtual
ADD (expiry_date2 date generated always AS (max (business_run_date) over
*(PARTITION BY ntrl_src_sys_key order by business_run_date*
rows between 1 preceding and 1 following))) ;
It give me an error that GROUP BY is not allowed.
Can someone help out>?
Thanks,
IanFrom the documentation.
[Column Expressions|http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/expressions005.htm#BABIGHHI]
A column expression, which is designated as column_expr in subsequent syntax diagrams, is a limited form of expr. A column expression can be a simple expression, compound expression, function expression, or expression list, but it can contain only the following forms of expression:* Columns of the subject table — the table being created, altered, or indexed
* Constants (strings or numbers)
** Deterministic functions — either SQL built-in functions or user-defined functions*
No other expression forms described in this chapter are valid. In addition, compound expressions using the PRIOR keyword are not supported, nor are aggregate functions.
You can use a column expression for these purposes:
* To create a function-based index.
* To explicitly or implicitly define a virtual column. When you define a virtual column, the defining column_expr must refer only to columns of the subject table that have already been defined, in the current statement or in a prior statement.
The combined components of a column expression must be deterministic. That is, the same set of input values must return the same set of output values.
Maybe you are looking for
-
HT3910 a blue screen appears at the start up
When I start my macbookpro a blue screen appears and stays. Nothing further happens ; can anyone help please?
-
Error when installing update for desktop software
when i try to update my software i am getting the error message saying Blackberry Destiop Software requires that Microsoft Visual C++ 2008 SP1 RAedistributable package is installed . Can some one please help me
-
How to transfer itunes music from old computer to new computer
I am sure someone has asked this question before but darned if I can find it anywhere...I have a new computer and want to transfer my music (which was loaded from CDs) from my old computer to my new one. I also want to keep my playlists that I spent
-
[Solved] Dependency handling in makepkg / pacman -U
Hi everybody, I have a quick question about makepkg/pacman dependency resolution. I have a 'fast' machine which I want to do all the compiling stuff, and a 'slow' machine, which I want to use .pkg.tar.gz built on the fast machine. After downloading a
-
How to retain the button over state while scrolling over a Pop-up Menu
Are there updated instruction for Fireworks 8? http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_15926&sliceId=1