Forum Replies Created

Viewing 15 posts - 346 through 360 (of 2,452 total)

  • RE: Help with matching contacts to organisations

    deleted

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Help with matching contacts to organisations

    seems we are a bit confused between ourselves

    USE tempdb

    GO

    CREATE TABLE [dbo].[masterContacts](

    [Organisation Name] [nvarchar](255) NULL,

    [Office Address Line 1] [nvarchar](255) NULL,

    [Office Address Line 2] [nvarchar](255) NULL,

    [Office Address Line 3] [nvarchar](255) NULL,

    [OfficeMailing City]...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Help with matching contacts to organisations

    this should be easy to help you...but the sample data isnt doing what you want.

    your sample data:

    USE tempdb

    GO

    CREATE TABLE [dbo].[masterContacts](

    [Organisation Name] [nvarchar](255) NULL,

    [Office Address Line 1] [nvarchar](255) NULL,

    [Office Address Line...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Help with matching contacts to organisations

    me thinks that part of your problem is that you are expecting an exact match on O.[Organisation Name] = M.[Mailing Address Line 1]

    what happens if you change

    inner join cteMaster M...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Help with matching contacts to organisations

    harleen5102 (9/23/2016)


    J Livingston SQL (9/23/2016)


    ok...thanks for data....didnt realise it was in public domain......nice to know that it is.

    looking at your dummy data....dont see that you have any data there that...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Help with matching contacts to organisations

    ok...thanks for data....didnt realise it was in public domain......nice to know that it is.

    looking at your dummy data....dont see that you have any data there that is going to demonstrate...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Help with matching contacts to organisations

    are you sure you should have posted that information on a public forum?

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Find next date after a given date

    Luis Cazares (9/22/2016)


    Here's an option:

    SELECT *

    FROM #NoShow ns

    OUTER APPLY( SELECT TOP 1 fa.ApptDt

    FROM #FutureAppts fa

    ...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Msg 245, Level 16, State 1, Line 2 Conversion failed when converting the varchar value 'F' to data type int.

    not sure at all what you are trying to do.......maybe the OP can explain.

    heres some set up and OP code reformatted with results

    CREATE TABLE #sometable(

    ID_NUM ...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Is there a better faster way then REPLACE in this example?

    I am just being curious.....

    OP said

    ....

    I have 2 tables and I am attempting to match models. (they are described differently in both tables).

    IPHONE 6S ROSE 64GB SGL vs IPHONE 6S...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Is there a better faster way then REPLACE in this example?

    Sergiy's suggestion looks good but does not give provide for order of extracted words...

    so 'IPHONE 64GB ROSE 6S SGL' will not be an exact match for 'IPHONE 6S ROSE 64GB...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: finding max value between dates

    astrid 69000 (9/22/2016)


    and yes, i check my previous post and still dont know how to post a table as a table here and not as code :doze:

    do you mean like...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: how to make a query for series of records ?

    gentong.bocor (9/22/2016)


    J Livingston SQL (9/22/2016)


    gentong.bocor (9/22/2016)


    ok..

    i give u temporary table for u try..

    CREATE TABLE #tamp

    ( WeekNo INT, FromDate SMALLDATETIME, ThruDate SMALLDATETIME, Period VARCHAR(6) )

    INSERT INTO #tamp VALUES (36,'2016-08-29','2016-09-04','201609')

    INSERT INTO #tamp...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: how to make a query for series of records ?

    gentong.bocor (9/22/2016)


    ok..

    i give u temporary table for u try..

    CREATE TABLE #tamp

    ( WeekNo INT, FromDate SMALLDATETIME, ThruDate SMALLDATETIME, Period VARCHAR(6) )

    INSERT INTO #tamp VALUES (36,'2016-08-29','2016-09-04','201609')

    INSERT INTO #tamp VALUES (37,'2016-09-05','2016-09-11','201609')

    INSERT INTO #tamp...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Want to learn SQL

    some good articles here on this site.....

    http://www.sqlservercentral.com/stairway/

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

Viewing 15 posts - 346 through 360 (of 2,452 total)