DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Need help with sql...

  1. #1
    Join Date
    Apr 2007
    Location
    USA
    Posts
    110

    Need help with sql...

    Can someone give me the sql that would produce this output?

    thanks

    SID MACHINE LOGON_TIME STATUS SQL
    --- ------- ---------- ------- --------- -----------
    229 aaccd1 08-OCT-12 ACTIVE insert into mando.
    271 aaccd1 08-OCT-12 ACTIVE select * from mando.
    Looking for the greatest evil in the world? Look in the mirror.

  2. #2
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166
    I did what you asked, but I can't be sure that it is what you really wanted.


    Code:
    SELECT 'SID MACHINE LOGON_TIME STATUS SQL'||chr(10)||
    '--- ------- ---------- ------- --------- -----------' ||chr(10)||
    '229 aaccd1 08-OCT-12 ACTIVE insert into mando.'||chr(10)||
    '271 aaccd1 08-OCT-12 ACTIVE select * from mando. ' from dual;

  3. #3
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    Quote Originally Posted by gandolf989 View Post
    I did what you asked, but I can't be sure that it is what you really wanted.


    Code:
    SELECT 'SID MACHINE LOGON_TIME STATUS SQL'||chr(10)||
    '--- ------- ---------- ------- --------- -----------' ||chr(10)||
    '229 aaccd1 08-OCT-12 ACTIVE insert into mando.'||chr(10)||
    '271 aaccd1 08-OCT-12 ACTIVE select * from mando. ' from dual;
    You made my day Gandolf - ROLF

    Tuma - for starters, please take a look at v$session
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  4. #4
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166
    Quote Originally Posted by PAVB View Post
    You made my day Gandolf - ROFL

    Tuma - for starters, please take a look at v$session
    I suppose he could join v$session to v$sqlarea based on spid.
    It really comes down to be careful what you ask for...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width