Forum Replies Created

Viewing 15 posts - 1 through 15 (of 901 total)

  • RE: t-sql 2012 sort

    pietlinden - Wednesday, March 15, 2017 10:31 PM

    Can't you do this? If you use TOP 100 PERCENT, you can use ORDER BY.

  • RE: What is your experience with Team Foundation?

    I've used TFS with Database projects for the last 5 years, and generally found it to be very good, especially if you branch releases as it gives you a way...

  • RE: Pivot without an aggregate?

    To my knowledge there is no way to do what you want without the use of an Aggregate.

    Does the column order matter?

  • RE: t-sql 2012 datatype

    Sean Lange (7/13/2016)


    Jason-299789 (7/13/2016)


    Sean,

    Don't some of the Internal Diagnostic views still use TEXT data types or have they all been changed to (n)varchar(max) datatypes?

    I also believe that when you...

  • RE: t-sql 2012 datatype

    Sean,

    Don't some of the Internal Diagnostic views still use TEXT data types or have they all been changed to (n)varchar(max) datatypes?

    I also believe that when you pipe an SQL...

  • RE: Cross Server Queries via SQL Linked Server

    @Ken, Thanks for the suggestion of using SEQUENCE but I cant change the object definitions as they are called in numerous places.

    @Phil, Its data push rather than push and pull....

  • RE: Cross Server Queries via SQL Linked Server

    I know It doesn't help that the original developer was a little too enamoured with the 'MERGE' I've found examples of code that use MERGE just to do an INSERT.

    The...

  • RE: Cross Server Queries via SQL Linked Server

    That's an option that I'm implementing, I'm not happy as there is the possibility that there are concurrent users doing the same process.

    I cant even wrap it in a...

  • RE: Add two columns to make one total

    Phil Parkin (3/15/2016)


    Jason-299789 (3/15/2016)


    @yb751

    The NULL will only be eradicated if there is a row with a non-Null value, in the same column.

    See the code below, when aggregating on Account.

    DECLARE...

  • RE: Add two columns to make one total

    @yb751,

    I appreciate that but you write a query in one instance to do specific job then someone comes up with a bright idea of expanding the grain, so you quickly...

  • RE: Add two columns to make one total

    @yb751

    The NULL will only be eradicated if there is a row with a non-Null value, in the same column.

    See the code below, when aggregating on Account.

    DECLARE @myTable TABLE (Account...

  • RE: I want to automate my database compression , can anyone provide me the T sql code...

    From BoL

    Limitations and Restrictions

    --------------------------------------------------------------------------------

    •System tables cannot be enabled for compression.

    •If the table is a heap, the rebuild operation for ONLINE mode will be single threaded. Use OFFLINE mode for a...

  • RE: Date difff from two dates divide by count

    You could always use the window function to count the number of times the Claim Number appears within the set something like

    SELECT

    Insurer

    ,Location

    ,Claim_Number

    ,(DATEDIFF(day,Start_Date, End_Date)) dateDifference

    ,Count(Claim_Number) OVER (PARTITION BY Insurer,Claim_Number order...

  • RE: Improving Performance

    Apart from the loop this query will most likely be expensive due to the Subquery in the WHERE clause

    INSERT INTO #Content

    ...

  • RE: select with a while loop

    One thing I noticed is when you create the date with this line of code

    SET @datum = CONVERT(DATETIME,CONVERT(VARCHAR(2),@tag) +'.'

    + CONVERT(VARCHAR(2),@mon) + '.' + @strJahr)

    you could use the DateFromParts function that...

Viewing 15 posts - 1 through 15 (of 901 total)