User can Execute SQL Statement but not Stored Procedure

I have a function in Access that calls a stored procedure to update a table. When I run it, it works fine but when the users try to run it, they get an error.
If I change it run the actual SQL syntax that is in the stored procedure then the users can run it and update the table without any problems, which makes no sense to me. It's doing the same exact thing as the stored procedure. I'd much rather have them be
able to run the procedures then writing the SQL in VBA modules because that's going to end up being a lot of code.
Any idea on why it's like this and how to correct it? Any assistance would be appreciated.

Hello,
When you give a user permission to run a stored procedure, everything on that procedure but Dynamic SQL will be executed
without evaluating user permissions on the objects the stored procedure deals with.
On the link I provided above, you will see how to provide permissions to stored procedures. Try creating database roles, add user to database roles, then assign permissions to database roles.
Hope this helps.
Regards,
Alberto Morillo
SQLCoffee.com

Similar Messages

  • Execute SQL Task, OLE DB, Stored Procedure, Returns unexpected value upon second run

    when debugging SSIS, the "Execute SQL Task" runs a stored procedure and returns the expected value. When running the package a second time, the task returns an unexpected value. When running in VS2012 SQL editor, everything operates as expected.
    Please help me debug how to get the stored proc to return the same value every time the SSIS Package is run. thanks!
    Here is the sequence of events and what happens....
    Look for a Positor that matches the Application, Host, and User
    No matching PositorId is found, Creates new Positor row, returns that new PositorId
    Use PositorId to upload some data (Every thing works)
    re-run/debug the ssis pacakge
    Look for a Positor that matches the Application, Host, and User 
    <No clue what is happening>
    Returns -1 (SHOULD BE the same PositorId value returned in #2)
    "Execute SQL Task" Setup: No edits to Result Set nor Expressions
    "Execute SQL Task" Setup: GENERAL
    "Execute SQL Task" Setup: PARAMETER MAPPING
    SP called by "Execute SQL Task"
    CREATE PROCEDURE [posit].[Return_PositorId]
    AS
    BEGIN
    DECLARE @PositorId INT = [posit].[Get_PositorId]();
    IF (@PositorId IS NULL)
    BEGIN
    DECLARE @ProcedureDesc NVARCHAR(257) = OBJECT_SCHEMA_NAME(@@PROCID) + N'.' + OBJECT_NAME(@@PROCID);
    DECLARE @PositorNote NVARCHAR(348) = N'Automatically created by: ' + @ProcedureDesc;
    EXECUTE @PositorId = [posit].[Insert_Positor] @PositorNote;
    END;
    RETURN @PositorId;
    END;
    Supporting SQL Objects:
    CREATE FUNCTION [posit].[Get_PositorId]
    RETURNS INT
    AS
    BEGIN
    DECLARE @PositorId INT = NULL;
    SELECT TOP 1
    @PositorId = [p].[PO_PositorId]
    FROM [posit].[PO_Positor] [p]
    WHERE [p].[PO_PositorApp] = APP_NAME()
    AND [p].[PO_PositorHost] = HOST_NAME()
    AND [p].[PO_PositorUID] = SUSER_ID();
    RETURN @PositorId;
    END;
    GO
    CREATE PROCEDURE [posit].[Insert_Positor]
    @PositorNote NVARCHAR(348) = NULL
    AS
    BEGIN
    DECLARE @ProcedureDesc NVARCHAR(257) = OBJECT_SCHEMA_NAME(@@PROCID) + N'.' + OBJECT_NAME(@@PROCID);
    SET @PositorNote = COALESCE(@PositorNote, N'Automatically created by: ' + @ProcedureDesc);
    DECLARE @Id TABLE
    [Id] INT NOT NULL
    INSERT INTO [posit].[PO_Positor]([PO_PositorNote])
    OUTPUT [INSERTED].[PO_PositorId]
    INTO @Id([Id])
    VALUES(@PositorNote);
    RETURN (SELECT TOP 1 [Id] FROM @Id);
    END;
    GO
    CREATE TABLE [posit].[PO_Positor]
    [PO_PositorId] INT NOT NULL IDENTITY(0, 1),
    [PO_PositorApp] NVARCHAR(128) NOT NULL CONSTRAINT [DF__PO_Positor_PO_PositorApp] DEFAULT(APP_NAME()),
    CONSTRAINT [CL__PO_Positor_PO_PositorApp] CHECK([PO_PositorApp] <> ''),
    [PO_PositorName] NVARCHAR(256) NOT NULL CONSTRAINT [DF__PO_Positor_PO_PositorName] DEFAULT(SUSER_SNAME()),
    CONSTRAINT [CL__PO_Positor_PO_PositorName] CHECK([PO_PositorName] <> ''),
    [PO_PositorHost] NVARCHAR(128) NOT NULL CONSTRAINT [DF__PO_Positor_PO_PositorHost] DEFAULT(HOST_NAME()),
    CONSTRAINT [CL__PO_Positor_PO_PositorHost] CHECK([PO_PositorHost] <> ''),
    [PO_PositorSID] VARBINARY(85) NOT NULL CONSTRAINT [DF__PO_Positor_PO_PositorSID] DEFAULT(SUSER_SID()),
    [PO_PositorUID] INT NOT NULL CONSTRAINT [DF__PO_Positor_PO_PositorUID] DEFAULT(SUSER_ID()),
    [PO_PositorNote] VARCHAR(348) NULL CONSTRAINT [CL__PO_Positor_PO_PositorNote] CHECK([PO_PositorNote] <> ''),
    [PO_tsInserted] DATETIMEOFFSET(7) NOT NULL CONSTRAINT [DF__PO_Positor_PO_tsInserted] DEFAULT(SYSDATETIMEOFFSET()),
    [PO_RowGuid] UNIQUEIDENTIFIER NOT NULL CONSTRAINT [DF__PO_Positor_PO_RowGuid] DEFAULT(NEWSEQUENTIALID()) ROWGUIDCOL,
    CONSTRAINT [UX__PO_Positor_PO_RowGuid] UNIQUE NONCLUSTERED([PO_RowGuid]),
    CONSTRAINT [UK__Positor] UNIQUE CLUSTERED ([PO_PositorApp] ASC, [PO_PositorHost] ASC, [PO_PositorUID] ASC),
    CONSTRAINT [PK__Positor] PRIMARY KEY ([PO_PositorId] ASC)
    GO
    ssd

    The error is in item 7: Returns -1 (SHOULD BE the same PositorId value returned in #2); but no error message is returned or thrown from SSIS.
    The error message indicated referential integrity is not upheld when inserting records. This error message occurs AFTER the Execute SQL Task successfully completes; the E.SQL Task returns -1.  The executed SQL code will not allow values less than 0
    ([PO_PositorId] INT NOT NULL IDENTITY(0, 1),)
    [Platts Valid [41]] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E2F.
    An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 11.0"  Hresult: 0x80040E2F  Description: "The statement has been terminated.".
    An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 11.0"  Hresult: 0x80040E2F  Description:
    "The INSERT statement conflicted with the FOREIGN KEY constraint "FK__PricingPlatts_Posit_PositorId". The conflict occurred in database "Pricing", table "posit.PO_Positor", column 'PO_PositorId'.".
    The aforementioned FOREIGN KEY constraint is due to the value being returned by the Execute SQL Task.; therefore, the error lies in the value returned by the Execute SQL Task.

  • Writing mulitple sql statements in 1 stored procedure

    Hi all, can i know how to create mulitple sql statements in 1 stored procedure??
    Eg the first sql statement will generate few results and my second sql statement will based on the first statement result to execute its second results and my third sql statements will on the second results to generate the final results which will be passed back to jsp pages as a resultset??
    For the time being, i only know how to create a single sql statement in one stored procedure..i had surf through the oracle website but cant find any solution. Can anyone help me?? Samples or links to any website will do.. Thanks alot...

    Hi Irene,
    If I understand your question correctly, then I have already written
    a similar (PL/SQL) stored procedure without any problems.
    However, I do think your question is more suited to the following
    forum:
    http://forums.oracle.com/forums/forum.jsp?id=478021
    I also think it will help others to answer your question if you
    include the following information:
    1. Version of Oracle you are using.
    2. The error message you are getting.
    3. The part of your code that is causing the problem.
    Also, have you looked at the following web sites?
    http://asktom.oracle.com
    http://metalink.oracle.com
    Good Luck,
    Avi.

  • User is in team state but not in team summary - Cisco supervisor desktop

    We have Cisco supervisor desktop where supervisor can see user in team state but not in team summary?? Any clue why is could be happening??
    Any help is much appreciated
    Thanks!

    Hi David,
    Not sure of setting an alert but Supervisor can use "Table 17. Summary display data"
    Agents Not Ready : The number of agents in this CSQ who are currently in the Not Ready state.
    And "Table 12. Team Summary display data (cont’d)"
    Max Not Ready : The longest time the agent spent in the Not Ready state today.
    And also refer the section "Creating Supervisor Work Flows"
    Using the Supervisor Work Flow Administrator feature, you can configure your desktop to perform certain actions based on queue statistics for calls waiting and calls in queue for specified skill groups.
    Refer the below link for more information on this.
    http://www.cisco.com/en/US/docs/voice_ip_comm/cust_contact/contact_center/crs/express_8_5/user/guide/csd85ccxug-cm.pdf
    Hope it helps.
    Anand
    Pls rate helpful posts !!

  • Extraction SQL statement from oracle stored procedure stored in file

    Hi,
    I am newbie to oracle stored procedure. I need to extract the list of sqls present in oracle stored procedure. Besides that I also want to parse these sql statements to get the list of tables and columns used. Is there any tool which can help me in doing thats.
    thanks,
    govind

    why don't check on user_dependencies table instead?
    select referenced_name,referenced_type
    from user_dependencies
    where name='<your stored procedure name in upper case>'
    and referenced_type = 'TABLE'HTH,
    Prazy

  • Document library: user can see the metadata but not the file itself

    Hello,
    For a specific document library certain users will have the right to see the metadata but not the file itself. The only solution I can  think of is using a http handler. But I don't know if I can get the user that requests the document.
    Are there any other approaches to this requirement?
    Can I get the username of the user that makes that request?
    I guess that http handler is deployed at the Web application level - am I right?
    Thank you
    Christos

    Nicolas, thank you for your answer.
    I think this this is not a strong protection. Everybody can istall sp designer or go through UNC path, like \\myserver\documentlibray or \\myserver\lists\mylist and see the documents- and we use unc paths a lot. I don't want to get into trouble when a (wiki)
    leak is made.
    Christos

  • Valid users can see a site, but not the document libraries they have permissions for

    Hello everybody,
    at a customer's site, there is SharePoint Foundation 2013 SP1 running, bound to both http and https. Seeminlgy out of nothing, a strange behavior occurred: Visting
    http://intranet/subsite showed the page headers (logo, global navigation etc.), but no content. The welcome text was missing as well as the links to the document libraries which should appear in the left navigation.
    After explicitely adding http://intranet as an alternate name (https://intranet was active only, don't know why), we can again reach content via http. Still strange appears, that
    http://intranet global navigation links get redirected to https (fine, but unexpected). If we change a deep link to a document library from https to http in the browser's address bar, we can reach the content fine.
    However, one problem still exists: This site gets published via TMG 2010 via https, and that also worked just fine for many months. But now, I can try what I want in TMG, valid authenticated users see only the top navigation, but no content at all.
    Can anyone give me a hint about what to check? Of course, I will provide any info you may need.
    Best Regards, Stefan Falk

    Hello Daniel,
    Thank you for your response. As to your questions:
    I just added http://intranet to the alternate access mappings of the intranet zone and did not extend a website.
    Besides SharePoint Central Administration, there is no other SharePoint web site collection on this server, and no other non-SharePoint-IIS-Site. This is a VM for nothing else than hosting this single intranet site collection.
    We do see the same issue under two sub-websites underneath
    http://intranet, namely http://intranet/Datenaustausch and
    http://intranet/Protokolle. In both sub-sites, there is some welcome text on the home page and there are several document libraries, each with permissions not interited, but explicitely granted to specific users.
    The first (solved) issue was, that we could not see the document libraries when using http, but could see them using https. This was solved by adding the alternate access mapping for
    http://intranet explicitely.
    We can successfully browse the sites (using http and https now) from the internal network. The one issue left is that the same does not work through TMG, that is, coming from the external network, we can see and call up the sites in a browser, but not any
    content in them. We do see the site title and logo, and the global navigation at the top of the page, but we do not see the welcome text, nor the document libraries. This did work last week, and we do not know nor could find, why it stopped working. The issue
    persists regardless of whether we use bridging to https or to http between TMG and SharePoint.
    We have already restarted the SharePoint box, with no success.
    If I can provide any further information needed, I will be glad to do so.
    Best Regards, Stefan Falk

  • User Can Browse Network Server But Not Access Share

    I have a client computer that can access shares on a network, however on server the user cannot access a specific shared folder.
    Client is Windows 7 joined to domain
    Client can access shares on other servers and other shared folders on the problem server
    I have checked effective permissions for the user and they have modify permission on the folder/subfolders
    Share is Everyone - FC
    Have explicitly added user to share with FC permissions as well.
    Server is 2012.
    The error I am getting is The Specified Network Name is No Longer Available
    Other users do not have this issue.
    User can access share from another client.

    Hi,
    Thank you for the update.
    Best regards
    Michael Shao
    TechNet Community Support

  • Unable to execute EXECUTE IMMEDIATE statement in a stored procedure...

    Hi People,
    I use oracle 10g.In which i tried a procedure with follwing code and am thrown with the error that says,
    SQL>   create or replace procedure ptable(ptab varchar2) is
      2  lstmt varchar(200);
      3  begin
      4  lstmt:='CREATE TABLE '||ptab||'(a int,b varchar2(30)) ';
      5  execute immediate lstmt;
      6  end;
      7  /
    Procedure created.
    SQL>  exec ptable('hos');
    BEGIN ptable('hos'); END;
    ERROR at line 1:
    ORA-01031: insufficient privileges
    ORA-06512: at "VIDYA.PTABLE", line 5
    ORA-06512: at line 1Procedure has been created but error occurs while executing it.why do i get this error even though i possess DBA privilege?.which permission is lagging for me?.help me with ur suggestions.thanks in advance.
    With Regards
    VIDS

    Yep Yep.Perfect.It was the CREATE ANY TABLE privilege which i was lagging.I granted it to my schema and now got created with the table.Thanku so much for such a quick reply :).
    With Regards
    VIDS

  • Users can Edit over Web but not iCal

    My iCal server was running fine for months. My Groups had calendars enabled and the members of that group saw those calendars in iCal under Accounts->Delegation. I don't know when this happened but now when I add new members to the group, they can't see the group name in their iCal Delegation. They can edit the calendar via the web, but iCal can't see it at all. The users who had delegation set up properly for their group calendars have not been affected for those old calendars, but when I that user to another calendar-enabled group, that calendar does not show up in the delegation list.
    I can see this work by viewing the settings in Safari.
    I have a user named 'stupid' and a group named 'test'.
    'Stupid' has calendaring enabled. 'Test' has wiki, blog, and calendaring enabled. Group members only are able to read and write to these services. 'Stupid' is the only member of the group 'test', and that is 'stupid's only group.
    When I go to look at the principles in Safari (http://server:8008/principals/_uids_/35E60BF4-2915-482A-805F-CC72AF5058FF/)
    I get this:
    Directory Information
    Directory GUID: 058167af-ace8-519a-ac3d-e166498db024
    Realm: /Search
    Principal Information
    GUID: 35E60BF4-2915-482A-805F-CC72AF5058FF
    Record type: groups
    Short name: test
    Full name: test
    Principal UID: 35E60BF4-2915-482A-805F-CC72AF5058FF
    Principal URL: /principals/_uids_/35E60BF4-2915-482A-805F-CC72AF5058FF/
    Alternate URIs:
    -> /principals/groups/test/
    Group members:
    -> (users) stupid
    Group memberships:
    Calendar homes:
    -> /calendars/_uids_/35E60BF4-2915-482A-805F-CC72AF5058FF
    Calendar user addresses:
    -> https://classics.uc.edu:8443/principals/groups/test/
    -> https://classics.uc.edu:8443/principals/_uids_/35E60BF4-2915-482A-805F-CC72AF5058FF/
    -> /principals/_uids_/35E60BF4-2915-482A-805F-CC72AF5058FF/
    -> http://classics.uc.edu:8008/principals/_uids_/35E60BF4-2915-482A-805F-CC72AF5058FF/
    -> http://classics.uc.edu:8008/principals/groups/test/
    -> urn:uuid:35E60BF4-2915-482A-805F-CC72AF5058FF
    -> /principals/groups/test/
    So the iCal server sees 'stupid' as a member. But when I look at the proxy-write (http://server:8008/principals/_uids_/35E60BF4-2915-482A-805F-CC72AF5058FF/calendar-proxy-write/) I get:
    Directory Information
    Directory GUID: 058167af-ace8-519a-ac3d-e166498db024
    Realm: /Search
    Parent Principal Information
    GUID: 35E60BF4-2915-482A-805F-CC72AF5058FF
    Record type: groups
    Short name: test
    Full name: test
    Principal UID: 35E60BF4-2915-482A-805F-CC72AF5058FF
    Principal URL: /principals/_uids_/35E60BF4-2915-482A-805F-CC72AF5058FF/
    Proxy Principal Information
    Principal UID: 35E60BF4-2915-482A-805F-CC72AF5058FF#calendar-proxy-write
    Principal URL: /principals/_uids_/35E60BF4-2915-482A-805F-CC72AF5058FF/calendar-proxy-write/
    Alternate URIs:
    -> /principals/groups/test/calendar-proxy-write/
    Group members (Editable):
    Group memberships:
    Same thing in proxy-read. So while the iCal server does see 'stupid' as a member of 'test', it isn't really.
    Something similar shows up for older groups. When I click on proxy-write for an older group I can see all of the members that were there months ago, but newly added members (that is users that have been on the server for at least a year but are new to the group) don't show up in the list.
    When I go to iCal and add 'stupid' as an account I can see and edit 'stupid's calendar, but nothing shows up under delegation.
    Service Access allows all users and groups to the iCal service.
    I have stopped and restarted the iCal service and the server itself several times. I have also checked for users in both OD and Local. All users are OD only.
    The only thing I can get from my iCal error log is:
    2008-08-26 22:21:32-0400 [-] [caldav-8009] [AMP,client] Unauthenticated users not enabled with the 'calendar' SACL
    2008-08-26 22:21:32-0400 [-] [caldav-8009] [AMP,client] Allow proxy: user 'wikiserver' as 'test'
    2008-08-26 22:21:32-0400 [-] [caldav-8009] [AMP,client] REPORT /calendars/groups/test/calendar/ HTTP/1.1
    2008-08-26 22:22:02-0400 [-] [caldav-8009] [AMP,client] Unauthenticated users not enabled with the 'calendar' SACL
    2008-08-26 22:22:02-0400 [-] [caldav-8009] [AMP,client] Allow proxy: user 'wikiserver' as 'test'
    2008-08-26 22:22:02-0400 [-] [caldav-8009] [AMP,client] REPORT /calendars/groups/test/calendar/ HTTP/1.1
    2008-08-26 22:22:15-0400 [-] [caldav-8009] [AMP,client] PROPFIND /calendars/_uids_/7FD3BB44-70E4-4AE1-9AA0-A83D278F8544/ HTTP/1.1
    2008-08-26 22:22:15-0400 [-] [caldav-8009] [AMP,client] PROPFIND /calendars/_uids_/7FD3BB44-70E4-4AE1-9AA0-A83D278F8544/inbox/ HTTP/1.1
    2008-08-26 22:22:33-0400 [-] [caldav-8009] [AMP,client] Unauthenticated users not enabled with the 'calendar' SACL
    2008-08-26 22:22:33-0400 [-] [caldav-8009] [AMP,client] Allow proxy: user 'wikiserver' as 'test'
    2008-08-26 22:22:33-0400 [-] [caldav-8009] [AMP,client] REPORT /calendars/groups/test/calendar/ HTTP/1.1
    and this is the last bit of my access log:
    10.138.1.222 - stupid [26/Aug/2008:22:23:40 -0400] "PROPFIND /principals/_uids_/C6CF9F8A-3532-4D81-A4B7-823FC0262AA8/ HTTP/1.1" 207 1188 "-" "DAVKit/2.0 (10.5.4; wrbt) iCal 3.0.4" [16.9 ms]
    10.138.1.222 - stupid [26/Aug/2008:22:23:40 -0400] "PROPFIND /principals/_uids_/C6CF9F8A-3532-4D81-A4B7-823FC0262AA8/ HTTP/1.1" 207 432 "-" "DAVKit/2.0 (10.5.4; wrbt) iCal 3.0.4" [11.5 ms]
    10.138.1.222 - stupid [26/Aug/2008:22:23:40 -0400] "PROPFIND /principals/_uids_/35E60BF4-2915-482A-805F-CC72AF5058FF/ HTTP/1.1" 207 321 "-" "DAVKit/2.0 (10.5.4; wrbt) iCal 3.0.4" [8.8 ms]
    10.138.1.222 - stupid [26/Aug/2008:22:23:40 -0400] "PROPFIND /principals/_uids_/C6CF9F8A-3532-4D81-A4B7-823FC0262AA8/ HTTP/1.1" 207 1188 "-" "DAVKit/2.0 (10.5.4; wrbt) iCal 3.0.4" [10.6 ms]
    10.138.1.222 - stupid [26/Aug/2008:22:23:40 -0400] "PROPFIND /principals/_uids_/C6CF9F8A-3532-4D81-A4B7-823FC0262AA8/ HTTP/1.1" 207 432 "-" "DAVKit/2.0 (10.5.4; wrbt) iCal 3.0.4" [8.9 ms]
    10.138.1.222 - stupid [26/Aug/2008:22:23:40 -0400] "PROPFIND /principals/_uids_/35E60BF4-2915-482A-805F-CC72AF5058FF/ HTTP/1.1" 207 321 "-" "DAVKit/2.0 (10.5.4; wrbt) iCal 3.0.4" [8.6 ms]
    10.138.1.254 - - [26/Aug/2008:22:24:03 -0400] "REPORT /calendars/groups/test/calendar/ HTTP/1.1" 401 141 "-" "-" [3.7 ms]
    10.138.1.254 - "(sudoers)wikiserver as (groups)test" [26/Aug/2008:22:24:03 -0400] "REPORT /calendars/groups/test/calendar/ HTTP/1.1" 207 4361 "-" "-" [107.0 ms]
    10.138.1.254 - - [26/Aug/2008:22:24:34 -0400] "REPORT /calendars/groups/test/calendar/ HTTP/1.1" 401 141 "-" "-" [4.1 ms]
    10.138.1.254 - "(sudoers)wikiserver as (groups)test" [26/Aug/2008:22:24:34 -0400] "REPORT /calendars/groups/test/calendar/ HTTP/1.1" 207 4361 "-" "-" [118.1 ms]
    10.138.1.254 - - [26/Aug/2008:22:25:04 -0400] "REPORT /calendars/groups/test/calendar/ HTTP/1.1" 401 141 "-" "-" [4.5 ms]
    10.138.1.254 - "(sudoers)wikiserver as (groups)test" [26/Aug/2008:22:25:04 -0400] "REPORT /calendars/groups/test/calendar/ HTTP/1.1" 207 4361 "-" "-" [123.6 ms]
    10.138.1.254 - - [26/Aug/2008:22:25:34 -0400] "REPORT /calendars/groups/test/calendar/ HTTP/1.1" 401 141 "-" "-" [4.0 ms]
    10.138.1.254 - "(sudoers)wikiserver as (groups)test" [26/Aug/2008:22:25:34 -0400] "REPORT /calendars/groups/test/calendar/ HTTP/1.1" 207 4361 "-" "-" [115.2 ms]
    So if Workgroup Manager doesn't edit the iCal sql tables properly, what else can I use?

    Making a user a member of a group does not automatically make them a delegate of that group. They are members in the sense that they have full read-write access to the group data, but they won't have that group show up as a delegate.
    To make a user a delegate of a group, someone who is a member of that group needs to create a new account in iCal and set the server account URL to point to the groups principal path (/principals/groups/testgroup/ as the path in the URL) then they should add the user as a delegate via the iCal preferences panel for that account.

  • 'lag' works in normal SQL statement, but not when in a view (resolved)

    hi,
    got a problem when using 'lag' in a view.
    if i set up a select statement using 'lag' and execute it, all the results are correct.
    when i stick the exact same select into a view, then the results for the 'lag' entries are not correct any more.
    has anyone experienced this ?
    any hints would be good.
    thanks
    Martin
    using Oracle 10g Express
    version 10.2.0.1.0
    can not download the patch because i can not log into metalink - no CSI
    setting to resolved.
    Message was edited by:
    user614086

    Hi again,
    I think the problem is more with your expectation of what LAG should be doing than with LAG itself.
    LAG must calculate based on the result set, in your stand alone query that means what's left after the WHERE clause is applied.
    In the view that means across all rows the view produces. THEN you apply the where clause to the calculated values. You can see this in the example below.
    So what you'd need to do is define this view in a manner in which the WHERE clause won't make a difference to the logical window produced.
    That would mean using some columns in the partition by clause and order by clause, or leaving the lag function outside the view.
    create table test_lag (column1 number, column2 varchar2(10), column3 date);
    insert into test_lag values (1, 'ONE', trunc(sysdate,'DD') - 1);
    insert into test_lag values (2, 'TWO' trunc(sysdate,'DD') );
    insert into test_lag values (3, 'THREE', trunc(sysdate,'DD') + 1);
    insert into test_lag values (4, 'FOUR', trunc(sysdate,'DD') + 2);
    commit;
    create or replace view test_lag_v
    as
    select column1, column2, lag(column2, 1) over (order by column1 asc) AS laggery, lag(column1) over (order by column3 desc) as laggery_2
    from test_lag;
    ME_XE?select *
      2  from test_lag_v
      3  where column1 <> 3;
               COLUMN1 COLUMN2                        LAGGERY                                 LAGGERY_2
                     4 FOUR                           THREE
                     1 ONE                                                                            3
    2 rows selected.
    Elapsed: 00:00:00.50
    ME_XE?
    ME_XE?select *
      2  from test_lag_v;
               COLUMN1 COLUMN2                        LAGGERY                                 LAGGERY_2
                     4 FOUR                           THREE
                     3 THREE                          ONE                                             4
                     1 ONE                                                                            3
    3 rows selected.
    Elapsed: 00:00:00.68

  • Two Users can connect to apleu3test02 but not each other

    Hello,
    I have been trying to connect to with my wife whom is on a road runner cable modem behind a belkin wireless router. I am on a comcast cable modem behind a linksys wrt54gv4 router, however it is flashed with an open source firmware. Both of us can connect to the various test users out there but we have intermitent issues connecting with each other. I am guessing that this could be partially due to our maximum uploads being about 345kbps. I have not setup any port forwarding, triggering, or ther router adjustments yet. I figured if I can connect to the apple test users it should not be a problem. I am working on trying to test without my router but comcast will not let me mac grab a dhcp address. Any advice would be greatly appreciated.
    Me = macbook pro 2ghz with 2gb ram 10.4.7
    Wife = 1.67 g4 ibook with 512 mb ram 10.4.7

    I'm having the exact same problem. My father and I were able to communicate for weeks with no issues and since updating to 10.4.7 we have a 90% failure rate with video chat. It worked once last night and once this morning otherwise its an error -8.
    Now until recently we have never port forwarded anything except VNC and I can't see how we could use this method with iChat when we have numerous users here at home.
    I think the most frustrating part is it works from time to time and I can find the reason why.

  • Fails to execute all statements in a stored procedure

    We are executing a stored proc on SQL Server 7.0. We are using the jdbc odbc bridge. The procedure has database inserts on seven tables.
    It executes fine when it's executed from the SQL server query analyzer. All the inserts go through without any problem.
    We have a problem when the proc is executed from the front-end. All the inserts except the last two go through without any problem. The sixth insert is partially completed (two out of 300 rows are inserted) and the seventh one is not at all executed.
    No error messages are generated. Surprisingly the stored proc executes fine when executed from the front-end from a Win 98 machine. It's giving a problem only on Win 2000. Could somebody please help us in finding a fix for this problem. Why is it behaving differently when executed from the front-end on a Win 2000 mahinne.
    Thanks in advance.

    Why is it behaving differently when executed from the front-end on a Win 2000 mahinne. Possible reasons.
    -Because you aren't sending the same data.
    -It is has an internal error and that is being ignored.
    -It isn't going to the same database and the stored proc is actually different.

  • Error executing SQL statement

    Hi,
    Can anyone see why I am getting this error message for my SQL query?
    WITH SKU_DATA AS (
    SELECT /*+ MATERIALIZE */ DISTINCT FROM_LOC_ID,
               SKU_ID,
               DESCRIPTION,
               UPDATE_QTY,
            ORDER_ID,
            CONSIGNMENT,
               WEIGHT,
            PALLET_ID,
            CASE 
        WHEN Upd_Qty_Ratio < 1
        THEN TO_CHAR(UPDATE_QTY) || 'U'
        WHEN TRUNC(Upd_Qty_Ratio) = Upd_Qty_Ratio
        THEN TO_CHAR(Upd_Qty_Ratio) || 'C'
        ELSE TO_CHAR(TRUNC(UPDATE_QTY)) || 'C' || ' ' || TO_CHAR(ROUND(MOD(Upd_Qty_Ratio, 1) *  USER_DEF_NUM_3, 6)) || 'U'
        END CU_Sum
        FROM (
      SELECT DISTINCT
             FROM_LOC_ID,
          S.SKU_ID,
             S.DESCRIPTION,
             ITL.UPDATE_QTY,
             S.USER_DEF_NUM_3,
          OH.ORDER_ID,
          ITL.CONSIGNMENT,
          ITL.PALLET_ID,
             NVL(ITL.UPDATE_QTY,0)*NVL(S.EACH_WEIGHT,0) Weight,
             ITL.UPDATE_QTY/(CASE S.USER_DEF_NUM_3 WHEN 0 THEN 1 ELSE S.USER_DEF_NUM_3 END) Upd_Qty_Ratio
        FROM INVENTORY_TRANSACTION ITL, SKU S, LOCATION L, ORDER_HEADER OH
        WHERE ITL.SKU_ID = S.SKU_ID
        AND ITL.CODE = 'Pick'
        AND ITL.CONSIGNMENT = $P{Consignment}
        AND OH.ORDER_DATE = TO_CHAR($P{Date}, 'DD-Mon-YYYY')
        AND OH.ORDER_ID = ITL.REFERENCE_ID
        AND ITL.TO_LOC_ID = 'CONTAINER'))
    SELECT DISTINCT ORDER_ID, CONSIGNMENT, WEIGHT, PALLET_ID, CU_Sum,
    (SELECT NVL(TO_CHAR(SUM(CASE WHEN NULLIF(SUBSTR(Cu_Sum, -1), 'U') IS NULL THEN NULL ELSE REPLACE(Cu_Sum,'C',NULL) END)),'0') ||'C' || ' ' || NVL(TO_CHAR(SUM(CASE WHEN NULLIF(SUBSTR(Cu_Sum, -1), 'C') IS NULL THEN NULL ELSE REPLACE(Cu_Sum,'U',NULL) END)),'0') ||'U' FROM SKU_DATA) AS Total_Cu_Sum
    FROM SKU_DATAThanks in advance.
    SM.

    Hi Sean,
    It is saying error executing SQL statement, but with no "ORA error" so maybe its a Jasper Reports error i'm not too sure.
    And this is a different version of the one we done together, that one is running fine just having problems putting the jasper file on to the server. I'm just using the main bits from the original SQL.
    SM

  • DDL Statements in a Stored Procedure

    Is there some technique which can be used to execute DDL statements in a stored procedure? I want to drop and recreate a table and a number of indexes. Is there a way for me to do this within a stored procedure?
    Thanks in advance for your assistance!!!

    BEGIN
       EXECUTE IMMEDIATE 'CREATE TABLE bonus (id NUMBER, amt NUMBER)';
    END;http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96624/13_elems18.htm#33889

Maybe you are looking for

  • Some websites do not display properly. I am getting overlapping of menu's. This does not happen with IE. What am I doing wrong?

    I log on to the same wesite on Mozilla and IE. On mozilla the left hand menu overlaps one over the other but the same does not occur with IE, I ask this as I prefer mozilla. Do I need to change any configuration setting. I have a Dell Studio Laptop w

  • Copy and Paste files in Bridge ...

    Hi, I think this is a bug - but may be I'm wrong and I only did not find the right option right now, but: if I select a photo in Bridge and copy it (Edit->Copy or CTRL+C) and want to paste it elsewhere, e.g. in the Windows Explorer, the photo doesn't

  • Since installing Mountain Lion

    Kindle will no longer open on my MacBook Pro.  Also, I need to Force Quit Mail very often.  Is there a fix for these problems?

  • Problem in table(cast(

    i have two collection variables v1_coll and v2_coll(both are of same table type 'tt_coll' and 'rt_coll' is a record type) tt_coll  is table of  rt_coll; v1_coll    tt_coll := tt_coll(); v2_coll    tt_coll := tt_coll(); now i am populating the v1_coll

  • Disable row in LOV or Poplist

    Hi Folks, Is it possible to have a poplist or an LOV with all values listed but some of them grayed out and not accessible !!!! Thanks Pranati