How to get login ID in SQL?

Hi,
How to get login Id in sql?
such as "select * from table1 where userlogined=:{$loginid$}"?
Best Regards,
Jason Gao

Hi,
You would need to create a parameter in your report called userloginid select the paramter data type to match that of the datatype this value is stored as in the table.
then the correct syntax would be select * from table1 where userloginid=:userloginid
Hope this helps,
Domnic

Similar Messages

  • How to get this output using sql query?

    Hi,
      How to get this output using sql query?
    Sno Name Age ADD Result
    1 Anil 23 delhi Pass
    2 Shruti 25 bangalor Pass
    3 Arun 21 delhi fail
    4 Sonu 23 pune Pass
    5 Roji 26 hydrabad fail
    6 Anil 28 delhi pass
    Output
    Sno Name Age ADD Result
    1 Anil 23 delhi pass
    28 delhi pass

    Hi Vamshi,
    Your query is not pretty clear.
    write the select query using Name = 'ANIL' in where condition and display the ouput using Control-break statements.
    Regards,
    Kannan

  • How can get a database like ****.SQL file for test in sqlplus in oracle8i

    How can get a database like ****.SQL file for test in sqlplus in oracle8i,I am a beginner,thanks

    I'll give it a guess as to what it is you want but I'm afraid you'll have to give some more information to go on. I appreciate it's difficult for people who are beginners or who don't have English as their first language.
    Are you trying to run a SQL file? From SQL*plus you can do either of these:
    SQL> start my_file
    or
    SQL> @my_file
    N.B.: if th efile has a .sql extension you don't need to include it, but you do for any other file extension e.g.
    SQL> @myfile.run
    Here is the page Vijay referred to:
    Re: Physical storage Checks & adding disk on server. I hope you find it useful.
    You will more helpful links (including links to the Oracle on-line manuals at this page:
    Re: How to attach a java bean in forms6i
    good luck, APC

  • How to get  Unapplied Amount with SQL or API in AR/ORACLE RECEIVABLES

    Hi ,
    how to get Unapplied Amount with SQL or API in AR/ORACLE RECEIVABLES.
    who can help me ? Thank you very much !

    i get it from private API.
    SELECT SUM(decode(ra.status, 'UNAPP', nvl(ra.amount_applied, 0), 0)) unapplied_amount
    FROM ar_receivable_applications ra
    WHERE ra.cash_receipt_id = 1820
    AND ra.status IN ('UNAPP', 'ACTIVITY')

  • How to get Worksheet Description from SQL

    Hi,
    Can any one help me out. How to get Workbook and Worksheet Description from SQL. I have entered these descriptions from Discoverer Plus.
    Thanks in advance.

    check this !!!! at least it a starting point
    Thread: Where in the EUL schema can I find metadata on worksheets
    I followed this steps:
    Use the following steps to get the Trigger Working:
    1. Login as EUL owner EUL10
    Create a test table
    CREATE TABLE eul10.TRIG_TAB
    ACC_DATE DATE,
    sso_name varchar2(100)
    2. Create a function under the eul schema owner: eul_trigger$post_login
    Do not pass any argument to the function.
    Return a number from function.
    CREATE OR REPLACE FUNCTION EUL10.EUL_TRIGGER$POST_LOGIN
    RETURN NUMBER AS
    BEGIN
    insert into EUL10.TRIG_TAB(acc_date) values(sysdate);
    commit;
    RETURN 0;
    END;
    3. Login with Discoverer Administrator to EUL=EUL10.
    4. Check the Menu > Tools > Default EUL.
    Make sure this is set to EUL10
    If not then change the EUL10 and restart Discoverer Administrator.
    5. Now Register the trigger in Discoverer Administrator
    Menu >Tools > Register PL/SQL Function ...
    6. Click import
    7. Select the trigger EUL10.eul_trigger$post_login
    |8. Make sure the display name is eul_trigger$post_login (MUST BE lowercase or it will not work)
    Function name must be in uppercase: EUL_TRIGGER$POST_LOGIN
    9. Make sure the the return type is number and that no arguments get passed.
    10. Validate the Function by clicking on the Validate button.
    11. Click ok
    12. Connect with Discoverer desktop as EUL owner.
    13. We see entries in the table trig_tab with the current date.
    ...... metalink note : 372067.1 Subject: How To Get the EUL_TRIGGER$POST_LOGIN Trigger to Work

  • How to get text of Last SQL Query

    Sorry if this has been covered, but the search page keeps erring on me.
    I am trying to figure out how to get the text of the last SQL statement executed (succesfully or unsuccesfully) by my current login.
    What it is, is i want in the exception handler of my procedure to be able to dump the text of the Query which was last run into the log file.
    Any help with this will be greatly appreciated!
    Thanks in advance,
    Aaron.
    [email protected]

    Well, ive been trying V$SQLTEXT in conjunction with V$SESSION and USERENV('SESSIONID'). This gets me my SQL statements, but the SQL_HASH_VALUE and PREV_HASH_VALUE, which are supposed to be the current and previous statements respectively always are the same and always point to the current statement..... is there some sort of flag you have to set to get PREV_HASH_VALUE (and PREV_SQL_ADDR) to actually point to the **PREVIOUS** statement??

  • How to get Arabic dates in SQL*Plus?

    I want to do a very simple thing.
    I want to type in Arabic and Display dates in Arabic.
    Instead i get ????? ??????? ????? ??????? ? ? ???????, ????? for this?
    Why is this?
    I then changed my Windows XP "Regional and Language Options" all to Arabic. Now, I get AR (Arabic) in my language selection bar at the bottom of the Desktop. When I choose AR I can type Arabic in Notepad. ُ
    Even HERE I can type in Arabic: فغحث غخعق ةثسسشلث اثقث
    But in Sql*PLus I get ????? ??????? ????? ??????? ? ? ???????, ?????
    If I choose AR in SQL Plus and type in Arabic I get garbage characters?
    How to get Arabic in Sql*Plus?
    SQL> SHOW USER
    USER is "ARABDTEST"
    SQL> SELECT * FROM v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    PL/SQL Release 11.1.0.6.0 - Production
    CORE    11.1.0.6.0      Production
    TNS for 32-bit Windows: Version 11.1.0.6.0 - Production
    NLSRTL Version 11.1.0.6.0 - Production
    SQL> SELECT * FROM nls_session_parameters;
    PARAMETER                      VALUE
    NLS_LANGUAGE                   AMERICAN
    NLS_TERRITORY                  AMERICA
    NLS_CURRENCY                   $
    NLS_ISO_CURRENCY               AMERICA
    NLS_NUMERIC_CHARACTERS         .,
    NLS_CALENDAR                   GREGORIAN
    NLS_DATE_FORMAT                DD-MON-RR
    NLS_DATE_LANGUAGE              AMERICAN
    NLS_SORT                       BINARY
    NLS_TIME_FORMAT                HH.MI.SSXFF AM
    NLS_TIMESTAMP_FORMAT           DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT             HH.MI.SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT        DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_DUAL_CURRENCY              $
    NLS_COMP                       BINARY
    NLS_LENGTH_SEMANTICS           BYTE
    NLS_NCHAR_CONV_EXCP            FALSE
    17 rows selected.
    SQL> ALTER SESSION set NLS_DATE_LANGUAGE = 'ARABIC';
    Session altered.
    SQL> SELECT TO_CHAR(SYSDATE, 'RRRR/MM/DD YEAR MONTH DAY MON DY AM PM DL') FROM dual;
    TO_CHAR(SYSDATE,'RRRR/MM/DDYEARMONTHDAYMONDYAMPMDL')
    2013/04/08 TWENTY THIRTEEN ?????  ???????  ?????  ???????  ? ? ???????, ????? 08, 2013
    SQL> ALTER SESSION set NLS_DATE_LANGUAGE = 'AMERICAN';
    Session altered.
    SQL>  SELECT TO_CHAR(SYSDATE, 'RRRR/MM/DD YEAR MONTH DAY MON DY AM PM DL') FROM dual;
    TO_CHAR(SYSDATE,'RRRR/MM/DDYEARMONTHDAYMONDYAMPMDL')
    2013/04/08 TWENTY THIRTEEN APRIL     MONDAY    APR MON PM PM Monday, April 08, 2013
    SQL> SELECT * FROM nls_database_parameters;
    PARAMETER                      VALUE
    NLS_LANGUAGE                   AMERICAN
    NLS_TERRITORY                  AMERICA
    NLS_CURRENCY                   $
    NLS_ISO_CURRENCY               AMERICA
    NLS_NUMERIC_CHARACTERS         .,
    NLS_CHARACTERSET               WE8MSWIN1252
    NLS_CALENDAR                   GREGORIAN
    NLS_DATE_FORMAT                DD-MON-RR
    NLS_DATE_LANGUAGE              AMERICAN
    NLS_SORT                       BINARY
    NLS_TIME_FORMAT                HH.MI.SSXFF AM
    NLS_TIMESTAMP_FORMAT           DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT             HH.MI.SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT        DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_DUAL_CURRENCY              $
    NLS_COMP                       BINARY
    NLS_LENGTH_SEMANTICS           BYTE
    NLS_NCHAR_CONV_EXCP            FALSE
    NLS_NCHAR_CHARACTERSET         AL16UTF16
    NLS_RDBMS_VERSION              11.1.0.6.0
    20 rows selected.

    I am not sure SQL*Plus in character mode can display Arabic characters on Windows. OTN NLS_LANG FAQ http://www.oracle.com/technetwork/products/globalization/nls-lang-099431.html#_Toc105389288 says:
    >
    if you are testing with "special" characters please DO use the GUI and not the "DOS box" sqlplus.exe !
    >
    SQL*Plus GUI is not available with 11G: you should use SQL Developer.

  • How to get login crenditials(Result) from the MBO in a js file

    Hi Experts,
        I got a table from oracle db, and i have deployed it and MBO is generated.
    That table contains the login credentials which i am giving in the login page.
          I have created a login page with user id and password when i am trying to login by using the credentials which i have registered earlier the credentials are being checked in the table and it should return me yes or no if yes i have to move to next screen if no i should display some alert . My problem is that i am not knowing how to get that verified credentials and display them in my code. I am writing this line of code in java script and i am unable to know, how to handle the data after being checked from the MBO .. please help me out of this ..

    Hi Lokesh,
    You can write an object query for checking the credentials details.
    Right click mbo>Attributes>Object query>Add
    Add 2 parameters, give some name like usernameParam and passwordParam
    Map these parameters to respective fields like username and password(from MBO)
    Generate object query
         e.g. select x.username, y.password from ABC where x.username=:usernameParam and      y.password=:passwordParam
    select Return type"as single object""
    (assuming username and password are the parameters defined in the mbo ABC.)
    redeploy mbo
    call this object query to Login button and do all required mappings
    For verification, if details are/not available in backend
    You have to write some piece of code in customBeforeNavigateForward
    e.g.
    hwc.customBeforeNavigateForward = function(screenKey, destScreenKey) {
    if(destScreenKey="Employee" && screenKey=="Start"){
    //Here Employee is the MBO name
    alert("test");
    var message = getCurrentMessageValueCollection();
    alert("test1");
    var itemList = message.getData("Employee");
    alert("test2");
    var items = itemList.getValue();
    var noOfItems = items.length;
    alert("noOfItems="+noOfItems);
    if(noOfItems==0){
    alert("Invalid input");
    return false;
    Rgrds,
    Jitendra

  • How to get the last executed SQL Statemnt of my session

    Hello,
    I am trying to log my SQL-Statements that I use in a PL/SQL Procedure or Package iinto a text file.
    How can I log my SQL-Statement without repeating the Statement?
    Here is an example:
    INSERT INTO people (id, name)
    SELECT people.nextval, name from people_to_load;
    log_pkg.log(getLastStatement());
    I don't want to code the following:
    INSERT INTO people (id, name)
    SELECT people.nextval, name from people_to_load;
    log_pkg.log('INSERT INTO people (id, name) SELECT people.nextval, name from people_to_load;'),
    Thank's for any feedback.
    Oliver

    Hi,
    You can get from the V$sql SQL (statements that are in memory, parsed, and ready for execution).
    with respective to your Session. Else if you want to seee you can get from the Redo Logs with the utlility Lop Minner..
    Sorry I misunderstood your question.. !!
    Go for Dymanic SQL where you can Build a Query.. and Hold that Query in one String and Pass it on as the parameter to the Package or Procedure what ever you are using for logging purpose...
    You can go for Auditiing in stead of Custom Logging.
    - Pavan Kumar N
    Edited by: Pavan Kumar on Sep 23, 2008 2:13 PM
    Edited by: Pavan Kumar on Sep 23, 2008 2:15 PM

  • How to migrate logins from 2008 SQL server to 2012 SQl server

    Hi,
    How to migrate all logins from  default SQL server2008(enterprise edition) to 2012 SQl server(enterprise edition)default

    Hi BomaSri,
    Have you tried v.vt’s suggestion? That article describes how to transfer the logins and the passwords between instances of Microsoft SQL Server 2005, of Microsoft SQL Server 2008, and of Microsoft SQL Server 2012 on different servers. The commands apply
    to SQL Server 2005, SQL Server 2008 and to SQL Server 2012.
    Allen Li
    TechNet Community Support

  • How to get Host name and SQL Instance Name by T-SQL

    I am using SQL 2000, 2005 and 2008. I have few multi instances SQL servers. I would like to gather following information:
    Host Name
    SQL Instance Name
    SQL Version
    Server1
    Server1
    SQL 2000
    Server1
    Server1\ABC
    SQL 2005
    Server1
    Server1\XYZ
    SQL 2008
    Server2
    Server2
    SQL 2008
    Is there any way I can get it by T-SQL? Any help would be appreciated.
    Thanks
    Saumen 

    SELECT
    SERVERPROPERTY('MachineName') AS [ServerName],
    SERVERPROPERTY('ServerName') AS [ServerInstanceName],
    SERVERPROPERTY('InstanceName') AS [Instance],
    SERVERPROPERTY('Edition') AS [Edition],
    SERVERPROPERTY('ProductVersion') AS [ProductVersion],
    Left(@@Version, Charindex('-', @@version) - 2) As VersionName
     |
    Blog: MSBICOE.com |
    MCITP - BI, SQL Developer & DBA
    Hate to mislead others, if I'm wrong slap me. Thanks!

  • How BW get data from MS SQL server DB?

    I got infomation about this from help.com, http://help.sap.com/saphelp_nw04/helpdata/en/e3/e60138fede083de10000009b38f8cf/frameset.htm.
    this web told me, when BW application server must be Win NT.BW can get data from MS SQL server DB.
    but our BW application server was AIX.
    Did you know other solution to this?

    Hi,
    you need to use the DBConnect or in BI7.0 the UDConnect features.
    regards
    Siggi
    See also: http://help.sap.com/saphelp_nw70/helpdata/EN/a1/89786c3df35c4ea930a994e884bb4c/frameset.htm
    or
    http://help.sap.com/saphelp_nw70/helpdata/EN/44/bcdce1dcaf56a3e10000000a1553f6/frameset.htm
    Edited by: Siegfried Szameitat on Aug 13, 2008 9:16 AM

  • How to get these settings in sql developer

    as per this link, when I selected my rows in sql developer am not getting any of the options shown in the screen shot of the link,
    my sql developer is Version 3.2.20.09 windows 64 bit, to use this options do I need to do any settings?
    http://www.thatjeffsmith.com/archive/2013/02/how-to-copy-only-column-headers-from-query-results-in-oracle-sql-developer?
    when I highlight and right click am getting only
    a) Save Grid as report
    b) Single record view
    c) count rows
    d) FInd/highlight
    e) Export

    Once you have identified the desired column headings by highlighting one or more related data cells in the results grid, position your cursor over any column heading and right-click to get the context menu shown in Jeff Smith's blog.

  • How to get Cluster Name in SQL

    Hi
    I've created a cluster model and I have renamed some of the clusters under the compare tab using the ODM tool.
    When I query the clusters of the model in SQL I only get the cluster numbers. How can I get the new name/label that I assigned using the ODM tool?
    Thanks
    Brendan

    Hi
    How did you query the clusters of the model in SQL?
    For example, this query will return the cluster ids and cluster names:
    SELECT a.ID, a.CLUSTER_ID
    FROM TABLE(DBMS_DATA_MINING.GET_MODEL_DETAILS_OC('CLUS_OC_1_15',NULL,NULL,1,0,0)) a
    Denny

  • How to get # of rows in SQL Query ResultSet

    I need to get the # of rows in a sql query resultset so I can create arrays of the size of the # or rows returned. This is how I do it so far. Is there a better way without running the query twice?
    Statement stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery(query);
    while (rs.next())
         i++;     
    aid = new int;
    i=0;
    rs = stmt.executeQuery(query);
    while (rs.next())
         aid[i] = rs.getInt(1);
    Theres actually a few more arrays but for this I just used one to show what I was doing. Notice stmt.executeQuery needed to be called twice, once to get the count to set the size of the array and once to get the values.

    nope - there's no easy way.
    the right thing to do is to iterate through the ResultSet, load its contents into a List of Objects or some other data structure, and close it out right away. You can get the count of rows while you do it. return the contents in the object or data structure for clients to use. you should never be passing a ResultSet around.
    why do you need to know, anyway?
    %

