Question: I'm trying to clean up some Active Directory data in SQL Server. I have managed to read the raw LFD file into a table. Now I need to clean up some attributes where values are spread out over multiple rows. I can identify records that need to be appended to the prior record by the fact the have a leading space. 

Example:

```
ID        Record                     IsPartOfPrior
3114      memberOf:                        0
3115       CN=Sharepoint-Members-home      1
3116      memberOf:                        0
3117       This is                         1
3118       part of the                     1
3119       next line.                      1

```

Ultimately, I would like to have the following table generated:

```
ID          Record
3114        memberOf:CN=Sharepoint-Members-home
3116        memberOf:This is part of the next line

```

I could write it through a cursor, setting variables, working with temp tables and populating a table. But there has to be a set based (maybe recursive?) approach to this?

I could use the STUFF method to combine various rows together, but how am I about to group the various sets together? I'm thinking that I first have to define groupID's per record, and then stuff them together per groupID?

Thanks for any help.

Answer: 
As stated in the document - [Inserting a file in a folder](https://developers.google.com/drive/v3/web/folder#inserting_a_file_in_a_folder):

> 
> To insert a file in a particular folder, specify the correct ID in the `parents` property of the file, as shown:
> 
> 
> 

```
var folderId = "0BwwA4oUTeiV1TGRPeTVjaWRDY1E";
var fileMetadata = new File()
{
    Name = "photo.jpg",
    Parents = new List<string>
    {
        folderId
    }
};
FilesResource.CreateMediaUpload request;
using (var stream = new System.IO.FileStream("files/photo.jpg",
    System.IO.FileMode.Open))
{
    request = driveService.Files.Create(
        fileMetadata, stream, "image/jpeg");
    request.Fields = "id";
    request.Upload();
}
var file = request.ResponseBody;
Console.WriteLine("File ID: " + file.Id);

```

Hope this helps.
I must have overseen this... It simply means in my case to replace

```
var body = new Google.Apis.Drive.v3.Data.File
{
    Name = Path.GetFileName(uploadFile),
    Description = uploadFile,
    MimeType = GetMimeType(uploadFile),
    Parents = new List<ParentReference> {new ParentReference {Id = parent}}
};

```

with

```
var body = new Google.Apis.Drive.v3.Data.File
{
    Name = Path.GetFileName(uploadFile),
    Description = uploadFile,
    MimeType = GetMimeType(uploadFile),
    Parents = new List<string> {parent}
};

```

(I've added this as an answer as it is to long for a comment).