Click here to Skip to main content
15,912,400 members

Comments by ben the great (Top 3 by date)

ben the great 26-Nov-19 17:21pm View    
SELECT dbo.Customer.CustomerName, dbo.Customer.UniqueID FROM dbo.Customer UNION SELECT dbo.Vendor.VendorName, dbo.Vendor.UniqueID
FROM dbo.Vendor


This seems to work in a view created in sql management studio. then i created a datacontext and dragged the view onto it.

then i did this in my code:

qCustomerVendorNames = From tmp In m_dbViewCustVend.View_CustomersVendors
Select New With {.Name = tmp.CustomerName, tmp.UniqueID}

It seems to load much faster. Any reason not to keep going like that?
ben the great 26-Nov-19 16:42pm View    
how do i create it without any relationships just select all records from both tables?
with column names like in my code. so customer name and vendor name in same column. first all the customers then all the vendors.
ben the great 26-Nov-19 13:04pm View    
Thank you for replying.

Can you give me an example of how you would handle this? I am using this to set the datasource on a devexpress xtragrid incase that matters.