Forum Replies Created

Viewing 15 posts - 16 through 30 (of 859 total)

  • RE: delete a large amount of rows in a table

    Since you have multiple tables using the same exclusion data set i would create a work table with that data set and index it, then use a LEFT JOIN tbl...

  • RE: delete a large amount of rows in a table

    thats what i mean by sub query.

    However how many rows are in the logging table and what indexes there are will affect this a lot. Also is End_Time a...

  • RE: delete a large amount of rows in a table

    it should.

    How many rows are in [LOGGING_01_DBF].[dbo].[LOG_LOGIN_TBL]?

    Your sub query could be causing the issue if there are only 133k rows in [CHARACTER_01_DBF].[dbo].SKILLINFLUENCE_TBL and its taking hours.

    if the...

  • RE: delete a large amount of rows in a table

    insanityflyff (2/27/2013)


    133.723 rows total and i wanna keep 77.646

    i wanna delete the custom amount according to the query u see above but i tried to run a count for the...

  • RE: delete a large amount of rows in a table

    What percentage of the rows are you keeping and how many rows are there in the tables?

    At some point its easier just to loop a delete statement depending on how...

  • RE: t-sql update trigger

    Can you post the DDL for the tables and a couple of sample rows and what you would like inserted into the logging table?

    This information will help when writing the...

  • RE: Can DatabaseMail attach a formatted Excel file

    foxxo (2/6/2013)


    You need a tab delimited file for excel to recognise it and the file extension needs to be .csv (.xls will work but will display an error first).

    eg.

    DECLARE @query_result_separator...

  • RE: Order of JOIN in multiple table joins

    Eugene Elutin (1/28/2013)


    purushottam2 (1/28/2013)


    Yes, Because in one of my query, i am joining with 3 tables. And table 1 have the 1 million record, 2 Lakh and table3 have 10...

  • RE: Help on how to count guests in hotel every day

    dwain.c (1/27/2013)


    I think you need a calendar table to do this:

    CREATE TABLE #Guests (checkin date, checkout date, FullName varchar(50))

    INSERT INTO #Guests

    SELECT '10/12/2012', '10/16/2012', 'Corky Doe' UNION ALL

    SELECT '12/12/2012', '12/17/2012', 'Janice...

  • RE: creating SQL login with cursor

    Bhuvnesh (1/9/2013)


    paul 77096 (1/9/2013)


    Thats Brilliant, it worked like a dream.

    in future try to avoid cursors instead use loop or set based approach. why ???? google it 🙂

    Cursors VS Loops...

  • RE: Odd table sizes

    Mick Opalak (1/8/2013)


    That was it. This table is a heap.

    Thanks for the help.

    Did you add a clustered index or resolve it in some way or do you now need...

  • RE: Odd table sizes

    Mick Opalak (1/7/2013)


    I verified the row counts using COUNT(*) and they match, as I would expect. However, the publisher has a much larger data size.

    Is there a clustered index...

  • RE: NULL VALUES

    Personally i would rather "Store" the null value than "N/A" as i can save space and if its a numeric field dont have to make any thing special. I...

  • RE: Was the "Commands Completed Successfully" message replaced by "Row(s) affected"?

    GilaMonster (12/13/2012)


    Someone's set up a DDL trigger and forgot to SET NOCOUNT ON in it.

    this is my thoughts as well. when we deal with a table that has a trigger...

  • RE: Simular to PIVOT Table, but not

    CELKO (12/12/2012)


    That is not how the relational model works. A table is a set whose attributes are fully known at schema creation time. Elephants do not fall out of the...

Viewing 15 posts - 16 through 30 (of 859 total)