Forum Replies Created

Viewing 15 posts - 5,656 through 5,670 (of 15,381 total)

  • RE: Problem with decimal output

    Jeff Moden (2/20/2014)


    cms9651 (2/20/2014)


    I tried this:

    SELECT

    case when ([ENER1] + [ENER2]) / 1000000 > 1 then

    cast(Cast(Round(( [ENER1] + [ENER2] ) / 1000000, 2) AS NUMERIC(9, 2)) AS VARCHAR(10))

    else

    '0' + cast(Cast(Round((...

  • RE: Query Statement Help with data Type as Integers

    Dieselbf2 (2/20/2014)


    Is there a way to query all the columns in a database that have the data type as Integer

    Can you provide some insight as to what you want? Of...

  • RE: Are the posted questions getting worse?

    ChrisM@Work (2/20/2014)


    SQLRNNR (2/20/2014)


    Sean Lange (2/20/2014)


    stormsentinelcammy (2/20/2014)


    will this forum thread ever get back on topic?

    What topic is that???

    SQUIRREL

    NUTS! WHOLE HAZELNUTS!! Careful, this could go downhill very quickly...

  • RE: Problem with decimal output

    cms9651 (2/20/2014)


    I tried this:

    SELECT

    case when ([ENER1] + [ENER2]) / 1000000 > 1 then

    cast(Cast(Round(( [ENER1] + [ENER2] ) / 1000000, 2) AS NUMERIC(9, 2)) AS VARCHAR(10))

    else

    '0' + cast(Cast(Round(( [ENER1] +...

  • RE: Problem with decimal output

    cms9651 (2/20/2014)


    :doze:

    7.89

    3.07

    1.78

    1.68

    1.59

    1.36

    1.09

    00.97

    00.92

    00.82

    00.81

    00.79

    00.79

    00.77

    What have you tried? Put some effort into this. Remember you are the one with the database where you can run this and you are the one collecting a...

  • RE: Are the posted questions getting worse?

    stormsentinelcammy (2/20/2014)


    will this forum thread ever get back on topic?

    What topic is that???

  • RE: Adding data to horizontal query from vertical table

    montecarlo2079 (2/20/2014)


    That article gave me a start but I dont need to sum any data,

    I just need to display it in the fashion above. no calculations

    maybe i didnt read...

  • RE: Problem with decimal output

    cms9651 (2/20/2014)


    thank you, is better but still without a leading zero before the decimal point ...

    7.89

    3.07

    1.78

    1.68

    1.59

    1.36

    1.09

    .97

    .92

    .82

    .81

    .79

    .79

    You really should be doing this type of stuff in the front end. SQL is...

  • RE: Adding data to horizontal query from vertical table

    montecarlo2079 (2/20/2014)


    Hello I have a problem, well 2 problems.

    I have a table that looks like this.

    Product ID| Sequence #| Code

    12345 | 01 ...

  • RE: Problem with decimal output

    Probably just need to cast your calculation.

    I used a formatter on this first so it was easier to read.

    SELECT Cast(Round(( [ENER1] + [ENER2] ) / 1000000, 2) AS NUMERIC(9, 2))...

  • RE: Connection string getting Server does not exist or access denied

    http://www.connectionstrings.com/%5B/url%5D

    They have details about every possible connection string possibility you can come up with.

  • RE: Complex search Functionality with joins

    born2achieve (2/19/2014)


    Hi Sean and Luis thanks for the reply

    Hi Luis,

    I am sorry, small mistake i made. i did correct on my first post.

    for example if i pass "Cooking Waffles"...

  • RE: Complex search Functionality with joins

    Not sure what you mean that left join gives bad result.

    This is not ideal because of the wildcard search but it does work.

    declare @SearchVal varchar(50) = 'sugar';

    with Cooking as

    (

    select...

  • RE: Columns in primary key

    N_Muller (2/19/2014)


    Thanks for the answer.

    What would be the benefit of creating a non-clustered PK on IndexID and a clustered index on ID1, ID2 and ID3 over the other two options?...

  • RE: Need help with this query

    sql2k8 (2/19/2014)


    I have to rewrite the code in another language. This correlated subquery is not working in the another language. So i am trying to rewrite the code without correlated...

Viewing 15 posts - 5,656 through 5,670 (of 15,381 total)