Forum Replies Created

Viewing 15 posts - 1,396 through 1,410 (of 2,007 total)

  • RE: Format date time

    adonetok (11/7/2011)


    I need to format datetime as below:

    01/12/2011 09:28:22 AM

    How to code it?

    You do not need to format a datetime in SQL, it's a presentation layer task.

    If you insist, it...

  • RE: Offsetting Transaction Values

    rka (11/7/2011)


    Suppose I have a transaction record like:

    TransactionID LedgerID Period Amount Paid

    1 ...

  • RE: converting to INT from varchar

    Another method: -

    --Standard TestEnvironment of 1,000,000 rows of random-ish data

    IF object_id('tempdb..#testEnvironment') IS NOT NULL

    BEGIN

    DROP TABLE #testEnvironment

    END

    --1,000,000 Random rows of data

    SELECT TOP 1000000 IDENTITY(INT,1,1) AS ID,

    RAND(CHECKSUM(NEWID())) * 30000 + CAST('1945'...

  • RE: converting to INT from varchar

    whole (11/4/2011)


    Hi, i have one of the parameter of my procedure as @Stores as varchar(2000) = null,

    which gets values like 325,785,5698 as inputs..

    now i need to query it against STORES...

  • RE: Today's Random Word!

    SQLRNNR (11/4/2011)


    Flash Beagle

    mmmmmm, Bagel

  • RE: Today's Random Word!

    SQLRNNR (11/4/2011)


    crookj (11/4/2011)


    Daniel Bowlin (11/4/2011)


    Revenant (11/3/2011)


    SQLRNNR (11/3/2011)


    L' Eomot Inversé (11/3/2011)


    SQLRNNR (11/3/2011)


    Daniel Bowlin (11/3/2011)


    Smörgåsbord

    Boardwalk

    Walkout

    Sit-in

    Teach-in

    1960s ( Does anyone else have the feeling that this decade is going to be a mirror...

  • RE: Checking my work

    Amy.G (11/2/2011)


    Occationally, my boss will ask me to do a data query. Sometimes I am so pleased with myself that I did it so quickly that I just fire the...

  • RE: Searching smallest unused number

    TheSQLGuru (11/4/2011)


    Hmm, I wonder how these set of tests will fare if the minimum open value is something like 500M, or 1.8B. Can you set up a test for...

  • RE: Select the document name from a column contaning full path and file name

    Steve Kinnaman (11/4/2011)


    Both your suggestions worked! Than You!!

    Could you help me with the next issue: I would like the full path in one column AS Path and the document name...

  • RE: Are the posted questions getting worse?

    SQL Kiwi (11/4/2011)


    Yes - though it's the explanation of why it depends, what it depends on, and what it means in practice that matters.

    GilaMonster (11/4/2011)


    The answer is never just 'It...

  • RE: Are the posted questions getting worse?

    Brandie Tarvin (11/4/2011)


    SQL Kiwi (11/4/2011)


    So, it depends

    Someone so needs to come up with an interview question where this is the exact answer that's needed.

    @=)

    Isn't that pretty much every interview question...

  • RE: Select the document name from a column contaning full path and file name

    Another way: -

    SELECT SUBSTRING([Document_and_path],length-(fromEnd-2),length)

    FROM (SELECT CHARINDEX('\',REVERSE([Document_and_path])) AS fromEnd,

    LEN([Document_and_path]) AS length, [Document_and_path]

    FROM #testEnvironment) a

  • RE: Select the document name from a column contaning full path and file name

    Steve Kinnaman (11/4/2011)


    I need to select the file name from a column in a database containing the full path and file name. What I want is to select all from...

  • RE: Comparison between two tables

    Lowell (11/4/2011)


    Cadavre I love how you add the million row test harnesses to your examples...

    I may start adding that to some of my posts as well in the future.

    Thanks...

  • RE: Comparison between two tables

    Lowell (11/4/2011)


    mikes84 (11/4/2011)[hrLowell,

    So are you saying that this type of comparison, row over row (as in the EXCEPT clause and my second example):

    Table 1 fields

    -------------

    Table 2 fields

    is usually better than...

Viewing 15 posts - 1,396 through 1,410 (of 2,007 total)