Forum Replies Created

Viewing 15 posts - 2,686 through 2,700 (of 3,489 total)

  • RE: "Simple" Health Dashboard -- Logic Question

    How do you calculate health? (Or does it matter?)

    I think you can create a stored procedure to join the two tables and flatten the data and then just group by...

  • RE: Concetenate and sum

    use STUFF for the concatenated list and SUM with GROUP BY the result of the concatenation

  • RE: Need help with logic

    If you want some robust logic, how about a robust explanation of how to get from your sample data to your result?

  • RE: Re-Indexed with the Wrong Fill Factor and Now All Databases Are Huge

    If you backed up your databases before doing this, you could just restore over the bloated ones and be done with it. If not, you may have to use...

  • RE: Selecting and merging records for a singular complete record

    Tried working with the data you provided and it's a mess. Could you please post table definitions and insert statements for your data? Then those trying to help will...

  • RE: Table structure for creating timetable for a school

    suppose the timetable is changed for two days 24/01/2015 and 25/01/2015 wherein Maths is replaced with Physics subject, how to retrieve the changed data for only those two days.

    .

    There's a...

  • RE: Table structure for creating timetable for a school

    Off the top of my head, something like this would work:

    CREATE TABLE Course (

    CourseID INT IDENTITY(1,1)

    ,CourseName VARCHAR(20) NOT NULL

    );

    GO

    INSERT INTO Course (CourseName) VALUES ('Physics'),('Chemistry'),('Maths'),('Biology'),('SocialScience')

    ,('Craft'),('ValueEducation'),('Yoga'),('Games'),('ComputerScience'),('Science'),('Hindi');

    /*

    MondayTuesdayWednesdayThursdayFridaySaturday

    07:00PhysicsChemistryMathsBiologySocialScienceCraft

    08:00MathsValueEducationChemistry EnglishBiologyYoga

    09:00GamesComputerScience ScienceChemistry HindiMaths

    */

    CREATE TABLE Schedule (

    DayNumber...

  • RE: Add time

    post your table or query definition. Adding time works exactly the same as adding days.

    https://msdn.microsoft.com/en-us/library/ms186819.aspx

  • RE: How to repeat the same row combination?

    I was looking for an explanation of a rule or something. Is there a pattern here I'm supposed to use to do this? If so, what is it? ...

  • RE: How to repeat the same row combination?

    Srinivasan,

    Here's the create table and insert scripts:

    CREATE TABLE MyData(

    CustomerID INT,

    MonthIDINT,

    RSCIDINT,

    Flag1BIT,

    Flag2BIT,

    Flag3BIT);

    GO

    INSERT INTO MyData(CustomerID, MonthID, RSCID, Flag1, Flag2, Flag3)

    VALUES(123,294,3456,0,0,0),

    (123, 300, 1234,0,1,1),

    (123,303, 3542,0,1,0),

    (123,303,2345,1,1,1),

    (123,304,3542,0,1,0),

    (123,304,2345,1,1,1),

    (123,305,3542,0,1,0),

    (123,305,2345,1,1,1),

    (123,306,2345,1,1,1),

    (123,306,3542,0,1,0),

    (123,307,2345,1,1,1),

    (123,307,3542,0,1,0),

    (123,308,3542,0,1,0),

    (123,309,3542,0,1,0);

    Could you give an example of your expected result?

  • RE: SQL DATABASE

    Without sample data, it's hard to see what you mean exactly. If you have a table of tasks or jobs, and then a child table of status updates, then...

  • RE: Horizontal Axis Order

    I'm not reporting on a cube, but if you use a number for the month (or better a date column) in your report instead of a string, SSRS will see...

  • RE: Horizontal Axis Month Sales

    You may need to force the existence of all dates in the range. (This would probably be better with a CTE to generate dates in a range, but anyway...)

    --...

  • RE: Add time

    =DATEADD("n",150,Fields!orderdate.Value)

    n = Minutes (because M is months)

    h = hours

    s = seconds

  • RE: How to sum and group data

    Since he's new, I did part of it... Here are the create table statements:

    -- seems there's a table missing. Parent of the other 4 tables.

    CREATE TABLE Customer (

    CustomerAcct CHAR(10)

    CONSTRAINT...

Viewing 15 posts - 2,686 through 2,700 (of 3,489 total)