Click here to Skip to main content
15,903,388 members
Home / Discussions / Database
   

Database

 
AnswerRe: Convert or use expression in Sql select statement Pin
ZurdoDev24-Aug-17 4:50
professionalZurdoDev24-Aug-17 4:50 
QuestionSSIS Package creating XML Pin
Member 1335791511-Aug-17 19:59
Member 1335791511-Aug-17 19:59 
AnswerRe: SSIS Package creating XML Pin
jschell14-Aug-17 8:28
jschell14-Aug-17 8:28 
Questionsql Query help Pin
venu6568-Aug-17 23:53
venu6568-Aug-17 23:53 
AnswerRe: sql Query help Pin
Richard MacCutchan9-Aug-17 0:19
mveRichard MacCutchan9-Aug-17 0:19 
AnswerRe: sql Query help Pin
Richard Deeming9-Aug-17 1:19
mveRichard Deeming9-Aug-17 1:19 
GeneralRe: sql Query help Pin
venu6569-Aug-17 17:54
venu6569-Aug-17 17:54 
GeneralRe: sql Query help Pin
Richard Deeming10-Aug-17 0:49
mveRichard Deeming10-Aug-17 0:49 
QuestionSQL boolean comparison Pin
User 1106097926-Jul-17 21:25
User 1106097926-Jul-17 21:25 
AnswerRe: SQL boolean comparison Pin
Richard MacCutchan26-Jul-17 22:03
mveRichard MacCutchan26-Jul-17 22:03 
GeneralRe: SQL boolean comparison Pin
User 1106097926-Jul-17 22:40
User 1106097926-Jul-17 22:40 
GeneralRe: SQL boolean comparison Pin
Richard MacCutchan26-Jul-17 22:48
mveRichard MacCutchan26-Jul-17 22:48 
JokeRe: SQL boolean comparison Pin
User 1106097926-Jul-17 23:14
User 1106097926-Jul-17 23:14 
GeneralRe: SQL boolean comparison Pin
User 1106097927-Jul-17 22:40
User 1106097927-Jul-17 22:40 
GeneralRe: SQL boolean comparison Pin
Richard MacCutchan27-Jul-17 22:59
mveRichard MacCutchan27-Jul-17 22:59 
GeneralRe: SQL boolean comparison Pin
Member 133967936-Sep-17 14:04
Member 133967936-Sep-17 14:04 
AnswerRe: SQL boolean comparison Pin
Mycroft Holmes26-Jul-17 22:23
professionalMycroft Holmes26-Jul-17 22:23 
GeneralRe: SQL boolean comparison Pin
User 1106097926-Jul-17 22:42
User 1106097926-Jul-17 22:42 
AnswerRe: SQL boolean comparison Pin
Richard Deeming27-Jul-17 1:41
mveRichard Deeming27-Jul-17 1:41 
GeneralRe: SQL boolean comparison Pin
User 1106097927-Jul-17 1:53
User 1106097927-Jul-17 1:53 
GeneralRe: SQL boolean comparison Pin
User 1106097927-Jul-17 22:41
User 1106097927-Jul-17 22:41 
QuestionSQL Linq, getting 3 of each record. Pin
jkirkerx24-Jul-17 10:16
professionaljkirkerx24-Jul-17 10:16 
Strange, Could of swore when I first wrote this, I was just getting 1 record.
Then I changed the return value to List from IEnumerable and starting getting 3 records back for each record.
But I doubt that had anything to do with it. I did raise the .Net level to 4.5.2.
Must be my And Statement.

I tried Distinct but It doesn't seen to be working, most likely because I have no clue how use it here.
I started writing in c# and MVC and don't write like this anymore.
Public Shared Function load_COH_ListBox_Info(
        ByRef pResults As List(Of cohIndex)) As Integer

        Dim pValue As Integer = 0
        Dim context As New hx5Context()

        pResults =
        (
            From oh In context.Order_History
            Where oh.OrderDate >= DbFunctions.AddDays(Today, -40) _
            And
            (
                oh.OrderStatus = "COMPLETED" _
                Or oh.OrderStatus = "ORDER_CANCELED" _
                Or oh.OrderStatus = "ORDER_CANCELED_REFUND_COMPLETE"
            )
            Order By oh.OrderNumber Descending
            Select New cohIndex With
            {
                .orderID = oh.CompletedOrderID,
                .orderNumber = oh.OrderNumber,
                .orderDate = oh.OrderDate,
                .orderStatus = oh.OrderStatus,
                .accountName = oh.LoginID,
                .total_NetCharge = oh.GrandTotal
            }
        ).Distinct().OrderByDescending(Function(ob) ob.orderNumber).ToList()
        pValue = pResults.Count()

        Return pValue

    End Function
If it ain't broke don't fix it

AnswerRe: SQL Linq, getting 3 of each record, [WAIT] Pin
jkirkerx24-Jul-17 10:29
professionaljkirkerx24-Jul-17 10:29 
JokeRe: SQL Linq, getting 3 of each record, [WAIT] Pin
Afzaal Ahmad Zeeshan24-Jul-17 10:40
professionalAfzaal Ahmad Zeeshan24-Jul-17 10:40 
AnswerRe: SQL Linq, getting 3 of each record. Pin
Afzaal Ahmad Zeeshan24-Jul-17 10:36
professionalAfzaal Ahmad Zeeshan24-Jul-17 10:36 

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.