Forum Replies Created

Viewing 15 posts - 6,691 through 6,705 (of 8,760 total)

  • RE: Rank duplicates, but only rows involved in duplicates

    Jeff Moden (10/25/2014)


    Eirikur Eiriksson (10/25/2014)


    Keep in mind, there's no such thing as a bad code (if it works), your efforts are as worthy as mine any given day, keep up...

  • RE: round to two digit after decimel

    QQ-485619 (10/26/2014)


    what if that is a column name, e.g.

    select sum(saletotal)/NumberofDays

    Either to an explicit type cast to numeric or float using cast or convert or multiply the column value with 1.0,...

  • RE: SQL Query - Should be easy fix???

    j.hoube (10/26/2014)


    Not a problem replaced with AND statement instead of ON seems to have resolved it πŸ™‚

    Thanks for the help and your time

    J

    Sorry about the error, quick copy/paste without checking...

  • RE: round to two digit after decimel

    QQ-485619 (10/26/2014)


    I run the following statement: select 1/3 and I got 0.

    How do I do so that I can get 0.33?

    Thanks,

    Jian

    SQL Server performs an Integer division on whole...

  • RE: SQL Query - Should be easy fix???

    Good job, the scripts do explain what is happening

    😎

    The table dbo.MMA_KPIVAR_DAT can have many instances of the same VARIABLE_ID, CLIENT_ID and SITE_ID. The table dbo.MMA_KPIVAR_MST can have many instances of...

  • RE: SQL Query - Should be easy fix???

    No worries, there are several ways of doing this, have a quick look here for Generate Scripts (SQL Server Management Studio).

    😎

  • RE: SQL Query - Should be easy fix???

    Quick question, can you post the DDL (create script) for those three tables?

    😎

  • RE: Are the posted questions getting worse?

    GilaMonster (10/25/2014)


    Anyone live anywhere where they can easily get a variety of different dried chillies? Stuff CosteΓ±o, New Mexico, Choricero, Arbol, Cascabel, Ancho, Mulatto, Negro, Pasilla?

    A part from picking it...

  • RE: Rank duplicates, but only rows involved in duplicates

    sqldriver (10/25/2014)


    Eirikur Eiriksson (10/25/2014)


    You are on the right track there, a simple solution would be to "UPPER" the values before hashing. SHA1 is quite a lot cheaper computationally than MD5...

  • RE: Are the posted questions getting worse?

    Lynn Pettis (10/24/2014)


    Submitted and have received my approved TRF for redeploying back to the States at the end of February. Looks like I should seriously look at making plans...

  • RE: Rank duplicates, but only rows involved in duplicates

    sqldriver (10/25/2014)


    I was trying a similar approach, but couldn't get the results right. :blush:

    Upper/lowercase is throwing things off, I think.

    100 Musk Ox for you, sir.

    SET STATISTICS IO ON

    SET STATISTICS...

  • RE: Query Help

    Quick thought, and bear with me if I sound slow :-p

    1) how can you compare a date of birth to min or max age, doesn't sound right?

    2) What is the...

  • RE: T-SQL Code Help

    Have a look at this post for a more complete answer

    😎

  • RE: SSIS Help..

    To get the desired output requires some data massaging, here is an example

    😎

    USE tempdb;

    GO

    SET NOCOUNT ON;

    ;WITH SAMPLE_DATA([Add], [New], [Pro], [Len], [Source]) AS

    (

    SELECT 'Acorn', Null, ...

  • RE: T-SQL Code Help

    Quick solution using aggregation to remove the null values

    😎

    USE tempdb;

    GO

    SET NOCOUNT ON;

    ;WITH SAMPLE_DATA(Advert,Network,Program) AS

    ( SELECT 'Acorn',NULL,NULL UNION ALL

    SELECT NULL,'AC',NULL UNION ALL

    SELECT NULL,NULL,'Adult'

    )

    SELECT

    MAX(SD.Advert...

Viewing 15 posts - 6,691 through 6,705 (of 8,760 total)