Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Issue When Starting Integrated Weblogic Server

M.TaherJul 18 2018 — edited Jul 19 2018

Hi All,

my version of Jdeveloper is 12.2.1.2.0

O/S windows 10 64-bit

when starting the integrated weblogic it gives in log the statement of <Server state changed to RUNNING.>

but it sucked in something because the status bar of launching integratedweblogicserver keep runing

pastedImage_1.png

so i can not start any application

i tried to delete defaultDomain and restart the jdeveloper but it did not work

any ideas ?

Comments

Paulzip
Answer
with sample_sales_table
as
  (
  select 2015 fy, 100 shoe, 50 shirt, 2 hat from dual
  union all
  select 2016, 120, 55, 4 from dual
  union all
  select 2017, 150, 80, 10 from dual
  )
select *
from sample_sales_table
unpivot (
  col_val
  for category in (
    shoe, shirt, hat
  )
)
pivot (
  max(col_val)
  for fy in (2015, 2016, 2017)
)
/


CATEGORY|      2015|      2016|      2017
--------|----------|----------|----------
SHOE    |       100|       120|       150
SHIRT   |        50|        55|        80
HAT     |         2|         4|        10


Marked as Answer by HayXing · Apr 20 2021
Frank Kulash

Hi, @hayxing
The number of columns in the output, and their names, must be hard-coded into the query. If you want the number of columns to depend on what data is actually found, then you need dynamic SQL.
If you know you have data for 2015-2017, but you're not sure about 2018-2019, you could simply write a query that pivots all five years, 2015-2019. If there doesn't happen to be any data for some of those years, that won't cause any error; the columns for the extra years will just have NULLs.
Instead of dynamic SQL, you could write a static query that produces a big VARCHAR2 column, formatted so it looks like a variable number of columns. For an example, see PIVOT SQL — oracle-tech

Frank Kulash

Hi,
I have tried with PIVOT / UNPIVOT and with the LISTAGG to for the FY just never get it right.
That should work. Post your code. It's hard to say what you did wrong without knowing what you did.

HayXing
with sample_sales_table
as
  (
  select 2015 fy, 100 shoe, 50 shirt, 2 hat from dual
  union all
  select 2016, 120, 55, 4 from dual
  union all
  select 2017, 150, 80, 10 from dual
  )
select *
from sample_sales_table
unpivot (
  col_val
  for category in (
  shoe, shirt, hat
  )
)
pivot (
  max(col_val)
  for fy in (LISTAGG(DISTINCT fy, ',')) -- this part return error ORA-00934: group function is not allowed here
)
/

HayXing

I am thinking of creating a view how you guys do that with dynamic sql ?

HayXing

Thank you

Frank Kulash

Hi, @hayxing
for fy in (LISTAGG(DISTINCT fy, ',')) -- this part return error ORA-00934: group function is not allowed here
Oh no, that won't work. Oracle needs to know hw many columns there will be when it compiles the query. You need to hard-code the list of values, unless you're getting XML output. (If you get XML output, then the query always produces 1 column, a big XML object, that has a variable number of td elements. Earlier, I posted a link to another thread, that shows how to use the same approach with a single big VARCHAR2 column.)
I am thinking of creating a view how you guys do that with dynamic sql ?
I don't do that. I use a VARCHAR2 column formatted to look like multiple columns.
Earlier today, @solomon-yakobson posted a dynamic pivot solution: Convert columns into row of a table — oracle-tech Maybe you could do something like that.

1 - 7
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Aug 16 2018
Added on Jul 18 2018
16 comments
4,531 views