Forum Replies Created

Viewing 15 posts - 511 through 525 (of 598 total)

  • RE: Query Fields with the latest timestamp for each item

    This should work:

    SELECT     IPaddress, Username, MAC, LastSeen, DiscoveryDate, ComputerName

    FROM         dbo.IPsweep_Historical ih

    INNER JOIN

                              (SELECT     ComputerName, MAX(lastseen) as MaxLast

                                FROM          IPsweep_Historical

                                GROUP BY ComputerName) ml

    ON ih.ComputerName = ml.ComputerName

    AND ih.LastSeen = ml.MaxLast

    ORDER BY...

  • RE: cant dts up flat file due to date column

    Look at how the null values are represented in the flat file. 

    You'll probably have to make the data pump a VB script which checks the value of that particular...

  • RE: Decimal Places

    Played around a bit more and realized that the above will cause rounding.

    Here's another way that eliminates the CASE statement and doesn't round:

    select  LEFT(

                cast(DecVal as varchar(30)),

                CHARINDEX('.',cast(DecVal as...

  • RE: Decimal Places

    This isn't great, but it works:

    create table #tmp

    (DecVal Decimal(10,6),

    DecLen int)

    insert into #tmp values (99.5555, 2)

    insert into #tmp values (99.5555, 1)

    insert into #tmp values (99.5555, 3)

    select

     case DecLen

        when 1...

  • RE: What Would Keep You?

    Excellent health care (including vision, dental and "alternative")benefits

    Access to education / training (including fees paid and paid time)

    Flexible schedule

    And definitely, more time off.

  • RE: Anyone knew operator *=?

    I doubt it.

    What happens if you re-run the left outer join query?  It could be a statistics / query optimization issue.  What do the two query plans look like?

  • RE: Anyone knew operator *=?

    Look at the where clause.  Is there a clause for the left-joined table?

    like this...

    select blah

    from table1 t1, table2 t2

    where

    t1.pk *= t2.fk

    and

    t2.val1 = @value

    If so, try this:

    select blah

    from table1 t1

    Left outer...

  • RE: Anyone knew operator *=?

    Yes, this is a non-ANSI version of a left outer join.

    =* would be right outer join.

  • RE: Outsourced = Laid Off?

    Does anyone else see the irony in Steve posting this editorial within just a few days of the "Wages on the Rise" article?

    That just struck me this morning.

  • RE: Wages on the Rise

    It's not necessarily a matter of time, satz.  For me, it's a matter of picking and choosing my jobs, taking short-term contracts, taking on new tasks at my job and...

  • RE: My query is just too slow - Please help

    Without seeing the actual query and DDL, we can't be of much help.  A query plan would be really helpful as well.

  • RE: My query is just too slow - Please help

    alzdba - That re-working of the query could potentially produce different results.  Also, for the OP, it might be faster.  See this article for a discussion of this:

    http://www.sqlservercentral.com/columnists/sjones/outerjointrouble.asp

    Julie, that...

  • RE: Tranfer data into text file

    This is what I could find on that:

    http://blogs.msdn.com/sql_protocols/archive/2005/12/19/505372.aspx

    Best guess from where I'm sitting is to make sure the source file exists and that the destination directory(FileSystemObject.FolderExists&nbsp

  • RE: Tranfer data into text file

    What is the error?

    Do those directories exist?

    As far as including the date, you'd need the ActiveX equivalent of getdate() (which I believe is Now()), cast to a string and add...

  • RE: Tranfer data into text file

    FileSystemObject is what you want to look at.

    Have a look at this:

    http://www.sqldts.com/default.aspx?292

Viewing 15 posts - 511 through 525 (of 598 total)