Finding "non-existent" records

I am having trouble trying to find instances where certain records do not exist.
For example, there is content assigned to a user that has a due date. If the user views the content they get a record in a table (assignment_tracker) with the date/time of when they access it, a status plus some other information as they continue on. If the user has never viewed the content they have no record in the database but they do have an associated assignment in the assignments table.
Tables:
========
users (pk)
assignments (pk, fk users)
assignment_tracker (fk assignments)
If dealing with a specific user, it's not an issue but where the problem occurs is when trying to get a list of users that have not completed the assignment.
In order to determine if the assignment is completed it has to either:
1. have a record in the tracking table with a "completed" status in the status field of the assignment_tracker
OR
2. NOT have a record at all in the assignment_tracker table
So, if they have a non-completed status in the assignment_tracker table OR if they have no record in the assignment_tracker table I want to list that group of users.
I tried to be as general as possible in explaining this, hoping that someone has faced a similar situation and can point me in the right direction. If more information is needed let me know.
Thanks!

Here is a more detailed schema;
users (user information)
userid (pk)
firstname
lastname
etc....
courses (course information)
course_id (pk)
course_name
course_user (course membership)
userid (fk)
courseid (fk)
assignments (course assignments)
assignmentid (pk)
course_id (fk)
start_date
end_date
assignment_tracker (tracking of assignment status by user)
assignmentid (fk)
userid (fk)
status
It is possible for a particular student to have records in the assignment_tracker table for some assignments that are either in-progress or completed. These assignments are overdue (when end_date from assignments is past and the status is not "complete". These are easy to find obviously.
But for the same student(s) to find ones that have overdue assignments (from the assignments table) that have not been started at all is where the problem is.
users
userid           firstname        lastname
10 Joe Smith
20 Jane Doe
courses
course_id        course_name
1 Intro to computers
course_user
course_id       userid
1 10
1 20
assignments
assignmentid           courseid            start_date           end_date
1 1 10-DEC-08 14-JAN-09
2 1 01-DEC-08 14-JAN-09
assignment_tracker
assignmentid            userid           status
1 10 completed
2 10 in-progress
So using the above data, both userids should be returning back, 10 because of the in-progress assignment and 20 because of the non-existence in the assignment_tracker table.

Similar Messages

  • CG02BD - Buffer Error, updating non existent record - Need your attention

    Hi Gurus,
    This is regarding transaction code CG02BD buffer error which I am getting while updating Identifier info.
    CG02BD - Edit Specification
    I am getting error "Error in Buffer: update of non existing record" for Num ID category only in case of Customer and Vendor.
    Could any one guide me to correct/rectify this one please.
    << removed >>
    Thanks !
    Madan
    Edited by: Rob Burbank on Sep 22, 2010 11:35 AM

    Can you please let us know the solution for the same.? We are facing the similer issue for one of the user and getting the same error.

  • Can't delete or find non existing files in Errors tab and in/out palette

    I have two files (findlaw.html and cyrites.html) that no longer are in use that I want to trash.
    When I trash either of the files, I  get 5 Missing Files in the Error Tab that are supposedly linked to these two files I want to trash.
    I've gone through the site many times and can't find these missing files.
    I have back up copies of the 2 files I want to trash and when I put them back in the site, the missing files are no longer in the Missing Tab.
    When I use the In and Out palette and select either findlaw.html or cyrites.html, sure enough the files that end up in the Missing tab are indicated as being linked to these two files.
    from within the In/Out palatte, showing one of the files I want to trash, and showing the 5 files linked to it, if I mouse over any of these 5 files I get the path where they supposedly
    are hidding out, but when I go to the folders they are supposed living in, they are not there.
    Also when mousing over these files it says: template.html (Void) - that's one of the real names of the missing 5 files.
    I've tried doing: Site > Update > Refresh All  - but this doesn't break the connection of the missing 5 files to the 2 pages I want to trash.
    Any ideas?

    You can make a completely new library from these directions
    http://docs.info.apple.com/article.html?path=iTunesWin/8.1/en/15502.html
    You have to press AND HOLD the shift key.
    As for why some songs won't re-add to itunes, maybe the MP3 headers are causing it. iTunes 7 and later has gotten really picky about them. Here's a good web link on that:
    http://trevinchow.com/blog/tag/mp3-tag-validator/

  • Count weeks backwards and passing the breakpoint between 2014/2015. Code finds non existing week numbers

    Hi
    I've tried to figure out where I've gone wrong here. I've tried to make an application to keep track of time spent in different Projects and activities within them. I want the user to quickly to have access to the last 6 weeks in a Combobox. I haven't quite
    got it yet since my code finds week 53 last year (2014) and dissregards week 1 (2015).
    I'll state right away I'm not an experienced VB programer so maybe I've missed something trivial.
    Thanks in advance
    //Tony
    Public
    SubWeeknumber()
    DimmyCI
    AsNewCultureInfo("sv-SE")
    Dimdfi
    AsDateTimeFormatInfo=
    DateTimeFormatInfo.CurrentInfo
    Dimcal
    AsCalendar=
    myCI.Calendar
    DimcurrentTime
    AsSystem.DateTime=
    System.DateTime.Now
    Dimdate1
    AsDate=
    currentTime.Date
    Dimweek
    AsInteger=
    cal.GetWeekOfYear(date1, myCI.DateTimeFormat.CalendarWeekRule, myCI.DateTimeFormat.FirstDayOfWeek)
    Dimweekcounter
    AsInteger
            weekcounter = -5
    '*********************Does not work properly, claims there is a week 53 2014, which there is not. Skips week 1 for some
    reason
    Whileweekcounter <= 0
    Dimnumber_of_weeks_back
    AsInteger
    Dimlast_week
    AsSystem.DateTime=
    currentTime.Date.AddDays(number_of_weeks_back)
    Dimprevious_week
    AsInteger=
    cal.GetWeekOfYear(last_week, myCI.DateTimeFormat.CalendarWeekRule, myCI.DateTimeFormat.FirstDayOfWeek)
                ComboBox_week.Items.Add(
    String.Format("{0}",
    previous_week))
                weekcounter = weekcounter + 1
                number_of_weeks_back = number_of_weeks_back - 7
    EndWhile

    The thing is that the GetWeekOfYear method returns the week of the year of the date you pass in, i.e. when you pass in 2014-12-29 it will return 53 instead of 1.
    How to determine the number of the week is varies between different countries. In Sweden (sv-SE) and most other European countries, the ISO-8601 standard is used:
    http://sv.wikipedia.org/wiki/Veckonummer
    Then week 1 of a year is per defintion the week that contains the 4th day of January. You will have to write some code to determine this yourself since there is a slight difference between ISO-8601 week and .NET's week numbering:
    http://stackoverflow.com/questions/11154673/get-the-correct-week-number-of-a-given-date
    Here is an example for you that should work:
    Public Sub Weeknumber()
    Dim myCI As New CultureInfo("sv-SE")
    Dim dfi As DateTimeFormatInfo = DateTimeFormatInfo.CurrentInfo
    Dim cal As Calendar = myCI.Calendar
    Dim currentTime As System.DateTime = System.DateTime.Now
    Dim date1 As Date = currentTime.Date
    Dim currentWeek As Integer = cal.GetWeekOfYear(date1, myCI.DateTimeFormat.CalendarWeekRule, myCI.DateTimeFormat.FirstDayOfWeek)
    Dim diff As Integer = date1.DayOfWeek - myCI.DateTimeFormat.FirstDayOfWeek
    If (diff < 0) Then
    diff += 7
    End If
    Dim startOfCurrentWeek As DateTime = date1.AddDays(-1 * diff).Date
    For i As Integer = 0 To 5
    Dim startOfWeek As DateTime = startOfCurrentWeek.AddDays(-i * 7)
    Dim endOfWeek As DateTime = startOfWeek.AddDays(6)
    Dim week As Integer = cal.GetWeekOfYear(startOfWeek, myCI.DateTimeFormat.CalendarWeekRule, myCI.DateTimeFormat.FirstDayOfWeek)
    If Not startOfWeek.Year.Equals(endOfWeek.Year) And endOfWeek.Day >= 4 Then
    week = 1
    End If
    ComboBox_week.Items.Add(String.Format("{0}", week))
    Next
    End Sub
    Please remember to mark helpful posts as answer to close your threads.

  • How to find if certain record exists from stored procedure

    Hello
    I am not an expert in this and am trying simple thing. I want to find if certain record exists in a table and if so set some boolean variable.
    create or replace procedure findit(param)
    AS
    return_group boolean;
    BEGIN
      myflag := false;
    --here goes my question
    -- say I have SELECT WHATEVER FROM TABLE WHERE BLA = param
    --if it returns at least one record set myflag to true;
    END;Any idea?

    THanks Satyaki_De,
    However, when I put simple SELECT statement in the body of my procedure it does not compile. Actually I should have said that before. So here is my code and where it breaks:
    create or replace procedure close_subjects(study_id varchar2)
    AS
    return_group boolean;
    BEGIN
    dbms_output.enable(1000000);
    FOR current_group IN(
       SELECT DISTINCT group_id from groups WHERE study_id=study_id
    ) LOOP
       FOR current_subject IN(
          SELECT individual_id from groups WHERE group_id=current_group.group_id AND study_id=study_id
       ) LOOP
          return_group := true;
          SELECT INDIVIDUAL_ID FROM ASSIGN WHERE DATE_TIME_ASSIGNED = ( SELECT MAX(DATE_TIME_ASSIGNED) FROM ASSIGN WHERE INDIVIDUAL_ID = current_subject.individual_id ) AND                            ASSIGN_STATUS_ID = 'A';
         IF SQL%RowCount = 0 THEN
           return_group := false;
             dbms_output.put_line(current_subject.individual_id);
          END IF;
       END LOOP;
    END LOOP;
    END;
    /If I comment out SELECT statement and leave dbms_output for testing purposes it works well. As I said I am faaaar from expert and seems to me that I cannot have SELECT in procedure BODY?

  • My iPhone 5S prompts me for my password to an Apple ID email that no longer exists as an account.  How do I change my Apple ID address without having to change the primary address to a non-existent email account?

    I cannot sign into icloud on my phone because the Apple ID is an email account that has been deactivated and deleted.  How can I change my Apple ID without having to change the primary email address to this non-existent account? If I did so, I wouldn't be able to access the account to receive the verification email. Please help!

    To change the iCloud ID you have to go to Settings>iCloud, tap Delete Account, provide the password for the old ID when prompted to turn off Find My iDevice, then sign back in with the ID you wish to use.  When you do this you may find that the password for your old ID isn't accepted.  If this should happen, and if your old ID is an earlier version of your current ID, you need to temporarily recreate your old ID by going to https://appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID.  Click edit next to the primary email account, change it back to your old email address and save the change.  Then edit the name of the account to change it back to your old email address.  You should not need to verify the old email address.  You can now use your current password to turn off Find My iDevice on your device, even though it prompts you for the password for your old account ID. Then save any photo stream photos that you wish to keep to your camera roll.  When finished go to Settings>iCloud, tap Delete Account and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud).  Next, go back to https://appleid.apple.com and change your primary email address and iCloud ID name back to the way it was.  Now you can go to Settings>iCloud and sign in with your current iCloud ID and password.

  • How to only update existing records when loading master data ?

    Hello experts, I need your lights one more time.
    Here is my need :
    I have created an infoobject (IO) which is a very simple version of 0material, let's call it Znewmat --> Znewmat has material type and trademark as attributes, those two fields are available in 2 different datasources :
    - 0MATERIAL_ATTR for material type (field MTART)
    - 0MAT_SALES_ATTR for trademark (field MVGR2)
    When loading my new IO from 0MATERIAL_ATTR I use a filter (at DTP level) to get only a few material types (I get something like 1000 records),
    here is my issue : when I load from 0MAT_SALES_ATTR the field "material type" is not available to keep the same filter as for 0MATERIAL_ATTR and existing records are updated with the trademark, but I also get 5000 records I don't need, and my master data is "polluated" with useless lines.
    *and my question : is there a way while performing the second loading to ONLY UPDATE EXISTING RECORDS AND NOT ADD ANY
    NEW RECORDS ? (i didn't find anything in main options of my DTP)*
    (I'd like to avoid the solution to update the 0MAT_SALES_ATTR datasource to add the missing field)
    Thanks in advance for any help, points will be distributed.
    Guillaume P.
    Still no idea ?

    in the start routine of transformation from 0MAT_SALES_ATTR to znewmat do the following:
    select materials from /BIC/PZNEWMAT into i_mat
    for all entries in source_package where material eq source_package-material.
    loop at source_package.
    p_ind = sy-tabix.
    read table i_mat with key material = source_package-material.
    if sy-subrc ne 0.
    delete i_mat index p_ind.
    endif.
    this way you'll only update records that have previously been loaded by 0MATERIAL_ATTR DS
    loading sequence:
    first load ZNEWMAT from 0MATERIAL_ATTR. then activate ZNEWMAT. then load 0MAT_SALES_ATTR to ZNEWMAT.
    M.

  • How can we do the validation for non visible records in table control.

    Hi Experts,
      I have a table control which displays list of material details. I have a button to upload the material details from excel file to table control directly. I have to validate all the customers which are exist in the table. But my item (Material) table control displays only 5 rows i.e only 5 entries are visible in module pool screen. The validation is done for 5 records only in PAI event, but i need to do validation for rest of the records too (Which are not visible on items table), if validation fails then needs to display error message.
      How can we do the validation for non visible records in table control.
    Regards,
    Bujji

    Hi,
    try validating material before displaying it in table control...'
    Rgds/Abhhi

  • Unregistering a non-existing db

    hi,
    found two entries for the same database in the catalog
    SQL> select dbid, dbinc_key, name from rc_database where name='PROD1';
    DBID DBINC_KEY NAME
    3817268314 45902 PROD1
    3844414535 431892 PROD1
    i have tried to unregister the non-existing dbid but only encountered this error:
    RMAN> run
    2> {
    3> SET DBID 3817268314;
    4> UNREGISTER DATABASE "PROD1" NOPROMPT;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01005: syntax error: found "identifier": expecting one of: "allocate, alter
    , backup, beginline, blockrecover, catalog, change, copy, crosscheck, configure,
    duplicate, debug, delete, execute, endinline, host, mount, open, plsql, recover
    , release, replicate, report, restore, resync, }, set, setlimit, sql, switch, st
    artup, shutdown, send, show, validate"
    RMAN-01008: the bad identifier was: UNREGISTER
    RMAN-01007: at line 4 column 1 file: standard input
    would it be safe to simply delete this entry from the rc_database table?
    thank you..

    1) Identify the database that you want to unregister. Run the following query from the recovery catalog using Server Manager or SQL*Plus (connected as the RMAN user):
    SQL> select * from rc_database;
        DB_KEY  DBINC_KEY       DBID NAME     RESETLOGS_CHANGE# RESETLOGS
             1          2 2498101982 TARGDB                   1 15-JAN-04
           105        106 2457750772 OIDDB                    1 14-DEC-03
           128        129 2351019032 OMSDB                    1 15-JAN-04
           301        302 2498937635 TARGDB              140831 25-JAN-042) Remove the backupsets that belong to the database that you want to unregister.
    Find the backupsets of the database that you want to unregister.
    list backupset of database;3) if possible, remove the backupsets that belongs only to the database you want to unregister.
    RMAN> allocate channel for delete type 'sbt_tape';4) Unregister the database by executing the following procedure from the recovery catalog:
    execute dbms_rcvcat.unregisterdatabase(db_key, db_id)
    SQL> execute dbms_rcvcat.unregisterdatabase(1, 2498101982)
    PL/SQL procedure successfully completed.
    SQL> execute dbms_rcvcat.unregisterdatabase(105, 2457750772)
    PL/SQL procedure successfully completed.
    SQL> execute dbms_rcvcat.unregisterdatabase(128, 2351019032)
    PL/SQL procedure successfully completed.
    SQL> execute dbms_rcvcat.unregisterdatabase(301, 2498937635)
    PL/SQL procedure successfully completed.Hope this will help...

  • Changed my Apple ID email, but ICloud does not recognize my new login, only my old one (which is now non-existent) HELP!

    Changed my Apple ID email, but ICloud does not recognize my new login, only my old one (which is now non-existent) and requires the password to do anything. Everytime I go onto the ICloud  page it shows my old email and requires the password, but I can't exactly type in a password because that won't work. I can't find a way to change my email or delete ICloud.

    If the old ID is an earlier version of your current ID, do the following:
    Make sure you are signed into iMessage and FaceTime with your current ID.  If they are signed into the old ID, go to Settings>Messages>Send & Receive and Settings>FaceTime, tap the ID, sign out, then sign back in with your current ID.
    Then temporarily recreate the old ID by going to https://appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID.  Click edit next to the primary email account, change it back to your old email address and save the change.  (You should not have to verify the old email account so it doesn’t matter if you no longer have access to it.)  Now go to Settings>iCloud, turn off Find My iDevice and enter your current password when prompted (even though it prompts you for the password for your old ID).  Then go to Settings>iCloud, tap Sign Out (or Delete Account if you are not running iOS 8) and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud).  Next, go back to https://appleid.apple.com and change your primary email address back to the way it was.  Now you can go to Settings>iCloud and sign back in with your current iCloud ID and password (your data will download back to your device).

  • ORA-22285 - non-existent directory or file for FILEOPEN operation

    Hello
    I want to insert the xmldata from a xmlfile to the a table, with this scirpt:
    #!/bin/sh
    set -x
    for i in `find . -name "dspevent*.xml"| awk -F"/" '{print $NF}'`
    do
    echo $i
    fname_old=$i
    fname_neu=`ls $i | awk '{print "OK_"$0}'`
    cat $i | sed 's/aps://g' >$fname_neu
    echo $fname_neu
    rm $i
    #insert_xml $fname_neu
    INSERT_XML=`sqlplus -s username/passwort@database <<EOF
    INSERT INTO event_xml (name,
    dtsysl,
    hrsysl,
    dtcptl,
    nusesi,
    dsp_step,
    dsp_state,
    bat_class,
    bat_program,
    bat_seqi,
    bat_state)
    SELECT *
    FROM XMLTABLE (
    'Operations/Event'
    PASSING xmltype (BFILENAME ('EVENT_DIR', '$fname_neu'),
    NLS_CHARSET_ID ('CHAR_CS'))
    COLUMNS name VARCHAR (40) PATH 'name',
    dtsysl DATE PATH 'dtsysl',
    hrsysl NUMBER PATH 'hrsysl',
    dtcptl DATE PATH 'dtcptl',
    nusesi NUMBER PATH 'nusesi',
    dsp_step VARCHAR (40) PATH 'DSP/step',
    dsp_state VARCHAR (40) PATH 'DSP/state',
    bat_class VARCHAR (40) PATH 'BAT/class',
    bat_program VARCHAR (40) PATH 'BAT/program',
    bat_seqi NUMBER PATH 'BAT/seqi',
    bat_state VARCHAR (40) PATH 'BAT/state');
    EOF
    `
    done
    But the problem is, that I have always this error message:
    ORA-22285 -> non-existent directory or file for FILEOPEN operation
    I'd create a direcotrie and over utl_file.fopen I can write a file to this directorie, but this works over the path, not over the directory name. the utl_file_dir parameter was also set to the correct path. Whats wrong or how can I debug this problem?
    thanks.
    roger

    - the name of the directory is correct.
    - how can I check, that the user can use the directory?
    - in this logfile you can see that, the file name will replace correctly:
    ./dspevent.sh
    + awk -F/ {print $NF}
    + find . -name dspevent*.xml
    + echo dspevent_db_20110503030448_10641.xml
    dspevent_db_20110503030448_10641.xml
    fname_old=dspevent_db_20110503030448_10641.xml
    + awk {print "OK_"$0}
    + ls dspevent_db_20110503030448_10641.xml
    fname_neu=OK_dspevent_db_20110503030448_10641.xml
    + sed s/aps://g
    + cat dspevent_db_20110503030448_10641.xml
    + echo OK_dspevent_db_20110503030448_10641.xml
    OK_dspevent_db_20110503030448_10641.xml
    + rm dspevent_db_20110503030448_10641.xml
    + sqlplus -s username/passwort@db
    INSERT INTO event_xml (name,
    dtsysl,
    hrsysl,
    dtcptl,
    nusesi,
    dsp_step,
    dsp_state,
    bat_class,
    bat_program,
    bat_seqi,
    bat_state)
    SELECT *
    FROM XMLTABLE (
    'Operations/Event'
    PASSING xmltype (BFILENAME ('EVENT_DIR', 'OK_dspevent_db_20110503030448_10641.xml'),
    NLS_CHARSET_ID ('CHAR_CS'))
    COLUMNS name VARCHAR (40) PATH 'name',
    dtsysl DATE PATH 'dtsysl',
    hrsysl NUMBER PATH 'hrsysl',
    dtcptl DATE PATH 'dtcptl',
    nusesi NUMBER PATH 'nusesi',
    dsp_step VARCHAR (40) PATH 'DSP/step',
    dsp_state VARCHAR (40) PATH 'DSP/state',
    bat_class VARCHAR (40) PATH 'BAT/class',
    bat_program VARCHAR (40) PATH 'BAT/program',
    bat_seqi NUMBER PATH 'BAT/seqi',
    bat_state VARCHAR (40) PATH 'BAT/state');
    INSERT_XML= PASSING xmltype (BFILENAME ('EVENT_DIR', 'OK_dspevent_db_20110503030448_10641.xml'),
    ERROR at line 15:
    ORA-22285: non-existent directory or file for FILEOPEN operation
    ORA-06512: at "SYS.XMLTYPE", line 296
    ORA-06512: at line 1
    + echo dspevent_db_20110502190712_10641.xml
    dspevent_db_20110502190712_10641.xml

  • HT2534 i follow these steps.. but i cant find "None" option in the payment Method...

    cant find "None" option in the payement methods..please help..

    Did you follow the instructions on that page exactly when creating the account (the instructions won't work with existing accounts) ? I've just tried it and I get the 'none' option i.e. I logged out of my account and found a free app in the store and clicked on its free 'price' :
    And on the popup that you then get I clicked on 'create Apple id' :
    Which then gave me the 'none' option :

  • How to delete iCloud account, with non-existing email as ID, on iPad?

    Cannot delete iCloud account (which happens to have a non-existing ID) on iPad in order to have same account as on iPhone - keep trying using current Apple ID and PW but to no avail - iCloud settings continue to insist that Apple ID/PW is wrong but they are the ones I have in "manage my ID"???

    If the ID is your the iPad is signed into is your old ID, and if your new ID was created by editing the details of this old ID (rather than being an entirely new ID), go to https://appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID.  Click edit next to the primary email account, change it back to your old email address and save the change.  Then edit the name of the account to change it back to your old email address.  You can now use your current password to turn off Find My iPad on your device, even though it prompts you for the password for your old account ID. Then save any photo stream photos that you wish to keep to your camera roll.  Then go to Settings>iCloud, tap Delete Account and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud).  Next, go back to https://appleid.apple.com and change your primary email address and iCloud ID name back to the way it was.  Now you can go to Settings>iCloud and sign in with your current iCloud ID and password.

  • KM transport error: ALL paths that were specified refer to non-existent

    I have a folder /root/company.
    I am trying to transport this company folder to my QA system.
    I created a KMC file. I followed the instructions in below link.
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/46/77da3bb8036ef0e10000000a1553f6/frameset.htm
    IT throws an error during import. All paths that were specified refer to non-existent or read-only repositories.
    Can anyone please suggest, what am I missing? Do I have to create any repositories on QA system. IF so, please suggest me how to do it?.
    We are ussing EP 7.0 portal
    Thanks,
    Raj

    As per my understanding you have created KMC file for folder "company" which is inside "root".
    Can you confirm if company folder exist in QA environment?? if it dosenot exist then create repository by performing following steps:
    1. Go to System Administration --> System Configuration --> Knowledge Management --> Content Management --> Repository Manager --> File system Repository OR CM Repository (as per your requirement)
    2. You can find whether you have to create Repository inside File System Repository OR CM Repository by looking into your test or developement environment by going into the path mentioned in step 1. Copy all the properties of the Company repository from test or dev environment.
    3. Now inside one of the repository(File System Repository OR CM Repository) you can create one repository with name Company.
    4. To create Company repository you will find the option "NEW" inside the above mentioned path and on clicking on the same, fill all the properties (take help of the properties you have copied in step 2).
    And now try to upload the KMC file.

  • Importing and Updating Non-Duplicate Records from 2 Tables

    I need some help with the code to import data from one table
    into another if it is not a duplicate or if a record has changed.
    I have 2 tables, Members and NetNews. I want to check NetNews
    and import non-duplicate records from Members into NetNews and
    update an email address in NetNews if it has changed in Members. I
    figured it could be as simple as checking Members.MembersNumber and
    Members.Email against the existance of NetNews.Email and
    Members.MemberNumber and if a record in NetNews does not exist,
    create it and if the email address in Members.email has changed,
    update it in NetNews.Email.
    Here is what I have from all of the suggestions received from
    another category last year. It is not complete, but I am stuck on
    the solution. Can someone please help me get this code working?
    Thanks!
    <cfquery datasource="#application.dsrepl#"
    name="qryMember">
    SELECT distinct Email,FirstName,LastName,MemberNumber
    FROM members
    WHERE memberstanding <= 2 AND email IS NOT NULL AND email
    <> ' '
    </cfquery>
    <cfquery datasource="#application.ds#"
    name="newsMember">
    SELECT distinct MemberNumber
    FROM NetNews
    </cfquery>
    <cfif
    not(listfindnocase(valuelist(newsMember.MemberNumber),qryMember.MemberNumber)
    AND isnumeric(qryMember.MemberNumber))>
    insert into NetNews (Email_address, First_Name, Last_Name,
    MemberNumber)
    values ('#trim(qryMember.Email)#',
    '#trim(qryMember.FirstName)#', '#trim(qryMember.LastName)#', '#
    trim(qryMember.MemberNumber)#')-
    </cfif>
    </cfloop>
    </cfquery>
    ------------------

    Dan,
    My DBA doesn't have the experience to help with a VIEW. Did I
    mention that these are 2 separate databases on different servers?
    This project is over a year old now and it really needs to get
    finished so I thought the import would be the easiest way to go.
    Thanks to your help, it is almost working.
    I added some additional code to check for a changed email
    address and update the NetNews database. It runs without error, but
    I don't have a way to test it right now. Can you please look at the
    code and see if it looks OK?
    I am also still getting an error on line 10 after the routine
    runs. The line that has this code: "and membernumber not in
    (<cfqueryparam list="yes"
    value="#valuelist(newsmember.membernumber)#
    cfsqltype="cf_sql_integer">)" even with the cfif that Phil
    suggested.
    <cfquery datasource="#application.ds#"
    name="newsMember">
    SELECT distinct MemberNumber, Email_Address
    FROM NetNewsTest
    </cfquery>
    <cfquery datasource="#application.dsrepl#"
    name="qryMember">
    SELECT distinct Email,FirstName,LastName,MemberNumber
    FROM members
    WHERE memberstanding <= 2 AND email IS NOT NULL AND email
    <> ' '
    and membernumber not in (<cfqueryparam list="yes"
    value="#valuelist(newsmember.membernumber)#"
    cfsqltype="cf_sql_integer">)
    </cfquery>
    <CFIF qryMember.recordcount NEQ 0>
    <cfloop query ="qryMember">
    <cfquery datasource="#application.ds#"
    name="newsMember">
    insert into NetNewsTest (Email_address, First_Name,
    Last_Name, MemberNumber)
    values ('#trim(qryMember.Email)#',
    '#trim(qryMember.FirstName)#', '#trim(qryMember.LastName)#', '#
    trim(qryMember.MemberNumber)#')
    </cfquery>
    </cfloop>
    </cfif>
    <cfquery datasource="#application.dsrepl#"
    name="qryEmail">
    SELECT distinct Email
    FROM members
    WHERE memberstanding <= 2 AND email IS NOT NULL AND email
    <> ' '
    and qryMember.email NEQ newsMember.email
    </cfquery>
    <CFIF qryEmail.recordcount NEQ 0>
    <cfloop query ="qryEmail">
    <cfquery datasource="#application.ds#"
    name="newsMember">
    update NetNewsTest (Email_address)
    values ('#trim(qryMember.Email)#')
    where email_address = #qryEmail.email#
    </cfquery>
    </cfloop>
    </cfif>
    Thank you again for the help.

Maybe you are looking for

  • QuickTime and Windows 8

    Hello, I just resolve my problem to install Premiere Element 11 on my Ultrabook. The new problem is that Windows 8 is installed on this Ultrabook and, and Apple doesn't still uprgrate QuickTime to run on windows 8. Do you think I really need it ? For

  • What is the best way to connect two monitors to MacBook Air?

    I have a MacBook Air and I want to connect two monitors to it (not Thunderbolt Displays). I was thinking about using a Mini DisplayPort to DVI adapter to connect one monitor and a USB to DVI adapter to connect the other (such as Diamond BVU). But I h

  • Sap std report valuation type

    DEAR ALL I want one report of import & domestic purchase based on slpite valuation i.e. How much import & domestic purchase of same material on different valuation type is there any std report in SAP such as S_ALR_87012332

  • Layout column alignment problem

    Hi All, I have a form where I am printing the line item details. I am using the following code &EKET-EINDT&,,&EKPO-NETPR1&,,&EKPO-NETWR1& This gives the output 08/26/2007          688.5          1377.02 Between unit price and net price i have another

  • FTP Adapter: double quotes in csv file

    Hello, I have a BPEL (10.1.3.3) process in polling with the FTP Adapter on a CSV (with a ; as separator) file with native format translation. In the following the xsd generated: <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="htt