Maybe you are looking for

  • Xorg.conf from debian won't work in Arch on the same machine!

    I can't get arch up and running. My keyboard and mouse won't respond to input once it hit startx and enter. I copied the xorg.conf from the debian install before I decided to wipe the disk clean and install arch. It is here:http://pastebin.com/m6870d

  • IPad and iTunes Capacity Issue/Application Install Issue

    I've just spent the past hour trying to figure out why iTunes 10 is reporting I have 17.9GB of video although the iPad itself is saying I have 0 videos. I am not syncing any music videos, movies, TV shows, Podcasts or content from iTunes U. The iPad

  • Need help in this design, SHAPES!

    Hello everyone. I have a simple programming project but I'm getting caught up on what should be the super class. Its shapes. I have the following: A Quadrilateral, Trapezoid, Parallelogram, Rectangle and Square. At first I had it designed like Quadri

  • Strange behavior of select for update

    I observed a strange behavior of "select .. for update" statement in binary xml table. Here is the piece of code: create table xmltab of XMLType XMLTYPE store as binary xml; Table created. insert into xmltab values('<x><y>y1</y><z>z1</z></x>'); 1 row

  • RFC authorizations.

    Situation: After replacing old roles on my system that had auth obj. S_RFC with following values [ACTVT = 16; RFC_NAME = *; RFC_TYPE = FUGR;] in most of them, my system is plagued by RFC_NO_AUTHORITY short-dumps. I'm yet to see any transaction that h