Forum Replies Created

Viewing 15 posts - 6,181 through 6,195 (of 7,164 total)

  • RE: SQL help

    Have you attempted to write a query yet? Please share what you have done so far.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Using xp_cmdshell to query active directory, global group names are truncated in results

    Elliott Whitlow (6/7/2011)


    On most of my systems I disable xp_cmdshell and don't allow its use..

    +1000

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Stairway to SQL Server Indexes: Step 6, Bookmarks

    Thanks for the great article David!

    From the article:

    Therefore, each row in a database, at any given point in time, can be identified by three numbers; file number - page number...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Create a look up in SQL similar to HLookup in Excel

    I think what you want to do is put your query into a CTE and then when selecting from the CTE add a column to the SELECT list that makes...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Insert loop

    If you go with SSIS consider having it run on one thread, select the data out of TableA in clustered index order and do a sorted-insert into TableB.

    If you have...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: populate 2 column results in a column

    No problem. I just realized something else, because you know up front that both result sets will be unique you can use UNION ALL instead of UNION and save yourself...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Insert loop

    sqluser_8119 (6/8/2011)


    I just need direction on how to commit N rows and move onto the next row without looping to the beginning of the table after the commit.

    Third try...please provide...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: search pattern in select statement

    The worded explanation makes more sense with an accompanying code example 😉

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Insert loop

    Also, please provide the DDL for TableA and TableB.

    I still think your query has a problem...where is the table with alias b?

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: TSQL

    You do not need the USE because I fully-qualifed all the table names. The problem is with the SELECTs at the bottom. Try this version, I added a column to...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Help with SQL PIVOT or CrossTab Query

    Daniel H (6/7/2011)


    Thanks a million!

    I was really close on my own. I knew that I could use a CTE and possibly use the row_number() as an "index". I couldn't...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Help with SQL PIVOT or CrossTab Query

    Nice job posting usable DDL, DML and expected results!

    This should get you there:

    DECLARE @Autos TABLE

    (

    itemid int

    ...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Need How to get the Diagnol elements in the table

    That is one way to do it and it is very nice that you decided against using a loop. I suspect there are hundreds of ways to get the task...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Need How to get the Diagnol elements in the table

    It was a joke, but so are your posts, I thought we were being funny 😛

    Why don't you address ChazMan's thoughts about this not being a real-world scenario?

    If it's homework,...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Need How to get the Diagnol elements in the table

    Here is the answer:

    SELECT 'abcd'

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

Viewing 15 posts - 6,181 through 6,195 (of 7,164 total)