Forum Replies Created

Viewing 15 posts - 4,096 through 4,110 (of 8,731 total)

  • RE: First date of the Month (to date on Range basis)

    Alvin Ramard (9/28/2015)


    Kristen-173977 (9/28/2015)


    Alvin Ramard (9/28/2015)


    Why:

    WHERE YourDateColumn >= @StartDate

    AND YourDateColumn < @DayAfterEndDate

    and not:

    WHERE YourDateColumn...

  • RE: Multiple queries in the same stored procedure

    Tavis Reddick (9/28/2015)


    Luis Cazares (9/28/2015)


    You shouldn't create code based on entities, you should create code based on processes.

    Could you expand on this please? We consider the stored procedures as an...

  • RE: PHP to SQL

    You're welcome. I hope that you learned something with this thread.

  • RE: Multiple queries in the same stored procedure

    With just over 10,000 rows, most things should run fast. Once it keeps growing, that might be an issue. You shouldn't create code based on entities, you should create code...

  • RE: 1st Time?

    Does this calculates the date as you want?

    SELECT somedate, DATEADD( YY, (DATEDIFF( MM, '19000630', somedate)-1)/12, '19010630')

    FROM (VALUES(CAST('20150625' AS datetime)),

    ...

  • RE: Alter Table Add 2 Fields Takes Too Long

    This could be due to page splitting and table size. I'm not sure if rebuilding the clustered index with a lower fill factor could prevent this issue.

  • RE: Today's Random Word!

    Ed Wagner (9/25/2015)


    Brothers

    Mario

  • RE: t-sql 2012 orrder by

    It means that it's comparing the value returned by the subquery to check if it's greater than the value from cw.Inv.

    It also indicates a bad query design, but there's not...

  • RE: t-sql 2012 isnull

    Jason A. Long (9/25/2015)


    wendy elizabeth (9/25/2015)


    In a t-sql 2012 sql, I see the following in a where statement:

    where ISNULL(I.Active, 0) = 1 AND ISNULL(AN.AccountNumber,0) IN (@Account).

    Would you tell me what...

  • RE: t-sql 2012 isnull

    "Give a man a fish and you feed him for a day; teach a man to fish and you feed him for a lifetime."

    Here's the article on Books Online (BOL)....

  • RE: Is there a way to upivot the folllowing table dynamically

    I'm not sure if you're familiar with the method explained in this article: http://www.sqlservercentral.com/articles/CROSS+APPLY+VALUES+UNPIVOT/91234/

    Here's a way to use it and create a dynamic pivot.

    DECLARE @sql nvarchar(max);

    SELECT @sql = 'SELECT SO.[Column...

  • RE: Help me with the SYNTAX for the DELETE statement

    mw112009 (9/25/2015)


    Luis, Yes

    Reason: EXISTS is just a another subquery that runs for each row that was fetched. Subqueries take time.

    The LEFT JOIN will figure out the data set just once...

  • RE: Moving values to fill in nulls.

    danielfountain (9/25/2015)


    Luis Cazares (9/25/2015)


    I'm not sure if this is a good idea:

    However i do think this would work.... VERY slowly though. I keep feeling there is something i am...

  • RE: Oversized Log File

    So you're not doing log backups?

    Either you change your recovery mode to simple or you start taking log backups and managing the transaction log correctly.

    Changing the recovery model to simple...

  • RE: Pivot, NestedPivot, unPivot?

    It seems right to me. Just as a suggestion, whenever you're using more than one table, qualify your columns and use an alias for your tables. This won't change the...

Viewing 15 posts - 4,096 through 4,110 (of 8,731 total)