Forum Replies Created

Viewing 15 posts - 421 through 435 (of 1,409 total)

  • RE: fastest way to delete from hugetables

    rajsin7786 (6/23/2014)


    many thanks, table is quite big not sure how do i go about moving data into temp table and then back to original table.

    SELECT *

    INTO #temp_table

    FROM {original_table}

    WHERE {filter on...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: do I need a cte here?

    Tex-166085 (6/23/2014)


    ...I want to show the names of the jobs which have output tasks matching the in conditions in my reports...

    Allthough sample data and desired output would help us much...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: fastest way to delete from hugetables

    - make sure you have the proper index (on date_id), so the query could find the records quickly.

    - delete in batches of 100.000 - 500.000 records (i.e. DELETE TOP (100000)...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: Interesting issue with an Agent job suddenly taking longer...

    Sounds like the amount of data has increased...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: cannot-delete-job-the-delete-statement-conflicted-with-the-foreign-key

    Can you (or did you try to) delete the maintenance plan? As stated in the article:

    Now it is very simple. Just delete the maintenance plan. This maintenance had only one...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: CTE DML

    SqlMel (6/17/2014)


    I actually thought "select distinct * ..." might raise an error.

    I have never used this and wonder why it would even be allowed.

    A "SELECT DISTINCT * ..." is...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: CTE DML

    palotaiarpad (6/17/2014)


    I hate DISTINCT *

    😛

    "hate" is a strong word, but in this QOTD the DISTINCT is absolutely not necessary.

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: Using Union ALL or Union kills performance on a stored proc

    You could execute the first result with "SELECT...INTO #temptable" into a temptable and subsequently adding the results of the 2nd and 3rd query to this temptable. Return the complete temptable...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: Sproc fails to return data to app after a couple of weeks

    Do you get a specific error message or just a time-out of the query?

    Can you look what is going on the SQL instance when the stored proc. fails? Is blocking...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: sql help

    You can change the default database in the properties of the LOGIN you are using. This is the most helpfull way if you only need to access one single database.

    You...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: SQL Server 2014 is very slow

    Perhaps the new cardinal estimator of SQL2014 is not handling your database well. You can change it for a specific query by using a trace flag. Or you can use...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: While Restoring the Log backup getting Error

    I suggest to script out your backup (and restore) command. The easiest way to get this script is to walk through the GUI like you used to do. But instead...

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: While Restoring the Log backup getting Error

    Did you restore the FULL backup with the WITH NORECOVERY or WITH STANDBY option?

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: Converting output from 2 Access databases into 1 SQL query

    AFAIK it is not possible to create a query from one Access database to another. If I read your post correct you try to query the Access databases from SQL....

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • RE: 2005 to 2008 upgrade

    Youll need "sp_help_revlogin" for copying logins on SQL 2000. See http://support.microsoft.com/kb/918992

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **

Viewing 15 posts - 421 through 435 (of 1,409 total)