Forum Replies Created

Viewing 15 posts - 1 through 15 (of 19 total)

  • RE: Remove duplicate record based on criteria

    John Mitchell-245523 - Wednesday, January 31, 2018 8:34 AM

    Yes, or this, which is very similar.  It relies on Red and Green being...

  • RE: Remove duplicate record based on criteria

    Luis,
    Thanks so much for the 2 options, I can't use the 2nd option because I was convinced I was connecting to a 2016 instance but just now found out...

  • RE: Remove duplicate record based on criteria

    pietlinden, thank you very much for the reply, this will lead me in the right direction, appreciate your time.

    Regards,
    Michael

  • RE: Date gaps between date spans

    Alan and Eirikur thank you so much for the help, really appreciate it.

    Below has giving me exactly what I need.

    Thanks again.

    Michael

    ;WITH BASE_DATA AS

    (

    SELECT

    ...

  • RE: Date gaps between date spans

    Hi All,

    Edit - please ignore this post - apologies for confusion.

    Sorry, for some reason when I hit preview it posted and when editing the post, I get no option to...

  • RE: Dump data from .txt file into SQL Table using Bulk Insert.

    Does it have to be bulk insert? An easy, quick way is using he import wizard in SSMS (right click on the database, Tasks\Import Data).

    Otherwise, here is the bulk insert...

  • RE: 'for xml path' - trying to get to understand it.

    Drew,

    Thank you so much, it's already much more clearer with your help - the formatted\layout syntax really helps. This is an excellent starting point.

    Appreciate your time.

    Michael

  • RE: Mid result in ssrs

    elamranii (3/3/2016)


    Hi,

    I am trying to retrieve a number from a field where it's between = and =

    I have tried mid

    =mid(Fields!PRE_LAB_VAL.Value,4,4)

    but not working

    PRE_LAB_VAL --------------------------Result

    PT=45.7=02/07/2002-----------------45.7

    RTS=51=02/07/2002------------------51

    RT=26=02/07/2002--------------------26

    Thank you

    This link should help you.

  • RE: Check if date ranges overlap

    Orlando Colamatteo (2/11/2016)


    Posting back to a similar problem/topic:

    http://www.sqlservercentral.com/Forums/Topic1760478-3412-1.aspx

    Thanks for this Orlando.

    Michael

  • RE: Return unique rows

    TheSQLGuru (2/11/2016)


    micang (2/11/2016)


    SQL 2008 R2

    Hi All,

    If I have a query like so:

    select contractno, Address1,dateJoined,DateLastTrans

    from tableTest

    where datejoined between 2012-12-01 and 2015-12-31

    and my results are:

    Contractno,address1,datejoined,dateLastTrans

    387, johnroad, 2013-06-01,2016-01-25

    267, bobroad, 2015-12-01,2016-01-25

    267, bobroad, 2015-12-01,2015-12-28

    578,...

  • RE: Convert date to MMDDYYYY

    Thank you for the heads up about the FORMAT function and performance of it, appreciate it.

    Michael

  • RE: Check if date ranges overlap

    Erik and Hugo,

    Thank you so much for your help, the queries are brilliant and have helped me identify erroneous records.

    Unfortunately I only have read only access to the tables in...

  • RE: Check if date ranges overlap

    Hi All,

    Thank yo so much for your input.

    Below is script for sample data. For the output I need to identify the member number of overlapping records so that the relevant...

  • RE: Convert date to MMDDYYYY

    Orlando Colamatteo (2/9/2016)


    The performance of FORMAT is very poor when used over large sets of data which is unfortunate because the syntax is more readable than any of the other...

  • RE: Convert date to MMDDYYYY

    ScottPletcher (2/9/2016)


    Yeah, should be good, except that I'd use varchar instead of char so that you don't have trailing spaces after the /s are replaced.

    Thanks, I will change to varchar,...

Viewing 15 posts - 1 through 15 (of 19 total)