Forum Replies Created

Viewing 15 posts - 6,901 through 6,915 (of 15,381 total)

  • RE: Get resultset from query without running query.

    jobrien9796 (9/6/2013)


    I should clarify the original problem a bit here: The query i had as an example just pulled from a table. What I am looking for is...

  • RE: Updating a Temp Table column with data from another column in same Temp Table (data from previous month)

    Something like this?

    UPDATE #Month

    SET [PrevPerc] = [CurrPerc],

    [MONTH] = case [MONTH] when 1 THEN 12 ELSE [MONTH] - 1 END,

    [YEAR] = case [MONTH] when 1 THEN T.[YEAR] - 1 ELSE T.[YEAR]...

  • RE: change the default database

    Michael Valentine Jones (9/6/2013)


    Sean Lange (9/6/2013)


    Michael Valentine Jones (9/6/2013)


    It might be more valuable if you explained the implications of changing the default database, and especially the disadvantages of having a...

  • RE: Using IIF to test for Null

    PhilPacha (9/6/2013)


    Sean Lange (9/5/2013)


    IIF is not valid syntax for SQL.

    --begin edit--

    IIF was added to SQL 2012 :angry:

    --end edit--

    The first statement would be something like this:

    SELECT case Field1 when NULL then...

  • RE: Need to alter my code to show limited Info

    lisa.ogle (9/6/2013)


    Again I did provide the code I did provide the error and I did attach a sample of the data that was returned. Please remove me from your...

  • RE: subtract mutlple rows from top row value

    tdanley (9/6/2013)


    my apologies for the lack of code in my original post. Newbie mistake I haven't made many posts and duly noted. However what you have is exactly...

  • RE: subtract mutlple rows from top row value

    Let's start with some ddl and actual sample data. The problem with just posting some characters is we have no idea what the datatypes are or where the column breaks...

  • RE: Pivot on changing columns

    Check out the articles in my signature about cross tabs. In particular you will want to focus on the dynamic cross tab article. It should help get you pointed right...

  • RE: Cumulative total column wise

    meghna.bhargav (9/6/2013)


    Thanks Sean. and I agree to what you said as its important to make people understand what i am trying to communicate.

    With the issue, I think i have...

  • RE: change the default database

    Michael Valentine Jones (9/6/2013)


    It might be more valuable if you explained the implications of changing the default database, and especially the disadvantages of having a default database that is not...

  • RE: Cumulative total column wise

    meghna.bhargav (9/6/2013)


    I do understand what you mean! But I am in middle of Live issue thinking if i post here, I can get solution.

    When you start typing the issue...

  • RE: Get resultset from query without running query.

    If you want to capture the datatypes here are a couple of different ways.

    select *

    into MyNewTable

    from msdb.dbo.sysjobs

    where 1 = 0

    select c.name as ColumnName, t.name as DataType, c.is_nullable

    from msdb.sys.columns c

    join...

  • RE: Cumulative total column wise

    You might have read the article but you missed the point. The idea is to provide tables and data in a consumable format. That means that the volunteers around here...

  • RE: change the default database

    Jeff Moden (9/5/2013)


    In that case, I think Mark should write it and Sean, being a new member of the 10K club, should review it and help guide Mark to his...

  • RE: Forum Etiquette: How to post data/code on a forum to get the best help

    Jeff one other thing that might make an excellent addition to this article is an explanation of how to collect the information. There are many times that people say something...

Viewing 15 posts - 6,901 through 6,915 (of 15,381 total)