Forum Replies Created

Viewing 15 posts - 2,416 through 2,430 (of 3,544 total)

  • RE: How can i do to comparate the differences between tables?

    I guess by your post that you want to check the table structures not the data. The comparison will depend on column sequence.

    select c.*

    from sysobjects o

    inner join syscolumns...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Finding Stored procedures being used

    Well Kenneth says it all

    Looking at the code is the only surest way. What I would do is script all the procs into...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: is there someone that got some script to script out the SP,Jobs and dts?

    quoteIs there any way of getting the list of the DTS in a server?

    SELECT * FROM msdb.dbo.sysdtspackages...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Where clause on vertical Name/Value pair tables

    Ryan beat me to it, however I would write the query as one, thus

    SELECT ProductID

    FROM tblProductAttributeValues

    WHERE av.Active = 1 AND

    ((AttributeID = 5 AND AttributeValue like  '%gold%') OR

     (AttributeID...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Tough Query

    Not sure if this of any use, but it should show the first of 3 consecutive dates that are Mon-Fri. This is written off the top of my head with...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Search for partial credit card number

    Using

    CardNumber LIKE '%1234'

    or

    RIGHT(CardNumber,4) = '1234'

    will at best do an Index Scan

    The only way I can see to achieve an Index Seek to do like Frank's suggestion, a slight variation

    CREATE TABLE...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Question of the Day for 10 Jan 2005

    quoteTry coming up with another excuse to explain how this question is valid.

    Don't need an excuse, depends...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: cummulative sum

    Yes true Frank, the order cannot be guaranteed. However all the times I have done this sql has always updated in order of the rows in the heap but as...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: convert varchar to int

    Or

    SELECT CAST(FLOOR(Qty) AS int)

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Getting Null Value

    Also use SUM(ISNULL(Qty,0))

    to avoid the

    Warning: Null value is eliminated by an aggregate or other SET operation.

    message

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Tree Hierarchy in SQL 2000

    Depends on what output you want. To do extract of this type, I use temp tables using the logic as follows (create temp tables with structure required)

    Insert into Temp1 from...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Question of the Day for 10 Jan 2005

    The question asked what is 'not a valid action' dependancies is not an action it is a parameter applied using an action.

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: cummulative sum

    OK, OK, how about this then

    declare @sum int

    set @sum = 0

    update

    set @sum = [col b] = @sum + [col a]

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Using COUNT in an UPDATE statement

    Do you mean like this

    UPDATE A

    SET A.EntryCntManual = B.EntryCntManual,

        A.EntryDolManual = B.EntryDolManual,

        A.EntryCntSwipe = B.EntryCntSwipe,

        A.EntryDolSwipe = B.EntryDolSwipe,

        A.EntryCntPerc = B.EntryCntPerc,

        A.EntryDolPerc = B.EntryDolPerc

    FROM...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: ORDER BY varchar data type

    hey come on frank, stop stirring it

    That combination was not asked for