CAML query to delete data within a date range
Hello, I have an SSIS package that utilizes The Share point List Source and Destination tasks. I need to retrieve data from a share point list and delete rows that are older than 2 years. So if this process would run today, only data from 2010 and 2011 would be available. I believe that I need a CAML query to embed into the Share point tasks? I have never written a CAML query before, so I am not sure how to do this. Any help would be appreciated. Thanks, DaveDave SQL Developer
January 13th, 2011 2:24pm

Hi Dave, IMHO the right technique is to use SharePoint List Source. Here is the article: http://sql-bi-dev.blogspot.com/2010/08/pulling-sharepoint-list-using-ssis-2008.html Please vote if helpful.Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
January 13th, 2011 3:26pm

I already have these plug-ins, (as mentioned in my post). I am asking for the CAML query to retrieve this data. Dave SQL Developer
January 13th, 2011 4:10pm

Hello, I have an SSIS package that utilizes The Share point List Source and Destination tasks. I need to retrieve data from a share point list and delete rows that are older than 2 years. So if this process would run today, only data from 2010 and 2011 would be available. I believe that I need a CAML query to embed into the Share point tasks? I have never written a CAML query before, so I am not sure how to do this. Any help would be appreciated. Thanks, Dave Dave SQL Developer Hi Dave, I would recommend you ask CAML - related questions in the MSDN's SharePoint forum here .SSIS Tasks Components Scripts Services | http://www.cozyroc.com/
Free Windows Admin Tool Kit Click here and download it now
January 14th, 2011 5:40pm

Hi Dave, I agree with CozyRoc, you can post the question in SharePoint forum. Anyway, I would like to show you the similar CAML query to get the data: <Query> <Where> <Gt> <FieldRef Name='_x0063_1' /> <Value Type='Number'>2</Value> </Gt> </Where> </Query> Actually, there is 3rd party tool named U2U CAML Query Builder, which can help us to make the query: http://www.u2u.net/Tools/SharePointCamlQueryBuilder.aspx Thanks, Jin ChenJin Chen - MSFT
January 17th, 2011 5:06am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics