*A join in the primary read function may have caused values to be duplicate

There are two logical services - Emp and Dept with getById function defined in each.
I need to design a solution; where in the user will enter the EmpId and data to update (both emp and dept table)
Structure:
Emp:
Id,Name, DeptId
Dept
Id,Name
Approach followed (Integration Layer)
declare function tns:getData($id as xs:string) as element(ns1:Details)* {
for $EMP in emp:getEmpById($id)
for $DEPT in dep:getDeptById($EMP/DEPTNO)
return
<ns1:Details>
<ns1:Emp> <ns1:Id>{fn:data($EMP/NAME)}</ns1:Id>
</ns1:Emp>
<ns1:Dept> <ns1:Name>{fn:data($DEPT/DNAME)}</ns1:Name>
</ns1:Dept>
</ns1:Details>
Now , when I create the Update Map Procedures; following Error is generated
A join in the primary read function may have caused values to be duplicated in the result. Update function is disabled.
I tired to look upon the internet; got some docs. bt couldnt figure out how to resolve this
Any help is appreciated
Rgds,
Is
Edited by: Is916 on Feb 18, 2010 11:23 PM

The message is telling you that the values of $EMP/NAME will be duplicated (for each $DEPT). And I'm assuming you're going to say "no they are not, since getDeptById(deptNo) returns zero or one $DEPT". But I suspect you haven't indicated that in the signature of getDeptById(deptNo). I suspect the signature looks like getDeptById( ... ) as element( dept )* - the * indicates zero or more. It should be a question mark instead of the start - indicating zero or one. You should also change the signature of getData to indicate it returns element(ns1:Details)? - since it too is going to return exactly zero or 1.
Also - please read the Best Practices announcement in this forum. parameterizing function like getEmpById(id) is not recommended. Just have getEmp() - and if you want "by id" then add a predicate .... for $emp in emp:getEmp() where $emp/ID = $id

Similar Messages

  • Help with the MIDI read function

    Since my last post, I have gotten NI LabVIEW 8.5 and DSP module 2.5.  Using the MIDI read function I was able to get it to read from MIDI-Yoke and plot onto some graphs.
    My problem, however, is that I'm not sure how exactly the MIDI file is being read.  The DSP module update files say that the information is sent as an array of 5 notes.  This is clear to see that it is reading in these 5 values.  When I plot wire the MIDI read to a graph however and/or output through a DSP board, It seems as though I am only getting one of those values.
    Can anyone tell me if I am doing anything wrong or how to get all the values from the MIDI read plotted and outputed.
    Thanks

    Attached is a screenshot of my front panel.
    Yes it seems as the array is being read in through the MIDI read (all 5 values are showing up).  On the graphs, I suppose it would be all five values plotted at once.  This makes sense to me, and what I initially thought.  What made me skeptical of the function was that when I outputted the signal, I didn't hear the same sound as was being inputed.  As I previously mentioned, I could only hear a really high pitched sound, that was the rythm of the particular MIDI file.  It wasn't the original sound.  (I was testing the output.  I would like to add synths, filters, etc. and be able to output this so that the changes can be heard, not just seen on graphs)
    Thanks for the help,
    Joeyio
    Attachments:
    simple_MIDI Read.jpg ‏174 KB

  • The message "A problem has occurred trying to process your request. Please try again later. We apologise for any inconvenience this may have caused." is displyed when I try to log on to my internet banking. Please can you tell me why?

    Since upgrading to the latest version of Firefox, I'm now getting the message "A problem has occurred trying to process your request. Please try again later. We apologise for any inconvenience this may have caused." when I try to log onto my internet banking site. This occurs after going thru the first two steps of the login process. I don't get this problem when I login to all my other bookmarked sites, or when I use Internet Explorer. I'm using Windows XP. Any suggestions? (Note: I've just reloaded version 6 of Firefox, but it's not made any difference.)

    See here  >  http://support.apple.com/kb/HT1527
    From Here  >  http://support.apple.com/kb/TS1368
    More info here  >  http://www.apple.com/support/itunes/downloading/

  • Lotus Notes Mail remotely gives me following "A problem has occurred which may have caused the current operation to fail. A problem has occurred which may have caused the current operation to fail." Works OK with IE9 64bit, IE9 32bit and Google Chrome.

    I get Lotus Notes Mail from the Acton site link to the lotus domino server.
    Works fine in IE9 (32 & 64bit) and with Google Chrone. Google 7 gives the following error:-
    "A problem has occurred which may have caused the current operation to fail."

    Actually, this isn't a cache problem, it's an issue with iNotes and Firefox 4. I found the answer in comments at a similar question. See:
    https://support.mozilla.com/en-US/questions/798271#answer-153202
    I downloaded the Remote XUL Manager add-on for Firefox (https://addons.mozilla.org/en-US/firefox/addon/remote-xul-manager/), restarted FF, went to Tools and scrolled down and clicked on "Remote XUL Manager." I clicked "Add" and pasted the URL for the link where I log-in to Lotus Notes into the dialogue box, and ta-dah! Back to email. Took me longer to type this than fix the problem.

  • Could not write to the file. It may have been opened with insufficient ...

    Cannot add item to keychain with the above error
    Is there a solution?
    An error has occured. Unable to add an item to the current keychain.
    Could not write to the file. It may have been opened with insufficient access privileges

    Is there any more background information that you care to add to help enlighten us?

  • My macbook pro wifi stop working suddenly, and know appears a X on the wifi icon, what may have happened?

    Hello,
    My macbook pro wifi stop working suddenly, and know appears a X on the wifi icon, what may have happened?
    Its seems to be the harware.

    Hello raphaelitajuba,
    The article linked below provides information regarding this indicator and steps that can help restore functionality to your MacBook Pro's Wi-Fi.
    AirPort has detected a problem with the driver or a necessary sub-system component, apply the latest manual AirPort software update or reinstall Mac OS X. If reinstalling Mac OS X does not correct the problem, take your computer to an authorized Apple service center.
    The AirPort status menu (AirPort Menu Extra) FAQ
    http://support.apple.com/kb/HT3821
    Cheers,
    Allen

  • The Webmail version of Lotus knows keep giving the following error message: A problem has occurred which may have caused the current operation to fail. How do I fix this?

    I downloaded the new version of Firefox.
    Now, when I try to access my webmail from Lotus Notes (at https://webmail.WorldVision.org) the following message shows up when trying to preview my inbox.
    "A problem has occurred which may have caused the current operation to fail."

    Actually, this isn't a cache problem, it's an issue with iNotes and Firefox 4. I found the answer in comments at a similar question. See:
    https://support.mozilla.com/en-US/questions/798271#answer-153202
    I downloaded the Remote XUL Manager add-on for Firefox (https://addons.mozilla.org/en-US/firefox/addon/remote-xul-manager/), restarted FF, went to Tools and scrolled down and clicked on "Remote XUL Manager." I clicked "Add" and pasted the URL for the link where I log-in to Lotus Notes into the dialogue box, and ta-dah! Back to email. Took me longer to type this than fix the problem.

  • HT5625 I cannot send a text thru iMessage.  I followed the directions over and over again but can't make it work.  Also how can I find out all the apple ids I may have.

    I cannot send a text thru iMessage.  I followed the directions over and over again but can't make it work.  Also how can I find out all the apple ids I may have.

    A wet phone is out of warranty. This is considered user damage. Even if you were able to get it to start now, the chances of it working for long are slim. I suggest going to Apple and see about an OOW replacement. One for the iPhone 4 is only $149USD and it would come with a short warranty. It is a refurbished device and you would not be worried about encountering additional problems.

  • HT4946 iTunes shows I have an encrypted backup under preferences.   It's got the pad lock. When I click restore the encrypted backup is not an option. I've been test MDM products and may have caused this. How do I restore the encrypted backup.

    iTunes shows I have an encrypted backup under preferences.   It's got the pad lock. When I click restore the encrypted backup is not an option. I've been test MDM products and may have caused this. How do I restore the encrypted backup.

    I just came here today to ask the same question.
    I have an iPod Gen2 with version 4.2.1 iOS, and iTunes 11.0.2.26
    My iPod Touch was running sluggish so I backed up and selected the "Encrypt local backup" to "back up account passwords used on my iPod".
    I selected a password for this backup and restored my iPod Touch.
    When I went to restore from backup, that encrypted backup is not available on the drop down list.
    However, if I go to the top of ITunes and click "Edit", "Preferences" "Device", it shows the back up with the pad lock on it.
    I thought I was being smart backing up with encryption to back up account passwords, but now I have lost everything.
    So many people have the issue where it asks for a password when they never told iTunes to do an encrypted backup and here we are with an encrypted backup, and we know the password, but we don't get the option to restore from it.

  • SharePoint - Error_1_Error occurred in deployment step 'Add Solution': Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was rea

    Hi,
    I am Shanmugavel, SharePoint developer, 
    I am facing the below SharePoint 2013 deployment issue while deploying using VS2012.
    If i will deploy the same wsp or existing wsp
    (last build) using direct powershell deployment, the solution adding properly, but the same timeout exception coming while activation the features.  Please find the below error.
    I tried the below activists:
    1. Restarted my dev server, DB server. 
    2. tried the same solution id different server
    3. tried existing wsp file (last build version)
    4. Deactivated all the features, including project Active deployment configuration.... but still i am facing the same issue.
    I hope this is not coding level issue, because still my code is not start running, before that some problem coming.
    Please help me any one.....  Last two days i am struck because of this...

    What you need to understand is the installation of a WSP does not do much. It just makes sure that you relevant solution files are deployed to the SharePoint farm.
    Next comes the point when you activate the features. It is when the code which you have written to "Activate" certain features for your custom solution.
    Regarding the error you are getting, it typically means that you have more connections (default is I guess 100) open for a SQL database then you are allowed to.
    If you have a custom database and you are opening a connection, make sure you close it as well.
    Look at the similar discussion here:
    The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool
    size was reached[^]
    I would suggest further to look at the
    ULS logs[^] to get better insight.
    Manas Bhardwaj's Stream : www.manasbhardwaj.net

  • The Group Policy Client Side Extension Group Policy Shortcuts may have caused th e Group Policy Service to terminate unexpectedly.

    Hi all,
    Having an issue with the shortcuts Group Policy extension applying to our Windows 7 machines. It was working until last Wednesday and since then users get a Group Policy Client service error when logging in.
    We have narrowed it down to the shortcuts extension, if the extension is disabled then a user can log in, if enabled and empty then the following error comes up. With all the investigation we have done so far it seems as though something on the client is
    making this happen.
    We have –
    Copied the original policy
    Exported and imported the policy
    Deleted all the shortcuts
    Deleted all the shortcuts and created a brand new shortcut
    And the same thing happens. Only if you right click on the Shortcut Extension and select disable then the user can log in
    When running Gpupdate /force we get the following error 
    The Group Policy Client Side Extension Group Policy Shortcuts may have caused the Group Policy Service to terminate unexpectedly. To prevent further failures inthe
    Group Policy Service, this extension has been temporarily disabled until after the next system restart. Group Policy settings managed by this extension may no
    longer be enforced until the system is restarted. The vendor of this extension should be contacted if this issue recurs.
    The Group Policy Client Side Extension Group Policy Internet Settings may have caused the Group Polcy Service to terminate unexpectedly. To prevent further failures
    in the Group Policy Service, this extension has been temporarily disabled until after the next system restart. Group Policy settings managed by this extension
    may no longer be enforced until the system is restarted. The vendor of this extension should be contacted if this issue recurs.
    Has anyone come across this before?
    Thanks

    Hi Dejul,
    How is the issue going? Does this issue happen to all Windows 7 clients? I am not sure this can be helpful but we can give it a try to install the following hotfix.
    Some Group Policy preferences are not applied successfully on computers that are running Windows Vista, Windows Server 2008, Windows 7 or Windows Server 2008 R2
    http://support.microsoft.com/kb/979731
    Besides, please make sure that our clients are patched or updated to the latest.
    An enterprise hotfix rollup is available for Windows 7 SP1 and Windows Server 2008 R2 SP1
    http://support.microsoft.com/kb/2775511
    TechNet Subscriber Support
    If you are TechNet Subscription user and have any feedback on our support quality, please send your feedback here.
    Best regards,
    Frank Shen

  • Strange Comments issue I may have caused, any suggestions?

    Hello, I may have caused a problem on my iWeb blog and hope that someone can offer suggestions.
    What I did was this - my blog page name was Weblog. I changed it to Blog while making other changes to my website. I then published changes. However, when I saw that my changes were still showing in red (website was not updated), I published all and everything went to blue. My site was updated.
    Problem - after doing the above, I noticed that all my entries on the website said "No Comments", even on entries that I know have comments. I went into iWeb and it says the same thing, but when I read the blog entry, the comments are there with the correct count. So I can see the comments in iWeb, but not on the website. Both iWeb and the website show "No Comments" in the blog page and in each entry.
    I later read the Apple troubleshooting note (via a link in this forum) that because the comments are stored on their server, we should not change the folder name. However, I did not change the folder name, did I? Is that the same as changing the page name in iWeb?
    Anyway, I first tested my site by posting a comment in a new entry and it works. However, if I add a comment to an entry that had previous comments, the old comments go away and only the new comment shows. So, I deleted the new comments and quit iWeb without saving. This got me back to where the old comments were still there.
    I decided to change the page name back to Weblog and I republished the entire site, but that did not work. All the entries and blog page still say "No Comments" in both iWeb and on my site, even though the comments can be seen in iWeb.
    If anyone has any suggestions for getting the website to show the counts, and for the website to show the counts and the comments, I would appreciate it. It was always working well before, I shouldn't have changed the page name, and then change it back, but I didn't think that would do any harm.
    BTW, this was my first use and publishing on iWeb since updating to OS 10.5.7 late last week, so not sure if that had anything to do with it. I am also on a new iMac after migrating yesterday, hope that doesn't add to the issue.
    Thanks in advance for your help. I have always been able to resolve issues with help from the users here, but I fear that I may have caused a doozy.
    Santiago
    link to my website blog if it helps --> http://web.me.com/sabretado/sabretado/Weblog/Weblog.html
    The last entry that I know had comments was the one about the World Baseball Classic on March 22, 2009. I looked at the source but don't see any of the comments showing, just something about the Comments widget. Thanks.

    Santiago ~ The "Fix iWeb" section here has some suggestions:
    http://www.iwebformusicians.com/WebMusic/iWebTips.html
    And MobileMe live chat support is now 24/7 — see this announcement. Other Apple support options are here.
    Problems with iWeb's blog and comments feature are a recurring theme in these discussions. You may want to consider a dedicated, more robust blogging system such as:
    http://www.posterous.com/faq
    http://support.wordpress.com/getting-started

  • I bought an ipad a few days before I went on holiday. On my return some weeks later I found my BT broadband had peaked astronomically. It had quadrupled my normal monthly usage. I hardly used it for wifi whilst there. Any ideas what may have caused it?

    Any ideas what may have caused it? 

    Thank you again....Not having a clue what WEP is, I've done a little research. I have a BT Home Hub 3 which apparently by default uses WPA.  BT have suggested I turn my hub off for 24 hours for them to monitor. However on returning home my February usage has gone back down again to it's average usage, so I think it's unlikely we'll learn a great deal. I am convinced the huge peak was caused somehow by my limited use of the ipad whilst we were abroad. I've been trying to get to the bottom of it, so that it doesn't happen again next time we go abroad.
    For interest the ipad doesn't have we fi plus cellular.
    The new BT Home Hub uses WPA (Wi-Fi Protected Access) encryption by default to protect the data that moves across the radio waves from it to other wireless devices. Many wireless devices sold today offer this more secure method of protection. WEP (Wireless Equivalent Privacy) is an older, less secure way of protecting such data. The BT Home Hub and BT Home Hub 1.5 both use WEP encryption by default since some older wireless devices are not compatible with stronger encryption types, such as WPA.

  • Problem in universe while joining as the primary key is NUMBER

    Hi,
    I'm trying to join TEST.SUMMARY.NUMBER to TEST.RESPONSE.FOREIGN_KEY. The problem arises from the first of these, as the primary key is in a column NUMBER. Stupid? Definitely. Rename? Not an option.
    I think NUMBER is seen as a magic word (type), and once parsing (for example in "edit join", I get the message "Exception: DBD, ORA-01747: invalid user.table.column, table.column, or column specification State: N/A" .
    Normally putting " around the word would do the trick ("NUMBER"), but is seems universe designer removes those during the parsing (?). I come to this conclusion, because if I choose the join line from the graphical menu, and then write to the function line TEST.SUMMARY."NUMBER"=TEST.RESPONSE.FOREIGN_KEY (and press enter), the " are removed. (To get the NUMBER's to the report is good, though, by creating a variable with TEST.SUMMARY."NUMBER")
    The database is oracle, and universe is on BusinessObjecs XI 3.1.  I've tried to join in the edit join, create a derived table and use ANSI92. No good so far. I also tried to join the fields on report (WebI), but the result was always too many or not enough data from one of the tables. Merging dimensions leads to other problems. I was checking on JOIN_BY_SQL as well as PARSE_SELECT_IN_JOIN in universe parameters, but at glance I didn't find how to solve this with them.
    Any ways to force the join, or achieve the data from the both tables in one report table otherwise?

    Well, I managed to sort this out somehow by using custom SQL in the Web Intelligence report, and joining the tables there with
    LEFT JOIN TEST.RESPONSE
    ON TEST.SUMMARY."NUMBER"=TEST.RESPONSE.FOREIGN_KEY
    Smells like duck tape, but it's  working at least somehow. I guess the custom SQL is passed to some lower level, and so the universe-automatic-whatever doesn't handle it in the fly.
    Any other ideas?

  • Working with Binary data from the Gpib Read Function

    I m using the gpib read command to recieve data from a gpib instrument. I already know the form of the binary data being sent back. I have programmed it in matlab before. I am haveing trouble parseing out the binary data I recieve. the basic form of the data is
    #I immediately followed by 401 64 bit ieee floating point numbers. When I programmed this in matlab the code I used was of the form:
    [a,count,msg]=fread(g2,2,'int8');
    [a,count,msg]=fread(g2,401,'float64');
    for those that don't know matlab code the command reads data from the instrument pointed to by the g2 handle. the number after the g2 above speicifies the number of values to read. And the last part the string in qoute specifies the way the binary data
    is to be interepeted. the output arguments a count and msg are
    a-your data
    count-number of items succesfully read in
    msg-error message
    In the above two lines I use the variable a twice to capture the data. The first time a is set equal to '#I' everything inside the qoutes. The second time a is set equal to the actual data, in this case 401 64bit floating point numbers. I m convince that the flatten to string and unflatten from string function are the set meant to accomplish this task. But I haven't been able to find a good example of how to use these functions. Especially with an array.
    Can some one please help me?
    Thanks
    Scourched

    I'm pretty sure what you're describing is a simple typecast in LabVIEW. You will want to strip off the #I first, using string manipulation functions. Then, you can wire the string into a "typecast" VI, and wire a double precision float constant to the top connector of the typecast (this tells the VI that you expect a 64 bit float output) and then you can read your resulting array of double precision floats on the output of the typecast. The typecast VI is found in All Functions >> Advanced >> Data Manipulation.
    I've attached an example in LabVIEW 7.0 and also 7.1 format.
    Scott B.
    Applications Engineer
    National Instruments
    Attachments:
    typecast.vi ‏11 KB
    typecast.vi ‏13 KB

Maybe you are looking for