|
More site info...
SQL and PL/SQL
| Forum profile
|
|
Forum profile page for SQL and PL/SQL
on http://www.oracle.com.
This report page is the aggregated overview from a single forum: SQL and PL/SQL
, located on the Message Board at http://www.oracle.com.
This forum profile page summarizes the general forum statistics such as: Users Activity, Forum Activity, and Top Authors, which are reported in either a table or graph below for a given reporting time period.
Additional forum profile information for "SQL and PL/SQL
" on the Message Board at http://www.oracle.com is also shown in the following ways:
1) Latest Active Threads
2) Hot Threads for Last Week
Warning: These statistics are generated using 'best efforts' and can experience delays and reporting errors at times. Please note that such statistics do not constitute a forum's popularity and/or exact posting volumes at any given reporting period.
|
|
|
|
|
Posting activity on SQL and PL/SQL
:
|
|
Week
|
Month
|
3 Months
|
|
Threads:
|
743
|
2,505
|
6,585
|
|
Post:
|
2,818
|
10,550
|
29,532
|
|
|
SQL and PL/SQL
Posting activity graph:
|
Top authors during last week:
user's latest post:
Question about nested functions
Published (2009-11-22 16:59:00)
You can nest aggregate functions. Here is what it says in the SQL Reference . You can nest aggregate functions. For example, the following example calculates the average of the maximum salaries of all the departments in the sample schema hr: SELECT AVG(MAX(salary)) FROM employees GROUP BY department_id; AVG(MAX(SALARY)) 10925 This calculation evaluates the inner aggregate (MAX(salary)) for each group defined by the GROUP BY clause...
user's latest post:
Oracle 9i Merge - When Not Matched
Published (2009-11-22 11:47:00)
Hi, Welcome to the forum! I don't have Oracle 9, so I can't test anything. The Oracle 9 SQL Language manual says nothing about a WHERE clause. In later versions, you can have a WHERE clause, like this: ... WHEN NOT MATCHED THEN INSERT (cus.account_no, cus.third_units) VALUES (adm.account_no, adm.third_units) WHERE 1 = 2 -- That is, NEVER insert ; It could be an undocumented feature, or a mistake in the manual, in Oracle 9. You can...
user's latest post:
An expensive cartesian product...
Published (2009-11-22 07:51:00)
Hi, why do you need Table medst.subs_t h in your query.I believe you are not selecting anything from it too. If possible find a condition for it to join with other table, if you need cartesian join then you need it.No need to worry. well that my personal opinion Also, just in case if you don't know wm_concat is not a documented function in 10g Cheers!!! Bhushan
user's latest post:
Time convertion b/w BST to GMT
Published (2009-11-22 23:44:00)
Hi and welcome to the forum! Your question has been asked before, see f.i.: http://forums.oracle.com/forums/thread.jspa?messageID=3876721� (Do some more searches on this forum to find more examples) Read all about TIMESTAMP, CAST, FROM_TZ @ http://tahiti.oracle.com (the Oracle Documentation). If that doesn't get you going, then please post your DB-version and your efforts sofar.
user's latest post:
Need help in LIKE operator
Published (2009-11-22 23:15:00)
Karthick_Arp wrote: OP wants both US and UK. Not any one of them i guess. Oh well, ... don't be too picky on monday mornings... only had one cup of coffee... I was answering the un-asked question...
user's latest post:
Can foreign key refer to unique...
Published (2009-11-22 23:30:00)
Hi, You would be able to add null values n number of times in the table with foreign key. 009
user's latest post:
SQL for finding identical...
Published (2009-11-22 13:44:00)
user12258774 wrote: Hi, guys can anyone help me designing a query which will guve me the names and email addresses of all people who have the identical registered domain names (for example e-mail address ends with “gmail.com” or “yahoo.com”) This will give you an idea on deriving domain from email address: with t as ( select 'joe@gmail.com' email from dual union all select 'jill@gmail.com' email from dual union all...
user's latest post:
Is it possible to run a...
Published (2009-11-22 23:58:00)
Yes, you can schedule a job via SQL*Plus. The code I posted works in SQL*Plus or any other tool that can run PL/SQL. And the code I posted works against a 9i database. Justin
user's latest post:
Need help to wrie a query in...
Published (2009-11-22 23:33:00)
Something like this. Note code not tested. UPDATE xxpim_cn_item_attributes_st xcias SET ( attr_group_int_name, attribute_name ) = ( SELECT attribute_group, attr_internal_name FROM xxpim_icc_att_map_ad xiama WHERE xiama.sonetto_transf_name = xcias.attribute_name AND xiama.element_name = xcias.attribute1 AND xiama.sonetto_transf_name IS NOT NULL AND category = rec_distinct_attrs_ext.product_type AND fab_name = rec_distinct_attrs_ext.fab_value...
user's latest post:
SQL for finding identical...
Published (2009-11-22 23:54:00)
Add consultantid column to table T and use < (or >) instead of (!=) when comparating consultantid's: WITH T AS ( select firstname, lastname, email, expertiseid, c.consultantid from consultants c, skills s where s.consultantid=c.consultantid) Select t1.firstname, t1.lastname, t1.email, t2.firstname, t2.lastname, t2.email from t t1, t t2 where t1.consultantid<t2.consultantid and t1.expertiseid=t2.expertiseid and...
|
|
|
|
Latest active threads on SQL and PL/SQL
::
Started 14 hours, 53 minutes ago (2009-11-23 13:58:00)
by hoek
Hi and welcome to the forum!
Things change over time. HR = SCOTT nowadays (at least on XE)
See:
http://wiki.oracle.com/page/scott%2Ftiger
Started 15 hours, 51 minutes ago (2009-11-23 13:00:00)
by Arunkumar Ramam...
Hi,
Check out DBMS_LOB package.
- Arun
Started 16 hours, 46 minutes ago (2009-11-23 12:05:00)
by Massimo Ruocchio
Your query seems to extract correctly null values, post sample data...
Max
Started 14 hours, 27 minutes ago (2009-11-23 14:24:00)
by Frank Kulash
Hi,
DanielD wrote:
Hi,
what's the name of that analytical function (or connect by) that
would return strings from more rows as one row concatenated. i.e.:
(I know this is possible using regular pipelined functions.)
ROW1: STR1
ROW2: STR2
ROW3: STR3
select tadah().... from ...
result:
ROW1: STR1 STR2 STR3
The function is SYS_...
Started 18 hours ago (2009-11-23 10:51:00)
by Toon Koppelaars
I would say, just create 100 insert statements using that Excel spreadsheet.
Add a first column with text: insert into table_name values(.
Add a in-between column with text: ,.
Add a last column with text: );
Then copy&paste those insert statements into a sqlplus session (after having created the table).
Started 20 hours, 13 minutes ago (2009-11-23 08:38:00)
by Cyn
select to_char(add_months(sysdate, -1), 'Month' ) from dual
/
TO_CHAR(ADD_MONTHS(SYSDATE,-1), 'MONTH' )
---------------------------------------
October
1 rows selected
Started 4 days, 18 hours ago (2009-11-19 10:09:00)
by Frank Kulash
Hi,
Welcome to the forum!
user12143453 wrote:
Hi there,
I am trying to get the Current Month and YTD Data.
Here is the scenario,
select c.co_rollup_description company,
c.division division,
c.div_description division_desc,
c.department department,
c.dept_description department_desc,
sum(a.amount) actuals_amount,
0 ...
Started 20 hours, 9 minutes ago (2009-11-23 08:42:00)
by JS1
execuite the following (remember to switch serveroutput on
exec dbms_output.put_line(yourFunction(parameters))
Started 15 hours, 25 minutes ago (2009-11-23 13:26:00)
by hoek
Hi,
They might have an answer for you at the Database-General forum .
There are a lot more scripting-related questions being asked (and being answered) in that forum than over here, we're more into SQL/PL/SQL in this forum .
Don't forget to mention your database version.
Make a habit of mentioning your database-version, it really matters.
From ...
Started 16 hours, 6 minutes ago (2009-11-23 12:45:00)
by Ludy
Below sql seems to be working ....
select * from (
SELECT a_id,b_id,c_id,ROW_NUMBER() over(partition by a_id order by a_id DESC NULLS LAST, C_id desc) AS rum
FROM ( SELECT a_id,b_id,c_id FROM TEMP_CC order by a_id DESC NULLS LAST )
) where rum = 1 order by a_id DESC NULLS LAST
|
|
Hot threads for last week on SQL and PL/SQL
::
Started 5 days ago (2009-11-19 04:20:00)
by user503699
Centinul wrote:
Where do we as database developers draw the line between the correct use of SQL or not? Or between rendering on the client and just returning data?
Now with LISTAGG, PIVOT and UNPIVOT all available to us would these be considered correct uses of SQL?
Where does this leave the TO_CHAR function? Is this considered rendering?
First, ...
Started 1 week ago (2009-11-16 07:28:00)
by Cyn
Use grouping sets
select subtotal_id, config_id, name, sum(quantity)
from subtotal
group by grouping sets
(
(subtotal_id, config_id, name), -- Individual records
(config_id) -- subtotal by config_id
);
SUBTOTAL_ID CONFIG_ID NAME SUM(QUANTITY)
...
Started 3 days, 21 hours ago (2009-11-20 07:42:00)
by Centinul
Any chance you could provide the code?
Started 6 days, 19 hours ago (2009-11-17 08:59:00)
by George Milliken
select column_name || ',' from user_tab_cols where table_name = 'EMP';
WHERE
EMP = YOUR TABLE NAME
or even simpler since you know the column names just do this
SELECT 'activity_log_id,activity_category,activity_type' from DUAL;
then do the query
Edited by: George Milliken on Nov 17, 2009 10:00 AM
Started 6 days, 20 hours ago (2009-11-17 08:38:00)
by JS1
Absolutely, check out the documentation for:
user defined exceptions
and the
pragma exception_init call
Started 4 days, 1 hour ago (2009-11-20 03:11:00)
by Anurag Tibrewal
Hi,
This query access the table mv_dgn_test_session a,ability_lookup_sem b more than 1.
You can rewrite the query to access it just once if the number of rows from the query remain same before and after joining of ability_lookup_sem.
Alternately it can be reduced to two access like below
update temp_dgn_sumry set
(Student_count,Std_...
Started 4 days, 20 hours ago (2009-11-19 08:02:00)
by Alex Nuijten
use a column alias and format that one:
DECODE( 'ENG' , 'ENG' ,A.PC_DESC,A.PC_DESC_BL) alias
Started 1 week, 1 day ago (2009-11-15 17:23:00)
by Justin Cave
What does
SELECT username, length(username), dump(username)
FROM b_second
return for the row in question?
Justin
Started 5 days, 3 hours ago (2009-11-19 01:11:00)
by hoek
I would to generate surogate key (based on Business key/keys which is/are varchar) dynmically other than oracle seq number
What's wrong with using a sequence?
Any suggestion how to implement such function?
I wouldn't want to implement such functionality. It smells a lot like "serializing access"..
Edited by: hoek on Nov 19, 2009 10:14 AM typo...
Started 16 hours, 46 minutes ago (2009-11-23 12:05:00)
by Massimo Ruocchio
Your query seems to extract correctly null values, post sample data...
Max
|
|