Forum Replies Created

Viewing 15 posts - 2,851 through 2,865 (of 4,085 total)

  • RE: Nvarchar Max no of character size

    Your client may be limiting the number of characters returned. It may limit either the total returned or the amount returned per column. For instance, SSMS limits output...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: query for datetime

    Ed Wagner (12/28/2015)


    charipg (12/28/2015)


    is it correct ?

    SELECT * FROM tablename(nolock) where

    startdate >= Getdate() -6

    and enddate <= Getdate()

    The GETDATE() returns a datetime, on which you can do integer math.

    Just...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Best way to merge two large client databases

    titsiros (12/26/2015)


    The reason why I am asking for such a tool is because I m sure combining client databases of the same schema must be somewhat of a common task...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: the use of CTEs

    BrainDonor (12/24/2015)


    Sometimes a query may perform better if it uses sub-queries instead of CTEs

    I hope you have some references to back this up. To the best of my knowledge,...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: change the element position on join and xml auto

    Just as an FYI, the AUTO and RAW options for XML give you very little flexibility. If you need your XML in a specific format, you are usually best...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: The Improvement

    You really should add a PARTITION BY clause to the query unless your database is limited to exactly one player. Once you have more than one player, all of your...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Getting analysis sums for each row in a table

    stevennjuki (12/22/2015)


    Okay here is an example

    The column cl_a has values (1,2,3,4,5,6)

    And for simplicity let's say the total rows to be fetched when computing the sums is only 3 and not...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Calculating a Year Number and Sequence number using a date field

    ChrisM@Work (12/22/2015)


    Something along these lines should do the trick, however I'd recommend you don't do it. If the number you are storing with the date of the visit is of...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Getting analysis sums for each row in a table

    Perhaps this is too obvious, but does removing "FETCH NEXT 10 ROWS ONLY" give you the results that you want?

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Cast as Numeric

    I'm guessing that the actual issue is that he was inadvertently using integer division, since COUNT returns an integer.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Using Multi-result subquery in expression

    It looks like you're trying to recreate the windowed functions that already exist in T-SQL. Try the following instead:

    SELECT STDEVP(basis) OVER(ORDER BY basis ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: How to solve for orders where the status on every item is greater than status of 3

    Unfortunately that doesn't fit the format that we both posted a link to. In fact, I'm beginning to think that this is homework, because you have used the number...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: How to solve for orders where the status on every item is greater than status of 3

    You don't say whether the items are in a separate table. (They probably should be, but that doesn't mean that they are.) It would help if you followed Forum...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: How to return a date in Australian date format?

    drooten (12/3/2015)


    Mike01 (4/16/2012)


    To avoid confusion for testing, use a day greater than 12.

    [/code]

    Excellent suggestion Mike01!

    After all, testing with a date such as 01/01/2015 is useless if you want to be...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: After insert,Update,Delete Trigger needs to insert into same table trigger is running on

    You might try using an INSTEAD OF trigger instead. I've never used them, so I don't I can't really give you much more info about them.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

Viewing 15 posts - 2,851 through 2,865 (of 4,085 total)