User Profile

Collapse

Profile Sidebar

Collapse
Radha Shyam
Radha Shyam
Last Activity: Jan 31 '15, 12:06 PM
Joined: Mar 28 '11
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Radha Shyam
    started a topic Build JSON with two datatable values

    Build JSON with two datatable values

    My question is how can I combine two sets of JSON for example one set comes from one datatable like this:

    "ID": 1, "SHORT_NAME ": "B", "CARRIER_NA ME": "Carrier A"

    Another one with multiple values comes from another datatable:

    { "YMDH": "2009-03-07 00:00:00.000", "SELL_DURATION" : 222.999995 }, { "YMDH": "2009-03-07 01:00:00.000",...
    See more | Go to post

  • Thank you tofos for your reply!
    This shows the count as expected but the only thing is the sort order. The result is:
    Range
    [1-2]
    [3-4]
    [2-3]
    [0-1]
    [>4]

    Can you suggest how can i show them as sorted ie. range [0-1] should come first followed by [1-2], [2-3] and so on.

    Can i add one more column as sort order and set order by on that.

    Please advise.

    Th...
    See more | Go to post

    Leave a comment:


  • SQL Server - how to create a pivot from a select query

    Does anybody knows a simple way to create a pivot of this result:

    Code:
    [0-1]  [1-2]  [2-3]  [3-4]
    12      45      29    5
    This result is created with query:

    Code:
     SELECT [0-1]   = SUM(CASE WHEN AGE >= 0 AND AGE <= 1 THEN 1 ELSE 0 END),
           [1-2]  = SUM(CASE WHEN AGE > 1 AND AGE <= 2 THEN 1 ELSE 0 END),
           [2-3] = SUM(CASE WHEN AGE > 2 AND AGE <= 3 THEN 1 ELSE 0 END),
    [3-4]
    ...
    See more | Go to post
    Last edited by Rabbit; Aug 21 '13, 04:01 PM. Reason: Please use code tags when posting code or formatted data.

  • Radha Shyam
    replied to Linq - Group by week in datatable
    Anybody looking for the solution here it is:
    http://stackoverflow.com/questions/1...04441#15904441
    See more | Go to post

    Leave a comment:


  • Radha Shyam
    replied to Linq - Group by week in datatable
    Thank you for your reply but this does not solve my problem. I want to have columns where week starts from 1/7 - 1/13 and in that column the values for Job1 is aggregated for this particular week. I want this all stored in a datatable as i have to do further calculation with these values so no writing on consoles. Anyhow, appreciate your help. Thanks!
    See more | Go to post

    Leave a comment:


  • Radha Shyam
    started a topic Linq - Group by week in datatable

    Linq - Group by week in datatable

    I have a datatable which comprises values from 1st January to march, something like this:

    Code:
    DataTable datatable = new DataTable("Employee");
    datatable.Columns.Add("Date", typeof(string));
    datatable.Columns.Add("Employee", typeof(string));
    datatable.Columns.Add("Job1", typeof(double));
    datatable.Columns.Add("Job2", typeof(double));
    
    datatable.Rows.Add(new
    ...
    See more | Go to post
    Last edited by Rabbit; Apr 9 '13, 03:26 PM. Reason: Please use code tags when posting code.

  • Edit Single/multiple Cell of Datagrid with save cancel button

    Hello,
    I have a web application (c#) where there is a page which shows a datagrid with 10 columns like a firstname, surname, phone, gender, account name, account value, average account value etc. There may be rows where it has a account associated with someone but starting few columns are blank (no values for them). Like for example there is an account name but it is not associated with the customer. So what i want is to have a hyperlink/anchor...
    See more | Go to post
No activity results to display
Show More
Working...