SQL query issue, how to improve it?

Hello all, I want to create a query with with result in the following result. Every first person of an department starts with the letter A and goes up like this:
Name department
A Person1 3
B Person2 3
C Person3 3
D Person4 3
E Person10 3
A Person6 10
B Person7 10
C Person8 10
A Person4 13
B Person9 13
It has to be a SQL query, unfortunately no PL/SQL
I was able to create this query, but its lacking. Department_id will be a variable, a person can choose one department or several departments, so the query varies in size.
select chr(64+rownum), name, department_id
from ( select name, department_id
from employees
where department_id = 3
order by id_but, naam
union
select chr(64+rownum), name, department_id
from ( select name, department_id
from employees
where department_id = 10
order by id_but, naam
union
select chr(64+rownum), name, department_id
from ( select name, department_id
from employees
where department_id = 13
order by id_but, naam
order by id_but, naam
The employees table has the following columns:
id, name, department_id
Can anyone help me make this query better? parhaps with the With clause?

Use analytic function ROW_NUMBER:
with t as (
           select 'A' name,3 department from dual union all
           select 'B',3 from dual union all
           select 'C',3 from dual union all
           select 'D',3 from dual union all
           select 'E',3 from dual union all
           select 'A',10 from dual union all
           select 'B',10 from dual union all
           select 'C',10 from dual union all
           select 'A',13 from dual union all
           select 'B',13 from dual
select  name,
        'Person' || row_number() over(partition by department order by name) person,
        department
  from  t
  order by 3,
           3
NAME                           PERSON                                         DEPARTMENT
A                              Person1                                                 3
B                              Person2                                                 3
C                              Person3                                                 3
D                              Person4                                                 3
E                              Person5                                                 3
A                              Person1                                                10
B                              Person2                                                10
C                              Person3                                                10
A                              Person1                                                13
B                              Person2                                                13
10 rows selected.
SQL> SY.

Similar Messages

  • Oracle Sql Query issue Running on Different DB Version

    Hello All,
    I have come into situation where we are pruning sql queries on different DB version of Oracle and have performance issue. Let me tell you in brief and i really appreciate for your prompt response as its very imperative stuff.
    I have a query which is running on a DB of version 7.3.4 and it takes around 30 mins where as the same query when run on 8i it takes 15sec., its a huge difference. I have run the statistics to analyze on 7.3 and its comparatively very high. Question here is, the sql query trys to select data from same schema table and 2 tables from another DB using DB link and 2 other tables from another DB using DB link.So,how can we optimize this stuff and achieve this run as same time as 8i DB in 7.3. Hope i am clear about my question, Eagerly waiting for your replies.
    Thanks in Advance.
    Message was edited by:
    Ram8

    Difficult to be sure without any more detailed information, but I suspect that O7 is in effect copying the remote tables to local temp space, then joining; 8i is factoring out a better query to send to the remote DBs, which does as much work as possible on the remote DB before shipping remaining rows back to local.
    You should be able to use EXPLAIN PLAN to identify what SQL is being shipped to the remote DB, If you can't (and it's been quite a while since I tried DB links or O7) then get the remote DBs to yourself, and set SQL_TRACE on for the remote instances. Execute the query and then examine the remote trace files, And don't forget to turn off the tracing when you're done.
    Of course it could just be that the CBO got better,,,
    HTH - if not, post your query and plans for the local db, and the remote queries.
    Regards Nigel

  • SQL Query issue with large varchar column

    I have a SQL Query (PL/SQL function body returning SQL query) which contains a large varchar column. Even if I substring the column to 30chars when it displays on the page it wraps. I have tried putting nowrap="wrap" for the HTML table cell attributes and it still wraps. I have tried setting the width attributes on the column even though it's not an updateable column. Does anyone have any ideas on how prevent this from wrapping. In some cases 1 line will take up 3 because of this wrapping issue and it's not nice to look at. It seems that the column is somewhere set to a fixed width, which is less than 30 characters, and anything beyond this fixed width wraps.

    Hi Netha,
    Can you please provide the DDLs of three tables you are using,
    Also post us how many rows you are getting output for this query? 
    select * from dim.store st where
    st.store_code = 'MAUR'
    also try to run and update statement on this table as below and execute your query
    update dim.store
    set store_code
    = ltrim(rtrim(store_code))
    where
    store_code = 'MAUR'
    once you run this update, then run your query.  Let us know the result.

  • VO SQL Query issue... JHeadstart...

    Hi,
    I am presently using JHeadStart 10.1.3.3.81 in order to convert an Oracle Form FMB via an XML format to an ADF-JSF application as follows:-
    1) Using the iff2xml90 utility provided with the Oracle designer converted the Oracle Form FMB to an XML file.
    2) Using Jdeveloper(with JHeadstart 10.1.3.3.81) converted the XML file generated in STEP 1 above into a J2EE ADF-JSF project.
    3) One of the VO's generated in the project has the following query:-
    SELECT INITMV.INSTALLATION_ID,
    INITMV.FACILITY_ID,
    INITMV.DI_SHORT_NAME
    FROM CP_INSTALLATIONS_ALL INITMV
    WHERE ( CPPRI.ORG_ID in(select org_id from cp_system_controls ) and CPPRI.DELIVERY_LOCATION_NUMBER=nvl(:b_LOC_LOCATION_NUMBER,CPPRI.DELIVERY_LOCATION_NUMBER) and
    (:b_LOC_CATEGORY_ID is null or CPPRI.INVENTORY_ITEM_ID in (select inventory_item_id from di_mtl_item_categories_v where category_id=:b_LOC_CATEGORY_ID)) and exists (select 1
    from DI_DISTRIBUTION_PLANS_V dis where trunc(dis.plan_date)=trunc(sysdate) and CPPRI.facility_id=dis.facility_id and CPPRI.installation_id=dis.installation_id and
    CPPRI.organization_id=dis.organization_id and CPPRI.inventory_item_id=dis.inventory_item_id and (dis.midcycle_call_flag='Y' or (CPPRI.call_days is not null and trunc
    (dis.last_delivery_date+CPPRI.call_days)<=trunc(sysdate)))) ) ORDER BY DI_SHORT_NAME
    As can be seen from the above query, the CPPRI reference does not point to any db table/view/synonym. Actually the CPPRI reference should be pointing to the CP_INSTALLATIONS_ALL table.
    4) When I checked the XML file for the datablock to which this query belongs, I found the following:-
    <Block Name="INITMV" ScrollbarLength="1200" DeleteAllowed="false" OrderByClause="order by DI_SHORT_NAME" WhereClause="where (
