Forum Replies Created

Viewing 15 posts - 646 through 660 (of 902 total)

  • RE: Need help for a Query

    Ok, If you state there are no duplicates in the DAT_STAGE then thats fine, I'm always suspicious of data loaded from files as they can easily have duplicates in them,...

  • RE: Need help for a Query

    I cant see anything wrong with the query, thats why I asked if there were duplicated records in the staging table.

    If you run

    SELECT

    lvl_nme

    ,ds_nme

    ,count(*)

    From DAT_STAGE

    Group by

    lvl_nme

    ,ds_nme

    Having count(*)>1

    Do you...

  • RE: Need help for a Query

    Simple question have you checked the DATA_STAGE table for duplicated rows?

  • RE: Fetching data from two tables

    Curious,

    Create Table #folder (FolderId int, FolderName varchar(100))

    Create Table #Permissions (FolderId int, FolderName varchar(100),Permission varchar(100))

    Insert into #Folder

    Select 1 ,'Folder1'

    Union Select 2 ,'Folder2'

    Union Select 3 ,'Folder3'

    Union Select 4 ,'Folder4'

    Union Select 5...

  • RE: Fetching data from two tables

    You need to do an Outer Join, something like

    Select FolderName

    ,COALESCE(Permission,'None') Permission

    --,IsNull(Permission,'None') Permission --Alternate to COALESCE

    From Folder f

    LEFT OUTER JOIN [Permissions] p

    on f.FolderId=p.FolderId

  • RE: Deleting the records without foreign key

    I would be very nervous about deleting records from a DW as the nature of them can mean that while its ok to delete from dimensions based on one set...

  • RE: Trying to view properties of the Database

    Either you dont have access to the Master db or more likley someone has done a clean up after mistakenly creating objects in the Master db and deleted the table...

  • RE: Looping Thru Server Names in SSIS Package

    Abu Dina (10/11/2012)


    Jason-299789 (10/11/2012)


    Does that work when itterating through a record set of server names, as I thought that the connections were set only when the package was loaded and...

  • RE: Looping Thru Server Names in SSIS Package

    Does that work when itterating through a record set of server names, as I thought that the connections were set only when the package was loaded and couldnt change during...

  • RE: How to run 4 jobs in single job in sql server 2008

    It depends on what you call a job. In SQL Agent Terms a Job is a single Item, though it may have multiple steps.

    so You create a single Job,...

  • RE: OPTION (RECOMPILE, QUERYTRACEON 8649)

    GilaMonster (10/11/2012)


    Jason-299789 (10/11/2012)


    One last question, was this always the case or is there a case to say that performance enhancements with the query engine over the last few revisions have...

  • RE: OPTION (RECOMPILE, QUERYTRACEON 8649)

    GilaMonster (10/11/2012)


    Jason-299789 (10/11/2012)


    GilaMonster (10/11/2012)


    IN is not an expensive operation. For matching rows, it's cheaper than join.

    Moving a filter from a join to the where when you have an outer join...

  • RE: OPTION (RECOMPILE, QUERYTRACEON 8649)

    GilaMonster (10/11/2012)


    IN is not an expensive operation. For matching rows, it's cheaper than join.

    Moving a filter from a join to the where when you have an outer join changes the...

  • RE: OPTION (RECOMPILE, QUERYTRACEON 8649)

    In regards to the query wouldnt this run using a more optimal plan

    ;With Cte_Newcompany(NewCompanyId)

    AS

    (

    SELECT CompanyID

    FROM new.CompanyIndex AS CI

    INNER JOIN UserData.dbo.CriteriaDistribution AS CD

    ON CI.SegmentNo =[CD].[SegmentNo]

    AND CI.[CriteriaID]...

  • RE: would need some help

    I'm happy to have a look at the code you create and give it a sanity check.

    In response to your question, you need to drop it by the constraint name,...

Viewing 15 posts - 646 through 660 (of 902 total)