Forum Replies Created

Viewing 15 posts - 2,086 through 2,100 (of 2,894 total)

  • RE: Using variables and logic inside a SELECT

    Most likely, you don't need looping in what you are trying to achieve!

    If you would post your question in line with the forum etiquette, I believe you will get relevant...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Data from table different from view

    Looks like nothing special.

    I cannot believe that data is missing from the view in your case.

    It could be:

    a.) you are looking into different environments

    b.) you are applying filters

    c.)...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Help with Logic

    Looking into your setup, balance should be updated within the same transaction as insert into Loads.

    The one way to achieve it SQLServer is to have a trigger on Loads table:

    --...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Data from table different from view

    If view underlying table(s) DDL is not changed, data should not be missing in the view.

    Can you please post your view DDL.

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: split data of month into weeks

    Jeff Moden (2/24/2012)


    ... Adding a couple of comments as to what each part of the code is doing just might help sway the OP away from loops and maybe even...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: how to change oracle query for 2005 tsql use?

    There is no direct analogue for this in SQLServer.

    You can build recursive queries using CTE, but it will be quite far from using sys_connect_by_path.

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: How to get column names for Views

    Try to base you query on the following:

    select *

    from INFORMATION_SCHEMA.VIEWS v

    join INFORMATION_SCHEMA.COLUMNS c on c.TABLE_SCHEMA = v.TABLE_SCHEMA

    and c.TABLE_NAME = v.TABLE_NAME

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Rule in Sql Derver

    Use check constraint as adviced in previous post. See the sample:

    CREATE TABLE [dbo].[MyTbl](

    [Id] [int] NOT NULL,

    [AlphaNumericValue] [varchar](50) NULL

    )

    GO

    ALTER TABLE [dbo].[MyTbl] WITH CHECK ADD CONSTRAINT [CK_MyTbl_AlphaNumericValue] CHECK...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Use C# in SQL Server 2008

    AlexH89 (2/27/2012)


    ... but it would be great if the C# code could be actually created within the job itself. Is this possible?

    It would be completely mad! :w00t:

    But it's possible!

    If...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Performing transformations on general ledger data

    Just one of the way of combining subtotals in SQL:

    select [month], SumType, high_office, division, LOWER_OFFICE, AU, Revenue from

    (

    select 1 lo, 1 do, 'Lower_Ofice Total:' SumType,high_office, division, LOWER_OFFICE, [month],...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Performing transformations on general ledger data

    Pivoting may not perform well enough especially for large datasets (I guess your GL is not a small table :-))

    Would be great if you could provide exact espected results for...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: need to get 12 consecutive presents for last 30 days

    Kindly suggesting you the solution:

    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    You follow the above and the relevant answers will flow in...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: split data of month into weeks

    Bipinkumar Yadav (2/24/2012)


    hi Friend,

    Try This way..

    DECLARE

    @start_date DATETIME,

    @end_date DATETIME,

    @start_date1 DATETIME,

    @end_date1 DATETIME

    ...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: split data of month into weeks

    You can use DATEPART function to calculate week number.

    -- SELECT DATEPART(WEEK,[DateTime])

    SELECT DATEPART(WEEK, '1 Jan 2012')

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Column Alias name dynamically

    CELKO (2/23/2012)


    WHY? The last time I saw anything like this, the goal was to get physical labels for mag tapes. What are you trying to do?

    He need to label rolls...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

Viewing 15 posts - 2,086 through 2,100 (of 2,894 total)