views:

53

answers:

1

I thought this would have been quite common but can't find anything on this. I'm trying to query columns that have spaces immbedded within them. For the life of me I don't see a way of selecting them when I'm trying to assign them to an alias when creating an anonymous type result. Here's the code, but not sure how to go from here:

Dim joinedRows = (From r1 In ds.Tables(ETGAtSfdcTableName.Snapshot1) Group Join r2In ds.Tables   
                 (ETGAtSfdcTableName.Snapshot2) On r1.Field(Of String)("idAT") Equals 
                 r2.Field(Of String)("idAT") Into j() _
                        From c In j.DefaultIfEmpty() _
                                        Select New With _
                                        { _
                                             r1.idAT, _
                                             .status = r1.status, _
                                             ......                                                 
                                             .Change = r2.amtProdUSD - r1.amtProdUSD, _
                                             .ChangeABS = Abs(r2.amtProdUSD - r1.amtProdUSD), _
                                             r1.id, _
                                             amStatus = r1."Opportunity Status",
                                             ......

As you can see the column "opportunity status" doesn't lend itself to be referenced this way. is there something I'm missing?

A: 

I think LINQ to SQL will convert the space in the column name to an underscore: Opportunity_Status

LesterDove