Click here to Skip to main content
15,895,774 members
Home / Discussions / Database
   

Database

 
GeneralRe: Error: Conversion failed when converting the varchar value Pin
Richard Andrew x648-Jul-16 14:22
professionalRichard Andrew x648-Jul-16 14:22 
GeneralRe: Error: Conversion failed when converting the varchar value Pin
Mycroft Holmes8-Jul-16 21:21
professionalMycroft Holmes8-Jul-16 21:21 
GeneralRe: Error: Conversion failed when converting the varchar value Pin
Richard Andrew x649-Jul-16 4:27
professionalRichard Andrew x649-Jul-16 4:27 
GeneralRe: Error: Conversion failed when converting the varchar value Pin
Mycroft Holmes9-Jul-16 11:31
professionalMycroft Holmes9-Jul-16 11:31 
GeneralRe: Error: Conversion failed when converting the varchar value Pin
Richard MacCutchan8-Jul-16 22:50
mveRichard MacCutchan8-Jul-16 22:50 
GeneralRe: Error: Conversion failed when converting the varchar value Pin
Richard Andrew x649-Jul-16 4:28
professionalRichard Andrew x649-Jul-16 4:28 
Questionsql linq, data duplication on 1 particular record Pin
jkirkerx7-Jul-16 14:06
professionaljkirkerx7-Jul-16 14:06 
AnswerRe: sql linq, data duplication on 1 particular record Pin
jkirkerx8-Jul-16 8:03
professionaljkirkerx8-Jul-16 8:03 
I forgot about joining a table that has multiple records that match, which creates multiple primary records, so you have to group.

Anyways, I did this for the time being, don't know why I didn't think of it yesterday. I keep thinking that I didn't know the value of d.departmentID in order to make a match.
pResults =
            (
                from d in context.PRODUCT_DEPARTMENT
                join da1 in context.PRODUCT_DEPARTMENT_AVATARS on d.Avatar_Primary equals da1.AvatarID into avatars
                from da1 in avatars.DefaultIfEmpty()
                where d.Deleted == false
                orderby d.Name                
                select new model_departments_index
                {
                    DepartmentID = d.DepartmentID,
                    Enabled = d.Enabled,
                    Deleted = d.Deleted,
                    Name = d.Name,
                    Description = d.Description,
                    Featured = d.Featured,
                    Rollback = d.Rollback,
                    Avatar_Primary_ID = d.Avatar_Primary,
                    Avatar_Primary_Image = new model_type_avatar
                    {
                        Name = da1.Name,
                        Alt = da1.Alt,
                        Data = da1.Data,
                        Type = da1.Type,
                        Url = da1.Url
                    },
                    Categories = 
                    (
                        from c in context.PRODUCT_CATEGORY
                        where c.DepartmentID == d.DepartmentID
                        select new json_product_categories
                        {
                            text = c.Name,
                            value = c.CategoryID
                        }
                    ).ToList()
                }
            ).ToList();
            pValue = pResults.Count();

QuestionData duplication on multiple fields Pin
VK195-Jul-16 9:19
VK195-Jul-16 9:19 
AnswerRe: Data duplication on multiple fields Pin
Jörgen Andersson5-Jul-16 11:14
professionalJörgen Andersson5-Jul-16 11:14 
AnswerRe: Data duplication on multiple fields Pin
Mycroft Holmes5-Jul-16 17:21
professionalMycroft Holmes5-Jul-16 17:21 
AnswerRe: Data duplication on multiple fields Pin
jonyj18-Jul-16 2:49
jonyj18-Jul-16 2:49 
GeneralSQL Transactions - Torn apart in old code Pin
HobbyProggy5-Jul-16 1:12
professionalHobbyProggy5-Jul-16 1:12 
GeneralRe: SQL Transactions - Torn apart in old code Pin
Marc Clifton5-Jul-16 1:15
mvaMarc Clifton5-Jul-16 1:15 
GeneralRe: SQL Transactions - Torn apart in old code Pin
HobbyProggy5-Jul-16 1:18
professionalHobbyProggy5-Jul-16 1:18 
GeneralRe: SQL Transactions - Torn apart in old code Pin
Dave Kreskowiak5-Jul-16 1:51
mveDave Kreskowiak5-Jul-16 1:51 
GeneralRe: SQL Transactions - Torn apart in old code Pin
HobbyProggy5-Jul-16 1:56
professionalHobbyProggy5-Jul-16 1:56 
QuestionTime calculation Pin
AVPRF4-Jul-16 20:37
AVPRF4-Jul-16 20:37 
AnswerRe: Time calculation Pin
Mycroft Holmes4-Jul-16 21:01
professionalMycroft Holmes4-Jul-16 21:01 
GeneralRe: Time calculation Pin
AVPRF5-Jul-16 19:47
AVPRF5-Jul-16 19:47 
GeneralRe: Time calculation Pin
Mycroft Holmes6-Jul-16 12:40
professionalMycroft Holmes6-Jul-16 12:40 
GeneralRe: Time calculation Pin
AVPRF6-Jul-16 19:02
AVPRF6-Jul-16 19:02 
QuestionHow to Search for names in MySQL Pin
Jassim Rahma2-Jul-16 13:06
Jassim Rahma2-Jul-16 13:06 
AnswerRe: How to Search for names in MySQL Pin
Mycroft Holmes2-Jul-16 14:10
professionalMycroft Holmes2-Jul-16 14:10 
QuestionNeed guidance: duplicate oracle db to another Pin
Foothill30-Jun-16 10:48
professionalFoothill30-Jun-16 10:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.