Forum Replies Created

Viewing 15 posts - 7,606 through 7,620 (of 8,760 total)

  • RE: Nesting SQL to XML Grouping issue

    Did you get this resolved? It only takes a minor change from previously posted code

    😎

    SELECT

    AC.name AS 'Acct',

    (SELECT column_id AS 'Item/data()'

    FROM sys.columns AS ITEMS1

    WHERE ITEMS1.object_id = AC.object_id

    FOR XML PATH ('Items'),...

  • RE: How to replace null value in a query

    Using Lutz's code with the addition of NULLIF to also handle literal 'NULL' value

    😎

    create table #t (EmpID char(5), Name varchar(10), WorkDate date,Status varchar(5),WkdHrs int)

    insert into #t

    values

    ('00010', 'JOSEPH', '20140710','P', 8),

    ('05200', 'ANTHONY',...

  • RE: Pivotting on 2 Totals

    Quick question, can you supply the table structure and sample data in a consumable format?

    😎

  • RE: Alternative to report model project IN SS2012

    saxena200 (8/2/2014)


    Alright.. Lets follow it up with some "substantial" details -

    our data contains tables which have cyclic dependency, there are transaction and master tables but its not necessary that...

  • RE: Trace Updated records

    GilaMonster (8/2/2014)


    Also need to keep in mind that CDC is Enterprise Only.

    p.s. Nolock has side effects, it's not a go-faster switch that should be added to every single statement. Let's...

  • RE: Get next primary key without identity

    Thanks Gail and Erland, I was slightly (understatement) 😀 hasty responding before.

    😎

  • RE: Get next primary key without identity

    Jeff Moden (8/2/2014)


    I agree that SEQUENCE has the advantage of being able to cover multiple tables and that IDENTITY requires SET IDENTITY INSERT if you want to update the identity...

  • RE: Alternative to report model project IN SS2012

    saxena200 (8/2/2014)


    Really!

    u may want to read the second line of the post dude!; BTW I believe I landed on the wrong place for this kind off question.

    Thanks for reading that...

  • RE: Converting Hour and Minute to Decimal

    Jeff Moden (8/2/2014)


    Here's what I'd use to solve this problem on my systems because it's short and accurate with the accuracy limits of DATETIME. No... it's not ANSI/ISO compliant...

  • RE: Converting Hour and Minute to Decimal

    Jeff Moden (8/2/2014)


    Sean Lange (7/31/2014)


    Sql server stores datetime as decimal. You can easily cast a datetime to decimal. But what is the point? What are you trying to do with...

  • RE: Get next 2 weeks

    Daniel Matthee (8/2/2014)


    Eirikur Eiriksson (8/2/2014)


    CONVERT(INT,P.[20140728]) + CONVERT(INT,P.[20140804])

    Hi Eirikur

    I dont fully agree that it has the same flexibility.

    For example in my suggestion i can create any date range as...

  • RE: Alternative to report model project IN SS2012

    saxena200 (8/2/2014)


    Hi,

    As report model project is being deprecated in ss2012 - what are the alternatives available for us.

    we have highly unstructured database (highly normalised and transactional in nature)

    Tabular model is...

  • RE: Query source for Missing Index Management Views

    GilaMonster (8/2/2014)


    There's no easy way (and the link previously given just shows the queries to fetch the missing index information, which is not what was asked)

    Nor being implied either,...

  • RE: Get next primary key without identity

    Jeff Moden (8/2/2014)


    Eirikur Eiriksson (8/2/2014)


    Update code

    USE tempdb;

    GO

    SET NOCOUNT ON;

    DECLARE @ITER INT = 0 ;

    DECLARE @COUNT INT = 100000;

    DECLARE @NextId INT = 0...

  • RE: Get next primary key without identity

    TomThomson (8/2/2014)


    Evil Kraig F (8/1/2014)


    If you want to lock rows for the duration of a transaction from being read, or better keep anyone else from getting into the table at...

Viewing 15 posts - 7,606 through 7,620 (of 8,760 total)