So I'm failry new at peogramming and really new at programming for SharePoint. I have created a custom timer job to run a stored procedure to import data into a custom SP List. Got that to work fine. now I need the job to read the data in the list
and if the row already exists, to scrap the incoming row. Here is a couple snippets of my code. It fails in the nested for each loop. I think I have either the CAML wrong or the loops are backwards or otherwise messed up.
static SPListItemCollection QueryList(SPList list)
SPQuery listQuery = new SPQuery();
//listQuery.Query = "<Where><IsNotNull><FieldRef Name='Alert_x0020_ID' /></IsNotNull></Where><OrderBy><FieldRef Name='Alert_x0020_ID' Ascending='True' /></OrderBy>";
listQuery.ViewFields = @"<FieldRef Name='Alert_x0020_ID' />";
SPListItemCollection collListItems = list.GetItems(listQuery);
View Complete Post