Forum Replies Created

Viewing 15 posts - 3,001 through 3,015 (of 15,381 total)

  • RE: Denormalizing Normalized data

    patrickmcginnis59 10839 (4/14/2015)


    Sean Lange (4/14/2015)


    patrickmcginnis59 10839 (4/14/2015)


    Sean Lange (4/14/2015)


    liamdemasi (4/14/2015)


    I am not splitting it back into 2 tables. I am trying to get the CountryIds associated with an EmployeeId in...

  • RE: Denormalizing Normalized data

    patrickmcginnis59 10839 (4/14/2015)


    Sean Lange (4/14/2015)


    liamdemasi (4/14/2015)


    I am not splitting it back into 2 tables. I am trying to get the CountryIds associated with an EmployeeId in the EmployeeCountry table, then...

  • RE: DELETING AN ENTRY

    david.foli7 (4/14/2015)


    I got the below request to delete an entry...what will be the best script to use

    Auxid: 1219947569

    Name: WALMART T

    CID: 11987968

    Hi and welcome to the forums. You need to provide...

  • RE: please explain followin in convert datetime case

    rajemessage 14195 (4/14/2015)


    hi,

    Q1)followng is from https://msdn.microsoft.com/en-IN/library/ms187928.aspx?f=255&MSPPError=-2147217396

    please explain "1 These style values return nondeterministic results. Includes all (yy) (without century) styles and a subset of (yyyy) (with century) styles."

    Q2) please explain...

  • RE: Using Case Within PIVOT portion of Crosstab query

    Just to demonstrate how much difference aliases can make. I used aliases in your joins and that massive wall of text in the middle is a LOT more friendly.

    SELECT ItemKey

    ,...

  • RE: Denormalizing Normalized data

    Something like this should be pretty close. Since you didn't post ddl or data this is untested but it should work.

    declare @EmployeeID int = 10001;

    with SortedVals as

    (

    select CountryId

    , ROW_NUMBER ()...

  • RE: Denormalizing Normalized data

    liamdemasi (4/14/2015)


    Right, I figured that. My real question, though, is how do I insert the data into the denormalized table?

    My select: Select TOP 3 FROM EmployeeCountry where EmployeeId = 10001

    Will...

  • RE: Denormalizing Normalized data

    liamdemasi (4/14/2015)


    Unfortunately, I cannot normalize the target as the system that will be consuming the data needs it in a flat table.

    Then you will need to do this one...

  • RE: Denormalizing Normalized data

    liamdemasi (4/14/2015)


    I am not splitting it back into 2 tables. I am trying to get the CountryIds associated with an EmployeeId in the EmployeeCountry table, then I am going to...

  • RE: Denormalizing Normalized data

    liamdemasi (4/14/2015)


    They would know which is the EmployeeId and which are the CountryIds by the column headings in the table I will insert the data into.

    I will attempt your suggestion...

  • RE: Denormalizing Normalized data

    liamdemasi (4/14/2015)


    I have a requirement to provide data in a denormalized form from normalized tables. Working in SSIS.

    I have two tables: EmployeeCountry and Country.

    EmployeeCountry

    EmployeeId (PK)(FK)

    CountryId(PK)(FK)

    Country

    CountryId (PK)

    CountryName

    There will only be ...

  • RE: Cascading delete issue

    Naveen J V (4/14/2015)


    Hi,

    I have around 3 tables having around 20 to 30gb of data. My table A related to table B by a FK and same way table B...

  • RE: Combining Tables

    Here is another way of handling this type of thing. This is using a cross tab.

    Please notice how I created tables and sample data to work with. This is something...

  • RE: Combining Tables

    yb751 (4/14/2015)


    Try this:

    SELECT

    u.USERID,

    u.NAME,

    u.PHONE,

    ui1.INFO AS Sport,

    ui2.INFO AS Food

    FROM

    [User] u

    JOIN UserInfo ui1 ON u.USERID = ui1.USERID AND ui1.COLUMN = 10

    JOIN UserInfo ui2 ON u.USERID = ui2.USERID AND ui2.COLUMN = 30

    This works but...

  • RE: SELECT COUNT(*) vs DMVs to get row count

    GilaMonster (4/13/2015)


    Not fixed. Large portions of the storage engine were rewritten between SQL 2000 and 2005.

    I would say that rewriting the storage engine is what "fixed" the problem.

Viewing 15 posts - 3,001 through 3,015 (of 15,381 total)