Forum Replies Created

Viewing 15 posts - 376 through 390 (of 626 total)

  • RE: Mainenance cleanup task is not working properly

    Provided you have permission to the remote folder (check your logs); what file extension did you specify? It needs to match the files you intend to delete. Also...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: How many items will be in sentence?

    Just to illustrate...

    USE [AdventureWorks2012]

    --Using IN

    SELECT

    *

    FROM

    [Production].[ProductInventory]

    WHERE

    LocationID IN (1, 6, 50)

    --Using a Join

    DECLARE @test TABLE (LocationID INT)

    INSERT INTO @test

    VALUES (1), (6), (50)

    SELECT

    p.*

    FROM

    [Production].[ProductInventory] p

    JOIN @test t ON t.LocationID = p.LocationID


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: Statements that are true only if all conditions exist

    cory.bullard76 (3/8/2016)


    That worked....thanks!

    You're welcome!


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: Statements that are true only if all conditions exist

    Just need to tweak your logic...

    DECLARE @myTable TABLE (ID INT, Cost1 NUMERIC(4,2), Cost2 NUMERIC(4,2), Cost3 NUMERIC(4,2), Cost4 NUMERIC(4,2))

    INSERT INTO @myTable

    VALUES (1122, 14.00, 0.00, 50.00, 25.00), (1133, 75.00, 32.00, 1.00, 0.00),...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: Are the posted questions getting worse?

    Why have I waited so long to start using snippets? :pinch:

    It was probably the part that said 'Create an XML...' and I stopped there and said screw that. In...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: In a heap..

    terry999 (3/8/2016)


    yb751 (3/8/2016)


    Is it a wide table?

    Positively obese

    Ok, that made me laugh. :hehe:

    That being said I would not recommend it in that case.


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: please help to convert column to row in sql

    You got yourself into trouble because your table isn't normalized. This is just a bad way of storing data. Now assuming you had a unique ID per person...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: In a heap..

    Is it a wide table? If not you could try including all columns on your non-clustered index. This would avoid key lookups and act similar to a clustered...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: Left Join with Case statement on String columns

    This is not an answer to your question but that doesn't mean I'm not trying to help. Consider the code below. This is an example on how to...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: SQL query

    Almost got this one wrong, until I remembered COUNT(*) includes NULLs.

    Good reminder!


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: programming within SELECT statement

    It's also worth noting that using SET vs SELECT when assigning a variable will work similarly but have important differences.

    Here is some code to illustrate:

    --Declare a simple table and add...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: Why is a Table Scanned and Read So Much More than Others

    souLTower (3/3/2016)


    Yes, the index supports the query. Unfortunately the example is too far in the weeds to send an execution plan. It's just a curiosity.

    On a related note,...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: Index Query

    If you truly want to understand indexes this is an excellent read. http://www.sqlservercentral.com/stairway/72399/


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: To know the status of the query

    A CXPACKET wait is basically waiting on a parallel thread(s) to finish. In of itself it isn't that concerning.

    Try this...

    SELECT * FROM sys.dm_exec_requests WHERE session_id = your spid here

    One of...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: Are the posted questions getting worse?

    For film buffs out there I highly recommend 'Ex Machina'. Recently watched it on Netflix and it blew me away. I'm so rarely impressed by movies anymore...maybe I'm...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

Viewing 15 posts - 376 through 390 (of 626 total)