SQL Language (MOSC)

MOSC Banner

Oracle SQL Query Output format

edited Feb 19, 2015 10:01AM in SQL Language (MOSC) 2 commentsAnswered

Hello All,

I am relatively new to oracle SQL/PLSQL though I have experience as DBA. I have a below query whose output to be spool and edit to run in single execution.

 

My Query is 

 

SELECT DBMS_METADATA.GET_GRANTED_DDL('OBJECT_GRANT','MOAM_OAM_USER') from dual;

 

What I am doing is 

 

SET LINESIZE 32000;

SET PAGESIZE 40000; 

SET LONG 50000; 

SELECT DBMS_METADATA.GET_GRANTED_DDL('OBJECT_GRANT','MOAM_OAM_USER') from dual;

What I am getting is

  I am getting output in differnet lines and blanks between lines.I need an outut that should appear in single line so that I can run spool file after my import is completed in order to give grants at object level. 

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center