Forum Replies Created

Viewing 15 posts - 2,626 through 2,640 (of 7,187 total)

  • RE: rewrite a query

    Hadrian

    There's no correlated subquery there, is there? Do you get an error message when you attempt to create the view?

    John

  • RE: index size greater than 2GB

    Hadrian

    Check that the indexes are actually being used, and that they're being maintained properly. Indexes that size are not a problem in themselves. Indeed, you may find performance...

  • RE: Insert values into single record

    Yes, it does seem a strange requirement. But why would you want to use a loop, anyway?

    INSERT INTO MyTable (Empid,empname,D1,D2, D3,...,D30)

    VALUES (1,'asd',2,2,1,...,<Val30>)

    John

  • RE: Find column values based on min and max of other columns

    Or this - probably more efficient since it only involves a single scan:

    SELECT DISTINCT

    ID

    ,IDDATE

    ,FIRST_VALUE(FROMID) OVER (PARTITION BY ID, IDDATE ORDER BY JID) AS FROMID

    ,FIRST_VALUE(TOID) OVER (PARTITION BY ID, IDDATE ORDER...

  • RE: Disable SQL Login vs deleting an SQL DB User

    I think I've seen jobs failing after owner logins have been deleted. But it's easy to test - why don't you try it and let us know how it...

  • RE: Passing table name as parameter into SP

    You need to cast @NumRows as a character data type. At the moment, since it's int, it's attempting to add instead of concatenate.

    John

  • RE: Trigger - Display Updated Fileds

    Join the Inserted and Deleted virtual tables, and then you can do a comparison between the old and new values.

    John

  • RE: SQL Server Memory Configuration calculation

    Yes. Windows and any other processes you have on the server - other SQL Server components, for example.

    John

  • RE: SORT_IN_TEMPDB ON as default

    Maybe they decided that if they allow users to set such a default, too many people would end up blowing tempdb when they do their index maintenance. I think...

  • RE: SORT_IN_TEMPDB ON as default

    Not as far as I know. It's a property of the create or rebuild operation, not of the index itself. Therefore there wouldn't be a lot of point...

  • RE: sql query issue

    Craig, I know this doesn't answer your question, but if you have any influence over the structure of your database, please do not use this Entity - Attribute - Value...

  • RE: Sum with Isnull

    Steve Jones - SSC Editor (4/26/2016)


    Phil Parkin (4/26/2016)


    As a general rule, it's better to put IsNulls inside Sums rather than outside. This avoids the warning message about NULL values being...

  • RE: SQL Server Memory is Full (Urgent help!)

    info.sqldbamail (4/26/2016)


    Thanks for your answer, one last question i would like to know is, if SQL Server like to consume whole available memory then why it is not consuming whole...

  • RE: Just fetches one record in 10 lakhs

    I assume that the ID columns in PolicyAudit and Systems are unique? If so, you're only going to get one row because you're joining on them to the single-row...

  • RE: Disable SQL Login vs deleting an SQL DB User

    Remove them first. Nobody wants orphaned users in their database. It shouldn't be too difficult to write a script that will take the login name, go to all...

Viewing 15 posts - 2,626 through 2,640 (of 7,187 total)