Forum Replies Created

Viewing 15 posts - 1,141 through 1,155 (of 2,007 total)

  • RE: COMPARATIVE ANALYSIS (sql for ACCESS)

    omi_real (12/13/2011)


    Thanks Cadavre:

    I need a statement that will view the Item per category.

    All barcodes that starts with M and D are regular items,

    otherwise barcodes that starts with A and B...

  • RE: Each GROUP BY expression must contain at least one column that is not an outer reference.

    sandeep.cs3 (12/13/2011)


    Good info about this topic is discussed at:

    SNIP

    This thread is from 2008. . .

  • RE: COMPARATIVE ANALYSIS (sql for ACCESS)

    Chrissy321 (12/13/2011)


    CASE isn't available in Access you would need to use iif.

    D'Oh, yep that's correct.

    Hopefully the OP understood the concept I was trying to get across so was able to...

  • RE: Case Statement in a where clause for a temp table

    mic.con87 (12/13/2011)


    Thank you very much for your prompt response. I do however have a few questions. Is there a way to maintain all the columns in #InitialTable_18? There are over...

  • RE: concatenate row values into single row

    Dyn-o-mite!! (12/13/2011)


    hello, can anyone please show me how to concatenate values from multiple rows to single row ??

    for e.g

    create table test_table

    (

    letter varchar(max),

    word varchar(max)

    );

    insert into test_table

    values

    ('A','apple'),

    ('A','aeroplane'),

    ('C','car'),

    ('D','dairy'),

    ('C','camel');

    the output should be as follows

    letter...

  • RE: COMPARATIVE ANALYSIS (sql for ACCESS)

    Couple of problems: -

    1) You haven't explained how we can tell what is a "regular", "sale" or "all" item. I'm guessing that "all" is just a combination of "regular" and...

  • RE: CAST help please

    mrwillcostello (12/12/2011)


    Can someone please tell me why my decimal has 6 spots and not 4 like I need it to?

    USE TSQLFundamentals2008;

    SELECT AVG (LineItems)AS AvgLineItems FROM

    (SELECT orderid, CAST (COUNT (productid)AS DECIMAL...

  • RE: find table relationships

    Also, with some human intelligence, this sort of script can help identify potential relationships.

    SELECT object_schema, object_name, CASE WHEN dataobjecttype = 'P'

    ...

  • RE: Time Computation Challenge

    mhike2hale (12/13/2011)


    Hi Cadavre!

    Thank you very much for your response I just read it by now and tried to run all the possible scenarios specially where I was stuck, like if...

  • RE: Case Statement in a where clause for a temp table

    Looks good.

    How's this?

    ;WITH CTE AS (

    SELECT ITCScoreDate, NameID, ITCScore,

    ROW_NUMBER() OVER (PARTITION BY NameID ORDER BY ITCScoreDate DESC) AS rn

    FROM #ITCChecks)

    SELECT MAX(a.ITCScoreDate) AS ITCScoreDate, a.NameID, MAX(a.ITCScore) AS ITCScore

    INTO #InitialTable_18

    FROM CTE a

    INNER...

  • RE: Case Statement in a where clause for a temp table

    First of all, hello and welcome to SSC!

    Secondly, the good news: This can be done!! Not only that, but we can optimise your current code 😀

    Now the bad news:...

  • RE: Sorting triggered by data type

    I got the points because I made the correct assumption, but I think that if the data is consistent in representing an INT in "Value" where ever "IsInsuranceLength" = 1...

  • RE: First and Second values placed on same row.

    BEGIN TRAN

    --First, create the sample data to play with

    SELECT Cust, Doctors

    INTO yourSampleData

    FROM (SELECT 'A', 1

    UNION ALL SELECT 'A', 2

    ...

  • RE: How do I add a decimal to a number

    SELECT 123456 * 0.01

    Returns

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

    1234.56

  • RE: Modulo operator problem

    Jim-720070 (12/12/2011)


    Thanks for looking into a bit more deeply Cadavre.. I've been working with SQL Server for 5 years now and have literally never had anyone else look at my...

Viewing 15 posts - 1,141 through 1,155 (of 2,007 total)