Forum Replies Created

Viewing 15 posts - 1,591 through 1,605 (of 2,007 total)

  • RE: Are the posted questions getting worse?

    Steve Jones - SSC Editor (8/15/2011)


    Stefan Krzywicki (8/15/2011)


    He doesn't like tech and doesn't even know how to use Excel. He thinks he'll get enough money to live like a king.

    I...

  • RE: Looking for tables with no data

    Something like this would do it: -

    SELECT sub.tableName FROM

    (SELECT tableName = sysob.name, numberOfRows = MAX(sysind.rows)

    FROM sysobjects sysob, sysindexes sysind

    WHERE sysob.xtype = 'U' AND sysind.id = OBJECT_ID(sysob.name)...

  • RE: Please help this query

    Please read this --> http://www.sqlservercentral.com/articles/Best+Practices/61537/%5B/url%5D

    Then come back, post some readily consumable test data, what your current output looks like from the sample data and what your requirement is from the...

  • RE: Seconds To Time

    ariel_mlk (8/11/2011)


    skcadavre (8/11/2011)


    This is a presentation layer task, not a database task. What you should do is output the seconds to the presentation layer and format it there.

    It is said...

  • RE: Seconds To Time

    Ninja's_RGR'us (8/11/2011)


    It's called touch-typing.

    You might try it someday :hehe:.

    P.S. Totally agree that this should be done at the presentation layer. Just getting tired of saying that ;-).

    lol, touch typing?...

  • RE: Seconds To Time

    This is a presentation layer task, not a database task. What you should do is output the seconds to the presentation layer and format it there.

    That being said, try this:...

  • RE: Very cool problem -- with Dymamic SQL, Backups/Restores, and variables (maybe)

    bopeavy (8/10/2011)


    You could try osql or bcp. You would just need to put your results into a table to output.

    --osql.

    declare @cmd varchar(1000)

    select @cmd = 'osql -U -P -S -Q"select...

  • RE: How Far Will You Go (To Work)?

    In my previous job, I used to commute 2 and a half hours each way - when the traffic was exceptionally good! I used to set off at around 5am...

  • RE: query datetime column

    shank-130731 (8/10/2011)


    My pain continues. If I have to change the WHERE clause if searching either year or month, I figured CASE in the WHERE clause would be the way to...

  • RE: query datetime column

    shank-130731 (8/10/2011)


    I have a drop down that's populated from a recordset that I create. Below is the data. The [Abbrev] field is submitted.

    Abbrev - Descrip

    2010 - Last Year

    2011 - This...

  • RE: Very cool problem -- with Dymamic SQL, Backups/Restores, and variables (maybe)

    Ninja's_RGR'us (8/10/2011)


    How can that possibly work with a local temp table (seriously asking)?

    Indeed, my bad. Either would need a staging table or to sit the entire script where I entered...

  • RE: query datetime column

    shank-130731 (8/10/2011)


    DECLARE @ETD datetime

    SET @ETD = '2011'

    SELECT ETD

    FROM IXT_OceanShipments

    WHERE (ETD >= @ETD)

    ORDER BY ETD

    As predicted by Jeff, I ran into problems as we increased records. Formalities: SQL2005. ETD is formatted...

  • RE: Help with a sql query

    ChrisM@Work (8/10/2011)


    skcadavre (8/10/2011)


    ...

    Beaten to the punch! Teach me for leaving a window open while doing work, then returning to it without refreshing! 😉

    Makes a change from lightning-fast Remi 😉

    Yes it...

  • RE: Very cool problem -- with Dymamic SQL, Backups/Restores, and variables (maybe)

    jpSQLDude (8/10/2011)


    --This is what I really want to do, save the string to a text file (I just can't get the string into the variable!)...

    The reason you can't set the...

  • RE: Help with a sql query

    There are probably many ways to improve on this, it's not really something I've ever envisioned needing to do. But, using dynamic SQL, it could be achieved like this: -

    --Sample...

Viewing 15 posts - 1,591 through 1,605 (of 2,007 total)