Forum Replies Created

Viewing 15 posts - 31 through 45 (of 616 total)

  • RE: SELECT * INTO TABLE

    hoseam (2/7/2014)


    I have this code

    select *

    INTO Hosea_tempTable

    from Hosea_tblDATA_Product_Reports

    and I get this error;

    There is already an object named 'Hosea_tempTable' in the database

    Yes, that's because SELECT INTO attempts...

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

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn

  • RE: Oddball Interview Questions

    Had an interview on Monday morning which I thought went quite well until the last two questions:

    1) Where do you see yourself in 5 years time?

    2) Your salary expectations for...

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

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn

  • RE: SELECT * INTO TABLE

    If the target table already exists then you would need to use INSERT INTO

    I always prefer to list the column names in my INSERT INTO and SELECT statements, however you...

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

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn

  • RE: Query just hangs!

    ChrisM@Work (1/28/2014)


    Gail's suggestion using DENSE_RANK() is well worth a try when you get time.

    Is it?

    So what happens if I have two records with the same Organisationname but the address1 of...

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

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn

  • RE: Query just hangs!

    Jeff Moden (1/27/2014)


    I haven't checked for all of the columns but the original query had a "Hierarchy" column in it, which is missing from the test data. Considering that...

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

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn

  • RE: Query just hangs!

    GilaMonster (1/28/2014)


    Abu Dina (1/28/2014)


    David Webb-CDS (1/27/2014)


    I'm afraid you're asking for code that would make these two:

    21ST CENTURY SERIVES

    21ST CENTURY SERVICES

    equal, not because they are, but because they SHOULD be. ...

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

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn

  • RE: Query just hangs!

    ChrisM@Work (1/27/2014)


    Check the actual plan of each to ensure you're getting an index scan on one side and seeks on the other and check the nested loops join operator carefully...

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

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn

  • RE: Query just hangs!

    David Webb-CDS (1/27/2014)


    I'm afraid you're asking for code that would make these two:

    21ST CENTURY SERIVES

    21ST CENTURY SERVICES

    equal, not because they are, but because they SHOULD be. Is that true?...

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

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn

  • RE: Query just hangs!

    TheSQLGuru (1/27/2014)


    We asked specifically (several times) for your expected OUTPUT too.

    In particular, I am unclear on this statement:

    and your task is to add a new column...

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

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn

  • RE: Query just hangs!

    As requested, sample data below:

    The goal is to dedupe the list of 200 records at Site level. A site being company + address.

    I look forward to see how you guys...

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

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn

  • RE: Get Distinct Value from each column in a Table

    Another way is to copy the run the contents of the below SELECT statement:

    SELECT 'SELECT DISTINCT [' + COLUMN_NAME + '] FROM ' + TABLE_NAME

    FROM INFORMATION_SCHEMA.COLUMNS

    WHERE TABLE_NAME...

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

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn

  • RE: Query just hangs!

    ChrisM@Work (1/27/2014)


    They're very narrow triangles - having dealt with this in the near past. Nevertheless, with two of them ORred together, the optimiser will likely choke. Try splitting them up...

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

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn

  • RE: Query just hangs!

    GilaMonster (1/27/2014)


    Abu Dina (1/27/2014)


    GilaMonster (1/27/2014)


    There's far faster and easier ways to find duplicates than what's looks like half a cartesian product.

    Please share your secret!

    As for avoiding blocking, that's easy, use...

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

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn

  • RE: Query just hangs!

    GilaMonster (1/27/2014)


    There's far faster and easier ways to find duplicates than what's looks like half a cartesian product.

    Please share your secret!

    Source table looks like the below:

    CREATE TABLE [dbo].[TheTable](

    [ID] [int] IDENTITY(1,1)...

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

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn

  • RE: Query just hangs!

    Record linkage once again!

    Here I'm looking for records that have the same address! I need to run this query so I can generate a Site ID per record.

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

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn

Viewing 15 posts - 31 through 45 (of 616 total)