Forum Replies Created

Viewing 15 posts - 46 through 60 (of 422 total)

  • RE: Virtual tally table function

    While developing this function several alternative versions were suggested and tested. Each version seems to have its pros and cons. The posted version limits the lower-bound to > 0. To...

  • RE: Sql server query help

    Yeah, I suppose I can over-complicate things at times. 😛

    There's so many ways to do this stuff that it's easy to get lost in the pursuit.

     

  • RE: Sql server query help

    I think this would still work for you. But the important point is to take a look at the article link I posted and learn how to use DelimitedSplit8K. That...

  • RE: Sql server query help

    See http://www.sqlservercentral.com/articles/Tally+Table/72993/[/url]

    to get the code and explanation for use of the DelimitedSplit8K function.

    ;WITH SampleData (ID,PartNumber)

    AS

    (

    SELECT 1,'BR643-0034-344-34' UNION...

  • RE: Date Validations?

    --this date MAY or MAY NOT be valid depending on the DATEFORMAT setting

    SELECT ISDATE('29-12-2013')

    --this is never valid (out-of-range)

    SELECT ISDATE('32-12-2013')

    --this should always be valid in all formats

    SELECT ISDATE('2013-01-08 15:44:12.208')

    --this...

  • RE: Date Validations?

    ISDATE may give different results depending on the datetime datatype (DATE vs DATETIME vs DATETIME2, etc.). The best and surest method to validate a date-like string as a date is...

  • RE: Formatting Dates with 3 Character Months (SQL Spackle)

    Jeff, I'm glad this discussion was resurrected since I missed it the first time around. I too was not aware of the sys.syslanguages table! There have been a few occasions...

  • RE: Tell me if I'm crazy - Recursive CTE + View (Materialized, indexed?)

    Maybe this link will help.

    http://www.sqlservercentral.com/articles/Hierarchy/94040/[/url]

     

  • RE: Table Join on three columns

    An alternative solution...

    ;WITH cteJune ([level],[SthdiCode],[FunctionalArea],[Qty])

    AS

    (

    SELECT '01','G22','Area1',5 UNION ALL

    ...

  • RE: using between on string columns

    You can pad the string values for proper sorting using the REPLICATE operator.

    For example:

    DECLARE @val VARCHAR(10)

    SET @val = '2609'

    DECLARE @t...

  • RE: Identity property

    You can't do it directly with any ALTER statement that I know of.

    But you can do something like this even if it is a bit convoluted:

    -- Test data

    IF OBJECT_ID('tempdb..#TempTable')...

  • RE: Sum Negative Numbers

    Well, I'm not sure if these totals are correct but here's another stab at it...I made some significant additions to the opening balance columns (actually one for each year). It's...

  • RE: Selecting records in table only when ALL related records in other table satisfy multiple conditions

    A simple join seems to do the trick as well. It seems that I get TWO orders that meet the required condition though. Maybe you are just looking for the...

  • RE: Not your usual documentation question

    This might be a good suite of products to look into. Very solid and professional and used by many large enterprises with hundreds of servers. Free trial downloads available and...

  • RE: SSIS Export to Flat File Question

    elee1969 (7/17/2013)


    sdevanny (7/17/2013)


    If you used my suggestion with a dervied column, you might want to double check and make sure that you have a correct count of delimiters and columns...

Viewing 15 posts - 46 through 60 (of 422 total)