Forum Replies Created

Viewing 15 posts - 256 through 270 (of 1,033 total)

  • RE: Display data by fiscal year instead of calendar year

    CELKO (8/7/2012)


    Why not use a Calendar table with whatever fiscal or reporting years you use? The GAAP had 250+ the last time I looked. SQL is not a computional ...

  • RE: Commenting in Dynamic query

    Sean Lange (8/7/2012)


    I appreciate the effort of the poster but I am still not quite sure what we are trying to test. Commenting in dynamic sql or the scope of...

  • RE: Commenting in Dynamic query

    Thomas Abraham (8/7/2012)


    +2 - This question has GOTCHA written all over it. While I admit I should have been more careful in reading the question, the question title and the...

  • RE: Commenting in Dynamic query

    tommyh (8/6/2012)


    So here i was thinking this was a rewrite of the question we had 2 questions ago, since this question had the varchar(50) on str4 which would have fixed...

  • RE: Summing 2 Dates but only Workdays

    I fill in the calendar table with a dump from an 11,000 integer tally table. It reaches out about 30 years. I have a process that checks nightly...

  • RE: Summing 2 Dates but only Workdays

    Add a calendar table with a working_day field type int =1 on working days, and 0 on non-working days.

    i.e.

    CREATE TABLE dbo.calendar(

    calendar_date date NOT NULL PRIMARY KEY,

    working_day INT NOT NULL DEFAULT...

  • RE: Index types 1

    Put me in the group of learners...

    Knew the first two. Have never played with either XML or SPATIAL data types as of yet (curious about them, haven't had a...

  • RE: Reverse Of Number without Using reverse()

    capn.hector (8/3/2012)


    Well here is my solution. since we can order by when we take our substring we can just put the FOR XML PATH ('') in that query and...

  • RE: Commenting in Dynamic query

    It's hard to tell when the SQL script is an image.

    I'm sure this will come down to some kind of argument, but when I see the image

    I don't see...

  • RE: Reverse Of Number without Using reverse()

    My turn

    DECLARE @num INT = 102948092

    DECLARE @numstr VARCHAR(10)

    SET @numstr = @num

    DECLARE @tab TABLE(

    num INT,

    numc CHAR(1))

    ;WITH

    t1 AS (SELECT 1 N UNION ALL SELECT 1 N),

    t2 AS (SELECT...

  • RE: Targeted Index Performance Improvements

    rja.carnegie (9/17/2009)


    I need to read this article carefully, but my immediate reaction is that the indexes that aren't used or don't even exist are the ones that should be considered...

  • RE: Commenting in Dynamic query

    Koen Verbeeck (8/3/2012)


    Indeed, the correct answer is 1,0,1,error, because the last query produces a syntax error. Shame, because it was a pretty good question otherwise.

    Points back please 🙂

    +1 I agree.......

  • RE: The Copy Cat Poll

    1 Production Environment

    3 Full Backups + 12 Differentials + 36 Transaction log backups on the production server

    1 Staging Environment

    1 Full Backup copied from Production at some ponit

    1 Development Environment

    1 Full...

  • RE: DATETIME 2

    Thanks for making me think... I had to sit there and keep reminding myself how the datetime2 values would round and then tried to keep two mental counts (statement 1...

  • RE: "Question of the Day" is about:

    mtassin (7/30/2012)


    What has always mattered to me was the percentage of questions I've gotten correct. I have a personal goal to keep my % correct value above the site's...

Viewing 15 posts - 256 through 270 (of 1,033 total)