CPPRI.ORG_ID in(select org_id from cp_system_controls )
and CPPRI.DELIVERY_LOCATION_NUMBER=nvl(:LOC.LOCATION_NUMBER,CPPRI.DELIVERY_LOCATION_NUMBER)
and (:LOC.CATEGORY_ID is null or CPPRI.INVENTORY_ITEM_ID in (select inventory_item_id from di_mtl_item_categories_v
where category_id=:LOC.CATEGORY_ID))
and exists (select 1
from DI_DISTRIBUTION_PLANS_V dis
 where trunc(dis.plan_date)=trunc(sysdate)
 and CPPRI.facility_id=dis.facility_id
 and CPPRI.installation_id=dis.installation_id
 and CPPRI.organization_id=dis.organization_id
 and CPPRI.inventory_item_id=dis.inventory_item_id
 and (dis.midcycle_call_flag='Y'
 or
 (CPPRI.call_days is not null and trunc(dis.last_delivery_date+CPPRI.call_days)<=trunc(sysdate))))
)" Alias="CPPRI" UpdateAllowed="false" NextNavigationBlockName="INSHST" InsertAllowed="false" DMLDataName="CP_INSTALLATIONS_ALL" ParentModuleType="25" ScrollbarYPosition="984" ScrollbarTabPageName="" QueryDataSourceName="CP_INSTALLATIONS_ALL" ParentType="3" RecordsBufferedCount="9" ParentName="CGSO$BLOCK_MR" DMLReturnValue="true" ParentFilename="aqmolb65.olb" PreviousNavigationBlockName="LOC" ParentModule="AQMOLB65" PersistentClientInfoLength="41" EnforcedPrimaryKey="true" RecordsDisplayCount="6" ScrollbarXPosition="6700" DirtyInfo="false" ScrollbarCanvasName="CG$PAGE_1">
    I am not sure whether the above is at all a bug or whether the Oracle Form from which the sql query was generated in itself had a glitch in the first place(actually it works fine on the Oracle Forms side). If this is a bug, does this belong to the FMB to XML conversion or from the XML to J2EE conversion.
    Regards,
    Lester.

    Hi,
    JHeadstart questions should be posted to
    JHeadstart
    Frank

  • SQL Query report - how to evaluate the current sort column?

    Hi,
    I have a need to determine which column has been selected to sort the current report by. I need to pull this column name and pass it when a button is pressed so that the ensuing PDF report generated using PLPDF will be able to sort the data the same way.
    thanks in advance.

    Hi,
    As i think, you need to create report manually using SQL query and for sorting you can put a drop down box and user can select a field name and shorting type that is ASC or DESC from another drop down and than generate a report, additionally you can have another button for exporting to PDF that you can now manage through PLPDF and you can get the shorting column.
    hope this can help you.
    Thanks,
    Jaydip

  • SQL Query Issue - (inner not passing to outer query)

    Hello everyone:
    Here is my SQL query:
    SELECT RD.SITE,
      ROUND(
      (SELECT COUNT (DISTINCT PB.EMP_ID)
      FROM BOOK PB
      WHERE PB.EMP_ID IN
        (SELECT PB.EMP_ID FROM BOOK PB
      (SELECT COUNT (DISTINCT PB.EMP_ID)
      FROM BOOK PB
      WHERE PB.EMP_ID IN
        (SELECT PB.EMP_ID FROM BOOK PB
    WHERE MO.QUALIFIER > 4
      )* 100, 2) AS PERCENTAGE
    FROM BOOK PB
    LEFT JOIN POSITION MO
    ON PB.EMP_ID = PO.EMP_ID
    INNER JOIN PHYS_LOCATION RD
    ON MO.HOUSED         = RD.SITE_ID
    WHERE MO.ACTUAL_END IS NULL
    GROUP BY RD.SITE;Why am I getting the overall percentage for all Sites as opposed to each percentage calculating for each individual site. I grouped by RD.SITE, so I presumed it would calculate percentages for each site. What did I do wrong?
    Thank you for your assistance.

    AquaNX4 wrote:
    Hello everyone:
    Here is my SQL query:
    SELECT RD.SITE,
    ROUND(
    (SELECT COUNT (DISTINCT PB.EMP_ID)
    FROM BOOK PB
    WHERE PB.EMP_ID IN
    (SELECT PB.EMP_ID FROM BOOK PB
    (SELECT COUNT (DISTINCT PB.EMP_ID)
    FROM BOOK PB
    WHERE PB.EMP_ID IN
    (SELECT PB.EMP_ID FROM BOOK PB
    WHERE MO.QUALIFIER > 4
    )* 100, 2) AS PERCENTAGE
    FROM BOOK PB
    LEFT JOIN POSITION MO
    ON PB.EMP_ID = PO.EMP_ID
    INNER JOIN PHYS_LOCATION RD
    ON MO.HOUSED         = RD.SITE_ID
    WHERE MO.ACTUAL_END IS NULL
    GROUP BY RD.SITE;Why am I getting the overall percentage for all Sites as opposed to each percentage calculating for each individual site. I grouped by RD.SITE, so I presumed it would calculate percentages for each site. What did I do wrong?Because that is what you are requesting. Your scalar subquery to get the percentage is not restricted by the current site. Add filter columns to restrict the selected values for the computation
    Edited by: riedelme on May 8, 2013 7:26 AM

  • SQL query issue

    I am attempting to connect to a Progress database using JDBC and am having a few issues with my SQL statement. The code concerned looks like this:
    // Get a statement from the connection
    Statement stmt = conn.createStatement() ;
    // Execute the query
    ResultSet rs = stmt.executeQuery( "SELECT * FROM pub.cust" ) ;
    // Loop through the result set
    while( rs.next() )
    System.out.println( rs.getString( "cust-code" ) ) ;
    That works just fine. Prints out each of the cust-code values. My issue comes when I try to refine the query to be:
    ResultSet rs = stmt.executeQuery( "SELECT * FROM pub.cust WHERE cust.Cust-code='100001-0'" ) ;
    or even
    ResultSet rs = stmt.executeQuery( "SELECT Cust-code FROM pub.cust" ) ;
    Both of these give me an error saying Column not found/specified.
    if I wrap Cust-code in single quotes, the script prints Cust-code on each line, not the value for it. If I escape Cust-code like Cust\-code, I get an Illegal escape character. Any ideas?

    I have never used Progress, but maybe you have to fully qualify the field names like this:
    ResultSet rs = stmt.executeQuery( "SELECT * FROM pub.cust WHERE pub.cust.Cust-code='100001-0'" ) ;
    ResultSet rs = stmt.executeQuery( "SELECT pub.cust.Cust-code FROM pub.cust" ) ;Just a thought.

  • Adhoc Query Issue - How to restrict /SAPQUERY/H2 access

    Hi Experts,
    I have created two User Groups HR_1 (assigned to infosets for Time data) and HR_2 (assigned to Infosets for Payroll data). Also, I want to assign the HR_1 to a user Time_admin and HR_2 to Payroll_Admin, so that Payroll admin do not have access to Time data and vice versa.
    Now I can restrict the access but when I execute the Adhoc query for the user, I can see the User group that I have assigned with a default user
    group /SAPQUERY/H2, which has access to all data.
    My question is, how can I restrict the access for the /SAPQUERY/H2 for the users so that the users have only access to their user groups i.e.,
    Time_admin to HR_1 only and Payroll_admin to HR_2 only.
    Regards
    Vikrant

    I was expecting some Answer but was unfortunate enough.
    I have found a solution and will mention it for those who face this issue in future.
    Configuration in “The Global Area (Cross Client)”, has some limitations
    1)      1) Restricting the access via T-Code S_PH0_48000510 (Ad-hoc Query) is difficult as this t-code S_PH0_48000510 uses the user group /SAPQUERY/H2 to which an Infoset is assigned /SAPQUERY/HR_ADM. This infoset has access to all the master data and is standard one (default).
    2)      Also, this is available in “The Global Area (Cross Client)”, due to which there will be access to all HR master data.
    Configuration in “Standard Area, i.e., Client Specific”
    1)      With this approach, we will do the same configurations in “Standard Area (Client Specific)” i.e.,
    I.            Create User groups (ZHR_1 and ZHR_2)
    II.            Create Infosets (X1 for time management Infotypes and X2 for PM and PA Infotypes)
    III.            Assign User Groups to Infosets (X1 to ZHR_1 and X2 to ZHR_2)
    IV.            Assign Users to User Groups (As per the requirement)
    2)      Additionally, Admin need to do two things
    I.            For the Users Set Parameters via SU3 as:
    Parameters for Users for Time Data
    Parameter ID
    Parameter Value
    Description
    AQB
    ZHR_1
    ABAP Query: User group
    AQS
    X1
    SAP Query: Infoset
    AQW
    Standard
    ABAP Query: Query area
    Parameters for Users for OM/PA data
    Parameter ID
    Parameter Value
    Description
    AQB
    ZHR_2
    ABAP Query: User group
    AQS
    X2
    SAP Query: Infoset
    AQW
    Standard
    ABAP Query: Query area
    II.            Provide access to T-Code S_PH0_48000513 (also calls Adhoc Query but this t-code will respect the parameters set by us in SU3).
    III.            As a result of this approach, the Users on executing the T-Code S_PH0_48000513 will be directly moved to the Adhoc query screen with their authorized access.
    NOTE:
    these changes cannot be transported via Transport.
    Regards,
    Vikrant

  • CR VS 2010 SQL query issue

    Hi all
    I'm facing a problem with my code.
    Dim cr As New CrystalReport1()
    Dim newCmd As SqlCommand
    Dim conn As SqlConnection
    Dim da As New SqlDataAdapter
    Dim ds As New DataSet
    Dim cr As New CrystalReport1
    Dim MyConnectionStr As String = "Data Source=MyDB;Initial catalog=MyCat;Integrated Security=true;" ' providerName=System.data.sqlClient"
    conn = New SqlConnection(MyConnectionStr)
    Dim cmdText As String
        cmdText= " SELECT customer.customer_name, customer.customer_tel, orders.order_stuff_name, orders.order_number" & _
    " FROM   hesabres.dbo.orders orders inner JOIN hesabres.dbo.customer customer ON orders.order_customer_id=customer.customer_id"
    da = New SqlDataAdapter(newCmd)
    da.fill(ds)
    cr.SetDataSource(ds.Tables(0))
    crystalviewer1.ReportSource = cr
    conn.Close()
      newCmd.Dispose()
    if i run the query, let's say it returns 2 rows
    I my CR veiwer, it shows 4 rows  (duplicates 2 x 2),
    if the query returns 3 rows, CR displays 9 rows (3 x 3) and so on 10 (10x10)....
    How is it possible??
    In my Dataset, the number of rows is always correct!
    Do you have any idea?
    Thanks in advance.
    B.

    See this wiki on how to troubleshoot issues with CR and datasets:
    Troubleshooting Issues with VS .NET Datasets and Crystal Reports - Business Intelligence (BusinessObjects) - SCN Wiki
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center
    Canada
    Follow us on Twitter

  • Regarding accessing SQL query issued by any user in Oracle 10g

    Hi all,
    i want to know the queries issued by various users accessing a database...
    But the in view DBA_AUDIT_TRAIL,I was getting empty value...(in SQLTEXT column) ...how can i get this value...
    Thanx
    in advance..

    Straight from the documentation :
    The SQL_BIND and SQL_TEXT columns are only populated if the AUDIT_TRAIL initialization parameter is set to db,extended.In addition, you have to make sure you issued the AUDIT command on the objects you would like to AUDIT access on.
    [Configuring and Administering Auditing|http://download.oracle.com/docs/cd/B19306_01/network.102/b14266/cfgaudit.htm]

  • SQL query problem:  how tp select all duplication in the table?

    Hi all,
    I have a table with the following columns:
    1. contact_id
    2. fname
    3. lname
    4. email
    The email column must be unique (unfortunately it's not); therefore, I have to delete all duplication in the system.
    Question: how can I select all duplication in the table?
    I tried this...didn't work (I'm expecting only the emails that are duplicated)
    THANK YOU!
    SELECT distinct TC1.email, TC1.contact_ID FROM ta_contacts AS TC1 where TC1.email <>'' AND TC1.email not in (   SELECT distinct TC2.email   FROM ta_contacts AS TC2   where TC2.email <>'' )

    Sounds like an SQL and not a JDBC question. In any case, if a column needs to be unique, then you should, of course, designate a unique constraint on the table so you never end up with duplicates in the first place.

  • SQL Query Issues

    Friends,
    We are running ORACLE 11g in Unix enviornment. Every week, our application run a flow from application, its run a query everytime and its not use the right index due to this its take lot of time. I want to set in database, its use everytime our mention index and does not change execution plan. Any ideas?
    Regards,
    Irfan Ahmad

    Hi
    Use a sql profile. You can have a hint to you the index so when application use the sql statement it will start using the sql statement with index hint .
    DECLARE
       test_task_name VARCHAR2(30);
       test_sqltext   CLOB;
    BEGIN
    test_sqltext := 'SELECT /*+ index(XX <your index name>) */ * from < your table> XX where co1=''yyyy'')';
    test_task_name := DBMS_SQLTUNE.CREATE_TUNING_TASK(
    sql_text    => test_sqltext,
    user_name   => '<your schema name>',
    scope       => 'COMPREHENSIVE',
    time_limit  => 60,
    task_name   => 'test_sql_tuning_task_2',
    description => 'Test Task to tune a query');
    END;
    BEGIN
    DBMS_SQLTUNE.EXECUTE_TUNING_TASK( task_name => 'test_sql_tuning_task_2');
    end;
    Check the oracle support document 271196.1 for further clarification
    Cheers
    Kanchana.
    Edited by: Kanchana Devasurendra on Nov 1, 2010 3:47 PM

  • SQL Query question : how to add data to two tables connected by third Junction-table.

    Hello specialists.
    Maybe this is the wrong formum but I've got a question for which you probably have the answer, i hope.
    Situation
    John is member of Group_A and Group_B
    Bill is member of Group_B and Group_C
    Allison is member of Group_A and Group_E
    How can I create a query to input Allisons username into table 1 and groupmembership into table 2. Also updating the relationship within junction-table3 must be done automaticaly. I want to avoid duplicate records.
    The final situation I want is given in red text.
    The relationships between the tables are as follows
    Table1 (PK)ID-Userinfo    [ONE]    <------------> [MANY] Table3 ID-Userinfo
    Table3 (PK)ID-GroupInfo  [MANY] <------------> [ONE]   Table2 (PK)ID-GroupInfo
    Table1: UserInfo
    (PK)ID-Userinfo   UserName
    1                        John
    2                        Bill
    3                        Allison
    Table2: GroupInfo
    (PK)ID-GroupInfo  GroupName
    1                          Group_A
    2                          Group_B
    3                          Group_C
    4                          Group_E
    Table3: MemberOf
    (PK)ID-MemberOf  ID-UserInfo  ID-GroupInfo
    1                           1                 1
    2                           1                 2
    3                           2                 2
    4                           2                 3
    5                           3                 1
    6                           3                 4
    I hope you can help me cracking this nut.
    Thx in advance. Greetings Fred

    Hi RSingh
    May i comment something very small?
    Anyone who writes a response, done it on the assumption that he is writing the answer. Writing response is the statement of "I think that's correct". Each one that write a response see it as the answer. It makes no sense immediately mark your own
    answer too (double actions). Marking a response as "Propose as answer" is explicitly designed to
    allow others to announce that they think this is the best right answer in the thread, after the discussion :-)
    In my personal opinion, we should not mark our own answers. There are enough users with permissions, which would be glad to mark your answers as correct / recommended.
    Give us the opportunity, I will love to mark your answers :-). Moreover, by marking "Proposed as answer" you actually close the thread, other users which see that the question got an answer, may not check
    the thread at all, and maybe they could provide a different answer.
    * Exceptions are very specific cases. For example a case where the message has already become very old and no one marked anything. in this case marking "Proposed as answer" can help others and especially the person who ask the question, to focus
    on thread and the answer (more on the subject is in the Moderators forum and the Moderators Guide by the way).
    [Personal Site] [Blog] [Facebook]

  • SQL query issue in a method

    I am trying to use a method to query a database to gather a person's name when the Social Security Number is entered. However in the display, it seems to only bring back the field that you use to compare in the load statement. Can anyone tell me what I am doing wrong? The below example will bring back the SSN but if I change the last line in the example to HISTORY.fullName I get a "Null Value" returned back. Thanks.
    input "Social Security Number of Employee to terminate: " : intSSN
    //intSSN is a local variable
    using title = "Termination Applet",
    buttons = ["OK", "Cancel"]
    returning selectedButton = selection
    //pg 310 of Fuego 5.5 document
    //Database name is HISTORY, local variable is ssn, seems to only only display what is in load
    //and nothing else
    load BpmDB.Dbo.HISTORY using ssn = intSSN
    display HISTORY.ssn

    load BpmDB.Dbo.HISTORY using ssn = intSSN
    display HISTORY.ssnTry doing:
    load BpmDB.Dbo.HISTORY using ssn = intSSN
    display HISTORY //Note the difference, we're asking for the whole object,
    not just the ssn
    Juan
    On Thu, 07 Sep 2006 13:52:39 -0300, Ben Sfanos wrote:
    I am trying to use a method to query a database to gather a person's
    name when the Social Security Number is entered. However in the
    display, it seems to only bring back the field that you use to compare
    in the load statement. Can anyone tell me what I am doing wrong? The
    below example will bring back the SSN but if I change the last line in
    the example to HISTORY.fullName I get a "Null Value" returned back.
    Thanks.
    input "Social Security Number of Employee to terminate: " : intSSN
    //intSSN is a local variable
    using title = "Termination Applet",
    buttons = ["OK", "Cancel"]
    returning selectedButton = selection
    //pg 310 of Fuego 5.5 document
    //Database name is HISTORY, local variable is ssn, seems to only only
    display what is in load
    //and nothing else
    load BpmDB.Dbo.HISTORY using ssn = intSSN
    display HISTORY.ssn

  • Sql loader issue(How to specify a file that exists on remote server)

    In sqlldr infile parameter I'd like to give a data file that exists on remote server.How can I specify???Please help me in the syntax.
    Any help would be greatly appreciated.
    Edited by: 792353 on Sep 24, 2010 7:22 AM

    sqlldr can accept any path that is VALID and it can be any type of share as long as the OS supports the share.
    so INFILE can be anything you want as sqlldr will simply attempt to access it via the OS.
    if you are on a linux box going to another linux box with an NSF mount point on the box running sqlldr simply reference:
    INFILE '/mountpoint/fname'
    Now I have never tried a UNC path before but I would guess that if you are on a windows box, going to another winddows box and the box running sqlldr was logged in with the right permissions it would simply be:
    INFILE '\\server\directory\file'
    I doubt that it will accept a URL as in:
    INFILE '//servername.com/directory/file'
    I don't think that sqlldr does anonymous ftp or htp file transfer protocol, but I could be wrong.
    NOTE: I have found that it is best to ALWAYS surround your INFILE parameter with single quotes.

Maybe you are looking for