SQL expert needed
I am running Access 2003 and MX 6.1
Lets say I have the following column in the database:
cs_referer
http://www.upstateweb.com/index.cfm?PageID=1
http://www.upstateweb.com/index.cfm?PageID=72
http://www.upstateweb.com/index.cfm?PageID=96
http://www.upstateweb.com/index.cfm?PageID=104
http://www.google.com/search?q=annoying+return+receipt+in+emails&hl=en&lr=&start=40&sa=N
http://www.google.com/search?q=%22speakeasy+speed+test%22+not+working&hl=en&lr=&start=30&s a=N
http://www.google.com/search?q=%22spartanburg+county+foundation%22&hl=en&lr=&start=40&sa=N
http://search.yahoo.com/search?p=graphic+designer+job+raleigh%nc+sc&sm=Yahoo%21+Search
http://search.yahoo.com/search?p=graphic+designer+job+spartanburg%2C+sc&sm=Yahoo%21+Search
What I want is a query that will trim and group by the domain
so that the outcome would look like:
DOMAIN COUNT
http://www.upstateweb.com 4
http://www.google.com 3
http://search.yahoo.com 2
The query would be something like (expect for the MID
statement. I think something else needs to go here):
<cfquery name="getTopReferers" datasource="#DSN#
maxrows="10">
SELECT MID(cs_referer, 1,?) AS RefererSite,
count(cs_referer) AS SiteCount
FROM Webstats
GROUP BY MID(cs_referer,1,?)
ORDER BY count(cs_referer) DESC
</cfquery>
I don't think the Mid use is correct, but I can't think of
what would work here to get the proper outcome. I appreciate
anyone's help in advance!
Perhaps something like the attached. If the pattern '.com/'
does not exists in each row, then you probably could use MID() with
a starting point after the // characters and using '/' as your
pattern,. Of course you would have to adjust the InStr()+3 value to
subtract the starting point so that your length value is adjusted
from that point.
Phil
Similar Messages
-
How to be a Forms & PL/SQL Expert?
Hi Experts, I am very new to Oracle Forms and PL/SQL. I have been doing development in Forms (mostly in 10g but I also in 6i) and PL/SQL for little over 2 years.
My problem is, I don't know much about how to progress up the ladder to be an Oracle Forms & PL/SQL expert.
My other big problem is trying to find out how to keep pace with the latest development in Forms and PL/SQL.
For example, my manager asked me how to print a file in a client printer. I could not give him a solution at once. Only after couple of hours of searching did I find the solution using WebUtil.
Another instance a manger asked me how to encrypt data in Oracle forms. Again I had to do an extensive search on the web.
Can an "expert" give a solution at once, without going to the web?
Another time I was asked to do a performance tuning and could not do it since I have not done before. I tried to follow the method found in this site using a personal DB in my machine but could not simulate a situation.
How do you keep track of latest developments?
Are their any sites to go to?
Is there a routine you can follow?
Do you have to do R&D regularly? How often?
How many hours of reading web-sites (on Forms, PL/SQL stuff) should you do for a week?
How do YOU experts do it?
You advice would be greatly appreciated.First of all I don't consider myself an expert, so my advice here might be flawed as they are based on my experiences ;)
Can an "expert" give a solution at once, without going to the web?Frankly I hardly know how to write a file using text_io or utl_file, or use some other somewhat regular-use supplied packages without looking them up in the documentation. Well I somehow know, but the code will most certainly throw compile errors. This is due to the fact that the entire oracle documentation is huge, and there are version dependend manuals, and I never liked memorizing things I could easily look up. It just doesn't make sense to memorize entire documentations when you can look them up. So even for basics I go to the web...
For example, my manager asked me how to print a file in a client printer. I could not give him a solution at once. Only after couple of hours of searching did I find the solution using WebUtil. So in the end you found a solution yourself didn't you?
Another instance a manger asked me how to encrypt data in Oracle forms. Again I had to do an extensive search on the web.I am around forms a few years, and I don't know an ad-hoc answer to that. I might have a clue, but for a advice I'd have to try and most certainly consult google.
Another time I was asked to do a performance tuning and could not do it since I have not done before. I tried to follow the method found in this site using a personal DB in my machine but could not simulate a situation. And you know at least where to start now even if you didn't solve the problem, don't you?
When I started programming C/C++ in school we had a teacher who I consider a C-Guru. Sometimes the answer to how would I implement X? was I don't know exactly yet, but let me do some research and I'll show you. Needless to say that we certainly got our answers. The same guy taught Java with the opening phrase I don't know much about Java, but it is Object-Oriented, the Syntax is C like,and the documentation is quite extensive. He explained things better to us then others who asserted knowing Java.
IMHO curiosity and being keen to experiment are much more valuable then the ability to memorize manuals and APIs. You might solve your problems with your actual knowledge today, but tomorrow there are new challenges which require new knowledge to be accumulated.
If you face a problem don't hesitate to get your hands dirty. If a program doesn't do what it's supposed to do fire up the debugger, look at diagnostic infos and see why it fails instead crying about that you don't know why. If you need to learn a new language install the compiler, and write code until it compiles and does what you want it to do. If you need to work with the new asdf server enterprise edition install it, turn it upside down, blow it's config into pieces until it stops working and maybe get it running after that.
Everything else boils down to showing an active interest in the things you do. There is no formula saying "spend X hours a week on asktom and eventually become a database expert". I regularly (can't say how often) visit asktom because I like reading the questions there. I don't do it because I must or want to become an expert someday, it is simple curiosity.
As for places to look this is answered easily: the key source for informations on new products is the vendors homepage. It's OTN for oracle, MSDN for microsoft, ubuntu.com for ubuntu, and what ever else. Technical articles etc. about the products are at least listed there.
Of course in software development there is (at least) one rule which always applies:
always write code as if the person who will maintain your code is a maniac serial killer that knows where you live
cheers -
OCA certification after sql expert exam
Dear all
I have passed sql expert Exam in oracle 10g this week,now i want to go for OCA. should i take 1z0-042 exam? or i have one more query in my mind that i have qualified sql expert in oracle 10g ..can i switch over to oracle 11g and clear the paper at the same level required in OCA certification path in oracle 10g as sql expert exam code 1z0-047 is same in both 10g and 11g.please tell me the best book and material
Thanks878927 wrote:
Dear all
I have passed sql expert Exam in oracle 10g this week,now i want to go for OCA. should i take 1z0-042 exam? or i have one more query in my mind that i have qualified sql expert in oracle 10g ..can i switch over to oracle 11g and clear the paper at the same level required in OCA certification path in oracle 10g as sql expert exam code 1z0-047 is same in both 10g and 11g.please tell me the best book and material
ThanksIn terms of certification pre-reqs for DBA and PL/SQL OCA's you have an 1z0-147 which is one of the certification exams that satisfy that requirement.
Afer passing 1z0-047 you need to consider whether you should take a developer track or DBA track
From your posts you seem to consider 10g DBA OCA .... 11g DBA OCA would be better but if going down the DBA route your eventual goal should be DBA OCP ..... and that requires mandatory training and your may need to factor that in ... sometimes people may find workforce 10g DBA training is the more accessable to themselves.
As for the books, both the Sybex and Oracle Press exam focused books have their advantages and disadvantages and faults. Oracle Documentation remains the authorative source.
Visit and browse http://certification.oracle.com -
How to practise on the examples used in SQL Expert book
I need to study for the oracle sql expert exam and I am using the book SQL Expert exam guide by Steve O' Hearn.
Can someone please suggest how to practise on the examples of this book ?dfcii wrote:
Good morning,
IMHO, I would have suggested that one build the schemas and tables they need from scratch. If one is to be an Oracle Certified Expert in SQL, one should be able to do perform those tasks quickly and accurately. I realize that in larger shops, those tasks might be/are deligated to the DBA team, but having worked in both small and large shops, I believe that being an "expert" should include more than the ability to copy source code and run somoene else's sql scripts.
Thanks,
Don.
Edited by: dfcii on Jan 9, 2012 6:57 AMI think both viewpoints are valid.
- In some ways one does not want to spend time dealing with books misprints and typos when really to be able to do the SQL expert exam one should be on top of anyway.
- In other sense getting ones one test data togther is useful.
..... I possibly remember badly .... but i seem to miss where the scripts mysef (at least initially) and spent some wasted time pumping in a fair bit of data for the earlier examples. -
Regarding SQL Expert certification (1ZO - 047) 12c validated
Hi ,
I am planning to take up 1ZO - 047(Oracle Database SQL Expert) certification in this month . Need some suggestions from people (Preferably who have taken up this exam after September 15th 2014) for clearing the exam and also some references like good books and sites that can help me achieve the same.Shanmugavel wrote:
Hi ,
I am planning to take up 1ZO - 047(Oracle Database SQL Expert) certification in this month . Need some suggestions from people (Preferably who have taken up this exam after September 15th 2014) for clearing the exam and also some references like good books and sites that can help me achieve the same.
I can do little better than to refer you to Matthew's resources here:
Oracle Certification Prep: Exam details and preparation resources for 1Z0-047
and update here:
http://certmag.com/oracles-sql-expert-exam-slated-facelift-sept-15/
You are already aware of the updated topics post September 2014. You should newly introduced topics ( and there is really only a handful ) will not be in e.g. O'Hearn's book and you ill need to study these and practice from oracle documention; Quality oracle blogs; Oracle Learning Library etc.
he additional topics probably come in two categories: features present in 11g but not previously present on the exam. And features introduced with 12c.
While the exam description reads: This exam has been validated against Oracle Database 10g, Oracle Database 11g, Oracle Database 11g Release 2, and Oracle Database 12c Release 1 given 12c features are tested this should now rad This exam has been validated against Oracle Database 12c Release 1. ( Not 10g / 11g ). -
In JDBC Sender Adapter , the server is Microsoft SQL .I need to pass current date as the input column while Executing stored procedure, which will get me 10 Output Columns. Kindly suggest me the SQL Query String , for executing the Stored Procedure with Current date as the input .
Hi Srinath,
The below blog might be useful
http://scn.sap.com/community/pi-and-soa-middleware/blog/2013/03/06/executing-stored-procedure-from-sender-adapter-in-sap-pi-71
PI/XI: Sender JDBC adapter for Oracle stored procedures in 5 days
regards,
Harish -
SQL Gurus : Need Help in building SQL query
SQL Gurus,
Need your expertise to solve my below problem:
- I have a column that had comma separated data, basically there are the levels in a hierarchy. eg The same column could have the following data:
Row 1: R1L1, R1L2, R1L3
Row 2: R2L1, R2L2
Row 3: R3L1, R3L2, R3L3, R3L4
For assumption purpose lets assume that there are maximum 5 Levels
I want to put this data from this column into another table which holds the levels. I am expecting the output in another table as follows:
Col1____Col2 ____Col3____Col4____Col5
Row 1: R1L1___R1L2____R1L3____null_____null
Row 2: R2L1___R2L2____null_____null_____null
Row 3: R3L1___R3L2____R3L3____R3L4___null
How do i achieve this ? ie coverting the comma separated values in a column to separate columns. The # of values in each columns could be different as I have showb above
Regards,
pkwith t as (
select 'R1L1, R1L2, R1L3' c1 from dual union all
select 'R2L1, R2L2' c1 from dual union all
select 'R3L1, R3L2, R3L3, R3L4' c1 from dual
select substr(c1,instr(', ' || c1 || ', ',', ',1,mod(l,5) + 1),instr(', ' || c1 || ', ',', ',1,mod(l + 1,5) + 1) - instr(', ' || c1 || ', ',', ',1,mod(l,5) + 1) - 2) col1,
substr(c1,instr(', ' || c1 || ', ',', ',1,mod(l - 1,5) + 1),instr(', ' || c1 || ', ',', ',1,mod(l,5) + 1) - instr(', ' || c1 || ', ',', ',1,mod(l - 1,5) + 1) - 2) col2,
substr(c1,instr(', ' || c1 || ', ',', ',1,mod(l - 2,5) + 1),instr(', ' || c1 || ', ',', ',1,mod(l - 1,5) + 1) - instr(', ' || c1 || ', ',', ',1,mod(l - 2,5) + 1) - 2) col3,
substr(c1,instr(', ' || c1 || ', ',', ',1,mod(l - 3,5) + 1),instr(', ' || c1 || ', ',', ',1,mod(l - 2,5) + 1) - instr(', ' || c1 || ', ',', ',1,mod(l - 3,5) + 1) - 2) col4,
substr(c1,instr(', ' || c1 || ', ',', ',1,mod(l - 4,5) + 1),instr(', ' || c1 || ', ',', ',1,mod(l - 3,5) + 1) - instr(', ' || c1 || ', ',', ',1,mod(l - 4,5) + 1) - 2) col5
from (
select c1,
length(c1) - length(replace(c1,',')) + 5 l
from t
COL1 COL2 COL3 COL4 COL5
R1L3 R1L2 R1L1
R2L2 R2L1
R3L4 R3L3 R3L2 R3L1
SQL> SY. -
SQL query needed to identify cancelled invoice where distribution lines
SQL query needed to identify cancelled invoice where distribution lines Debit is not equal Credit line item in particular
Is there a way from back end FROM ap_invoice_distributions_all where we can find for the cancelled invoice where distribution lines Debit is not equal Credit line item
Regards,
Prakash RanjanHello Prakash
Can you please see if this query helps you?
SELECT i.invoice_id, i.invoice_amount, nvl(sum(d.amount),0)
FROM ap_invoice_distributions_all d, ap_invoices_all i
WHERE i.org_id = <you org_id>
AND i.invoice_id = d.invoice_id
AND d.line_type_lookup_code not in ('PREPAY')
AND i.cancelled_date IS NOT NULL
GROUP BY i.invoice_id, i.invoice_amount
HAVING (i.invoice_amount <> nvl(sum(d.amount),0))
ORDER BY i.invoice_id asc
Octavio -
LabView expert needed ASAP to help complete a project. Specific skills
needed are database connectivity experience with the LV Database
Toolkit. Initial phase is approx. 15-20 hours of work with the
potential for much more if we find the right person. Must be in Austin,
TX for initial on site work.
Job location is Austin, TX.
Compensation: $50-75/hrHello,
My name is Robert Bohannon and I reside in the Denver, CO area. I’ve attached my resume for your review. I have been doing automated test system development for over 15 years and have been an independent consultant for over 5 years. I’m writing you to express my interest in your job posting in the LabView Job Openings Forum. I am currently looking for contract opportunities and I believe that my services could be of great value to you.
Please review my resume and if you find any experience of mine that may potentially fit your job requirements, please let me know. I will provide references upon request.
Thank you for your time.
Robert Bohannon
Attachments:
resume.2006.05.21.pdf 315 KB -
Hie there everyone ...
i have a little question puzzling me ...
just today i passed my , Oracle DataBase 10g Administration I --- ( 1Z0-042 ) ... on my way for OCA certification.
But now , as it required another exam to get certificate and this is my question ...
Which Exam is more preferred for this ?? ... at present oracle is offering 4 exams ...
1. 1z0-001 ... introduction to oracle: Sql and Pl/Sql
2. 1z0-007 ... Introduction to oracle 9i ( i like 10g more so , i prefer to not to go backwards )
3. 1z0-047 ... Oracle DB SQL expert ( my choice )
4. 1z0-051 ... Oracle DB 11g : SQL fundamentals
now when i was looking at these options , i come to know that , if i give exam 1Z0-047 ... i can get individual certificate as ORACLE DB Certified SQL EXPERT ...
SO , my question is ... if i go for 1Z0-047 , will i get 2 certificates ?? i means , as i have already cleared 2 exams for OCA_ ... and another for passing this 1Z0-047 as a ORACLE DB CERTIFIED SQL EXPERT ??_
can i hit two birds with one stone ??
please if someone can answer/confirm it asap ... so i can give that exam in next weekend ( i've already prepared for it ) ...
thanks in advance for any help ...pari kankaria wrote:
oh my god. this whole thing is making me confused too!
if i go for this 047 exam then will i be an OCE or OCA??
if PASS(1z0-047) then Awarded SQL Certified Expert OCE;
But DIFFICULTY(1z0-047) > MAX(DIFFICULTY(1z0-051,1z0-007)) !
But Cost(1z0-047) > Cost(1z0-051,1z0-007) -- But not by much
and pls tell me what is the basic difference between all the exam options we have to become an OCA, particularly between exams 051 and 047 ?
since i am working in forms 6i , reports and pl/sql which exam would be better for me? and ya i am already working as a developer so have practical knowledge in sql so preapring for the courses would'nt be much a difficulty for me.
so pls suggest me which exam would suit me the best. thanksI your other post as well and nearly was to make this suggestion to you the you look at PL/SQL Developer Certifications. Because they match your current experience they will always help you in moving jobs.
You can also find studying for them will help your current work.
I would suggest 1z0-051 first. It ensures your up to some 11g features and will but you can learn new things on the way. It also gets you used to taking a prometric exam. It can be done online, you if you search other posts I give some reasons why I think this is not so good for most people. Others might argue 1z0-007 is an easier exam to take as you may be familiar with all constructs.
Some people plump straight for 1z0-047. You have to know a fair bit about analytic functions for this so its not trivial. But you do get a certificate for passing the exam, and as Jack shows it can be done. But its a harder exam.
PL/SQL OCA ought to be well within your grasp too. You have the choice of 1z0-147 or 1z0-144 (current in beta as 1z0-144, a long exam, but currently very cheap). From other posts you will see I dont think highly of 1z0-147, and quite frankly you wont learn a lt studying for it. 1z0-144 is the more recent exam and has more interesting topics and I think I'd advise who to aim for that (and if you take the beta exam you get some respect for me from trying it!). But certainly take one other exam at a prometric center before taking a beta!
Rgds - bigdelboy -
May i go for sql expert(1Z0-047) exam or 11g sql fundamentals 1(1Z0-051)
Hi all,
Please suggest me, may i go for sql expert(1Z0-047) Test or 11g sql fundamentals 1(1Z0-051) Test with
oracle Administration 1(1Z0-042) Test.
Which will be the best option.
Thanks & RegardsYou may use either exam along with the Oracle Administration 1 (1Z0-042) exam if your goal is to get a 10g DBA OCA credential.
The SQL Expert exam is quite a bit more challenging than the SQL Fundamentals exam. On the other hand, the SQL Expert exam gives you a separate SQL Certified Expert credential. If you can pass it, you should take the SQL Expert exam.
Justin -
Oracle Database SQL Expert study material
Hi,
I want to take following certification exam.
"1Z0-047 Oracle Database SQL Expert"
its part of OCA (1st Paper)
Is Anybody having study material for this?
pls send to :
(email address removed for security purposes)
or
pls suggest me some site name
thnx in advance
Edited by: Certification Forum Moderator on Aug 24, 2009 8:50 AMuser10313295 wrote:
Hi,
I want to take following certification exam.
"1Z0-047 Oracle Database SQL Expert"
its part of OCA (1st Paper)
Is Anybody having study material for this?
pls send to :
[email protected]
or
pls suggest me some site name
thnx in advanceA request for emailed information outside of forum is likely to result in receipt of material that is unauthorised training material or material in breach of copyright. Please read and drill down from forum post [The route you choose|http://forums.oracle.com/forums/ann.jspa?annID=1122] which provides some information on this.
To my knowledge there is no book directly available for this exam, original Oracle Online documentation or a book such as Oracle Database 11g SQL should be consulted.
More details are of exam are available by exploring website [www.oracle.com/education/certification] -
OCA Study material for Oracle Database SQL Expert
Hi,
I want to take following certification exam.
"1Z0-047 Oracle Database SQL Expert"
its part of OCA (1st Paper)
Is Anybody having study material for this?
pls send to :
[email protected]
or
pls suggest me some site name
thnx in advancehello
please post the thread certification section.
regards
liakat hossain nayan -
Documentation for 1Z0-047 Oracle Database SQL Expert
Hi,
Could any one provide the URL for the documentation for the below certificaiton. Please provide the URL for documentation and not the sysllabus.
*1Z0-047 Oracle Database SQL Expert*
RegardsI'm not sure what you mean by the URL to the documentation. Oracle doesn't have documentation that's specifically about the test, but they do have a few SQL books/documentation here:
http://www.oracle.com/pls/db112/portal.all_books#index-SQL
The content of the test is listed here:
http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=41&p_org_id=1001&lang=US&p_exam_id=1Z0_047
You may also want this book:
http://www.amazon.com/Oracle-Database-Expert-Exam-Guide/dp/0071614214
and possibly this practice test:
http://www.selftestsoftware.com/product.aspx?product_id=1Z0-047&dept_id=6083 -
SQL experts please help for a query
I have following table1.
What query can give the result as given below, SQL experts please help on this.
TABLE1
Event DATETIME
in 2/JAN/2010
out 2/JAN/2010
in 13/JAN/2010
out 13/JAN/2010
in 5/JAN/2010
out 5/JAN/2010
RESULT REQUIRED FROM THE SQL QUERY
COL1_IN COL2_OUT
2/JAN/2010 2/JAN/2010
13/JAN/2010 13/JAN/2010
5/JAN/2010 5/JAN/2010I tried to help, but this puzzles me.
Why is this not returning pre-selected set of rows, why it's doing some merge join cartezian ?
SQL> select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for Linux: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
SQL> select * from table1;
EVENT DATETIME
in 2/JAN/2010
out 2/JAN/2010
in 13/JAN/2010
out 13/JAN/2010
in 5/JAN/2010
out 5/JAN/2010
6 rows selected.
SQL> explain plan for
2 with a as
(select datetime from table1 where event='in'),
b as
(select datetime from table1 where event='out')
select a.datetime COL1_IN ,b.datetime COL2_OUT from a,b ;
Explained.
SQL> set wrap off
SQL> set linesize 200
SQL> select * from table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
Plan hash value: 185132177
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 9 | 288 | 8 (0)| 00:00:01 |
| 1 | MERGE JOIN CARTESIAN| | 9 | 288 | 8 (0)| 00:00:01 |
|* 2 | TABLE ACCESS FULL | TABLE1 | 3 | 48 | 3 (0)| 00:00:01 |
| 3 | BUFFER SORT | | 3 | 48 | 5 (0)| 00:00:01 |
|* 4 | TABLE ACCESS FULL | TABLE1 | 3 | 48 | 2 (0)| 00:00:01 |
PLAN_TABLE_OUTPUT
Predicate Information (identified by operation id):
2 - filter("EVENT"='in')
4 - filter("EVENT"='out')
Note
- dynamic sampling used for this statement
21 rows selected.
SQL> with a as
(select datetime from table1 where event='in'),
b as
(select datetime from table1 where event='out')
select a.datetime COL1_IN ,b.datetime COL2_OUT from a,b ;
COL1_IN COL2_OUT
2/JAN/2010 2/JAN/2010
2/JAN/2010 13/JAN/2010
2/JAN/2010 5/JAN/2010
13/JAN/2010 2/JAN/2010
13/JAN/2010 13/JAN/2010
13/JAN/2010 5/JAN/2010
5/JAN/2010 2/JAN/2010
5/JAN/2010 13/JAN/2010
5/JAN/2010 5/JAN/2010
9 rows selected.
SQL>
Maybe you are looking for
-
PR release strategy issue comes when Line items in PR added by two different persons, PR Release strategy(overall release) not getting triggered. Release strategy is working fine if i create PR with only one user id. Both id's maintained in classif
-
JCA / JDBC Configured for non-XA Attempting XA Transaction Commit
I am attempting to create simple BPEL SOA composites in SOA 11.1.1.5 that use a DbAdapter to execute a stored procedure in an 11g database. The database task being performed only involves a single database and does not require transaction support. I
-
Theme Designer - source image location
Hi, I'm working on a NW740 upgrade project, and have run into what is probably a theme designer 101 problem with creating a user theme based on the sap_goldreflection theme for ABAP WD. Previously when I've worked on portal theming I have been a
-
Hi i have an lenovo x200 with an intel 4500 HD graphics card. i installed compiz and when i enable it windows wont move and it seems like everything is slow. i can click on the fusion icon and switch back to metacity but it takes a long time becaus
-
I've a very important document which I can't open anymore: You need a newer version of Numbers to open this spreadsheet.