Forum Replies Created

Viewing 15 posts - 121 through 135 (of 405 total)

  • RE: T-SQL aggregating

    ams00601 (5/27/2016)


    Hi all,

    looking at the example data below, is it possible to sum up just those rows where ProductID = 1 and leave these plits for the other rows...

    ----------------------------------------------------------------------------------------------------------------------------------------------------
    Roshan Joe

    Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: SSIS Package not importing all rows

    Not enough information to figure out whats happening. What you could do is import both results to two different tables and figure out the the row the first 4 columns...

    ----------------------------------------------------------------------------------------------------------------------------------------------------
    Roshan Joe

    Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: SSIS Package not importing all rows

    Assuming your source is flat file, what is your row terminator?

    Is the row terminator is present in those column values?

    ----------------------------------------------------------------------------------------------------------------------------------------------------
    Roshan Joe

    Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: How to find postcodes with two spaces in the middle?

    Reading the question I too thought why not you use a like '% %' or a '% % %' if they are not adjacent. Unless we are not understanding...

    ----------------------------------------------------------------------------------------------------------------------------------------------------
    Roshan Joe

    Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: Query not executing dynamic way

    declare @dbname varchar(50),@objname varchar(20),@sql varchar(1000)

    set @dbname='XYZ'

    Set @objname='TMP'

    Set @sql=N'Select * from '+@dbname+'.sys.objects where name = '''+@objname+''''

    Execute (@sql)

    ----------------------------------------------------------------------------------------------------------------------------------------------------
    Roshan Joe

    Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: How to include sp_change_users_login in my program ?

    John Mitchell-245523 (5/26/2016)


    If userabc has just restored the database, then it's going to be the database owner (dbo), so you shouldn't need to run sp_change_users_login. Unless I've missed something,...

    ----------------------------------------------------------------------------------------------------------------------------------------------------
    Roshan Joe

    Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: The Clustered Index is not the Primary Key

    richlion2 (5/26/2016)


    Sorry for making this to drag on like this.

    Attached is a real example from one of my databases (not my design BTW). It shows a table with 2 first...

    ----------------------------------------------------------------------------------------------------------------------------------------------------
    Roshan Joe

    Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: Question

    eldosepd (5/24/2016)


    it is possible to give execute permissions without write permissions. But If the stored procedure includes insert\update statements, the user can insert\update the table by calling the stored procedure.

    Even...

    ----------------------------------------------------------------------------------------------------------------------------------------------------
    Roshan Joe

    Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: AlwaysOn Availability / Different DB Name

    No, You cannot use a different name for same database since it is designed as a fail over technology.

    ----------------------------------------------------------------------------------------------------------------------------------------------------
    Roshan Joe

    Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: Using joins in single query question

    After the first insert you need to get the inserted value and use it in second insert query.

    Search on SCOPE_IDENTITY() for more info.

    ----------------------------------------------------------------------------------------------------------------------------------------------------
    Roshan Joe

    Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: Finding if there was CPU or memory pressure yesterday night

    You can get some info from DMV, if the instance hasn't been restarted in between.

    https://sqlserverperformance.wordpress.com/2010/04/20/a-dmv-a-day-%E2%80%93-day-21/

    ----------------------------------------------------------------------------------------------------------------------------------------------------
    Roshan Joe

    Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: FK and Index

    My thought is same as Phil's. If its a new database start by creating indexes for all FKs. If its a proper normalized design, most of these FKs need to...

    ----------------------------------------------------------------------------------------------------------------------------------------------------
    Roshan Joe

    Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: TempDB usage per active session

    Nice and useful script! Thanks!

    ----------------------------------------------------------------------------------------------------------------------------------------------------
    Roshan Joe

    Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: Copying a complete database.

    john,

    Ben has mentioned from newer to older version. So backup restore wont work for him.

    Ben,

    You can create a generic script but you might need a lot of work in that...

    ----------------------------------------------------------------------------------------------------------------------------------------------------
    Roshan Joe

    Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: writing queries that easily readable

    Grant Fritchey (12/2/2015)


    Glad the book is proving useful. If you are interested in the aspects of the book not covered in the first chapter, database deployment, automation, source control, etc.,...

    ----------------------------------------------------------------------------------------------------------------------------------------------------
    Roshan Joe

    Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help[/url]

Viewing 15 posts - 121 through 135 (of 405 total)