Click here to Skip to main content
15,885,278 members
Home / Discussions / Database
   

Database

 
QuestionSQL Linq, updating multiple records Pin
jkirkerx15-Jul-15 10:50
professionaljkirkerx15-Jul-15 10:50 
QuestionSave value of PREPARE into a variable Pin
Jassim Rahma14-Jul-15 22:23
Jassim Rahma14-Jul-15 22:23 
AnswerRe: Save value of PREPARE into a variable Pin
Wendelius14-Jul-15 22:45
mentorWendelius14-Jul-15 22:45 
GeneralRe: Save value of PREPARE into a variable Pin
Jassim Rahma15-Jul-15 22:22
Jassim Rahma15-Jul-15 22:22 
GeneralRe: Save value of PREPARE into a variable Pin
Wendelius15-Jul-15 22:51
mentorWendelius15-Jul-15 22:51 
AnswerRe: Save value of PREPARE into a variable Pin
jschell15-Jul-15 10:45
jschell15-Jul-15 10:45 
QuestionSome help with SQL to Linq Conversions Pin
jkirkerx13-Jul-15 7:04
professionaljkirkerx13-Jul-15 7:04 
AnswerRe: Some help with SQL to Linq Conversions Pin
Richard Deeming13-Jul-15 7:18
mveRichard Deeming13-Jul-15 7:18 
GeneralRe: Some help with SQL to Linq Conversions Pin
jkirkerx13-Jul-15 7:34
professionaljkirkerx13-Jul-15 7:34 
I would of never figured that out on the multiple where statements.
And the Date bombed, so I tried DateTime.Now.AddDays(-30), but changed to your example before testing it.

I wonder if this will now work without using IQueryable? I'll give it a spin. It didn't work
LINQ to Entities does not recognize the method 'System.DateTime AddDays(Double)' method, and this method cannot be translated into a store expression.

I'll go back to IQueryable and give it a try.
Dim pValue As Integer = 0
        Using context As New CRMContext()

            pValue = _
                (From item In context.CRM_MESSAGES
                 Where item.MessageStatus = "MESSAGE_COMPLETE" _
                 OrElse item.MessageStatus = "MESSAGE_PENDING" _
                 OrElse item.MessageStatus = "MESSAGE_FORWARD" _
                 And item.ContactDate >= Date.Today.AddDays(-30)).Count()

        End Using

        Return pValue

General[Got It] Pin
jkirkerx13-Jul-15 7:58
professionaljkirkerx13-Jul-15 7:58 
GeneralRe: Some help with SQL to Linq Conversions Pin
Richard Deeming13-Jul-15 8:00
mveRichard Deeming13-Jul-15 8:00 
QuestionSQL Linq, query and then take result to query again Pin
jkirkerx10-Jul-15 7:43
professionaljkirkerx10-Jul-15 7:43 
Answer[Solved] Pin
jkirkerx10-Jul-15 8:53
professionaljkirkerx10-Jul-15 8:53 
QuestionSELECT then INSERT data in a matrix way Pin
Farhad Eft9-Jul-15 9:14
Farhad Eft9-Jul-15 9:14 
AnswerRe: SELECT then INSERT data in a matrix way Pin
Richard Deeming9-Jul-15 9:22
mveRichard Deeming9-Jul-15 9:22 
GeneralRe: SELECT then INSERT data in a matrix way Pin
Farhad Eft9-Jul-15 10:51
Farhad Eft9-Jul-15 10:51 
QuestionSQL Linq, concepts of writing queries Pin
jkirkerx8-Jul-15 8:55
professionaljkirkerx8-Jul-15 8:55 
AnswerRe: SQL Linq, concepts of writing queries Pin
Richard Deeming8-Jul-15 10:46
mveRichard Deeming8-Jul-15 10:46 
GeneralRe: SQL Linq, concepts of writing queries Pin
jkirkerx8-Jul-15 12:32
professionaljkirkerx8-Jul-15 12:32 
Questionssrs rendering format ppt pptx Pin
Aurelkb5-Jul-15 23:35
Aurelkb5-Jul-15 23:35 
AnswerRe: ssrs rendering format ppt pptx Pin
Richard MacCutchan6-Jul-15 0:13
mveRichard MacCutchan6-Jul-15 0:13 
QuestionEvaluate returnvalues of stored procedures used in TableAdapterManager.UpdateAll Pin
atrus27113-Jul-15 1:49
atrus27113-Jul-15 1:49 
AnswerRe: Evaluate returnvalues of stored procedures used in TableAdapterManager.UpdateAll Pin
atrus27113-Jul-15 2:39
atrus27113-Jul-15 2:39 
QuestionOracle Query Builder Pin
Mycroft Holmes30-Jun-15 14:18
professionalMycroft Holmes30-Jun-15 14:18 
AnswerRe: Oracle Query Builder Pin
Jörgen Andersson7-Jul-15 8:40
professionalJörgen Andersson7-Jul-15 8:40 

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.