Forum Replies Created

Viewing 15 posts - 106 through 120 (of 901 total)

  • RE: regarding sql developer

    subramanyam.mannepalli (2/9/2015)


    as a sql developer role what topics we will learn,which topics on focus and whats the roles&responsibilities in the company.

    It depends on the role and the organisation. ...

  • RE: How to insert the following

    I would make the VARCHAR field a little bigger especially if you are going to build the contents of the TXT column dynamically,

    With the statement you provided the string in...

  • RE: Long Running Update statement

    jdbrown239 (2/8/2015)


    I will have to profile the data for uniqueness to see if a clustered index can be created.

    Don't get confused between a PK and a clustered index, the Clustered...

  • RE: how to make my sql code into cursor with in procedure

    Cursors are notoriously slow so I would advise avoiding them except in a specific instance.

    It would help if you could post some sample data and the output you are...

  • RE: Calculation of total discount with variable

    This is an old favourite, check this thread http://www.sqlservercentral.com/Forums/Topic1435577-392-1.aspx

    Phil Parkin's example is the best solution if you just want a single TotalDiscount and is Basically

    SELECT (1 - EXP(SUM(LOG(1-Discount/100.0)))) *...

  • RE: Just an idea ...

    Igor Micev (1/23/2015)


    This is something that I noticed some period ago, and it's definitely a good idea - a filter for the columns to be implemented in ssms.

    Sometimes I use...

  • RE: Optimizing Stored Procedure to go Parallel.

    If the stats refresh doesn't work,

    Do you have a DBA monitoring the servers?

    As its possible that having seen the processors running hot he decided to set the Max Degree...

  • RE: ID or Id

    I tend to use Id rather than ID. Mainly due to being trained to use Pascal case naming conventions, even when I'm typing I occasionally throw in a capital...

  • RE: Performance problem when joining to a view.

    I wonder if the reason is the Scalar Function, which seems to be generating an on the fly surrogate key, is there a reason why the Age band view isn't...

  • RE: Replacing Table Names In Over 100 Procs

    Why not just use the tools that MS give you with the SSDT, reverse engineer the database into an SQL DB Project in VS2012 shell (or Vs2010 shell), then use...

  • RE: query to return rows with c2=c3

    Can you post a simple DDL of the table, some sample data and expected results so people can see what you are trying to do.

  • RE: Pivot when you dont know amount of columns and coloum names

    Heres another example but with the values split out.

    CREATE TABLE #RawData

    (

    CalDate Date

    ,Value1 INT

    ,Value2 INT

    ,Value3 INT

    )

    INSERT INTO #RawData

    VALUES ('01-Jan-2014',100,120,300),('02-Jan-2014',80,150,300),('03-Jan-2014',100,20,180)

    DECLARE @SQL NVARCHAR(4000) = 'SELECT '

    DECLARE @SQLFrom NVARCHAR(4000) =...

  • RE: Pivot when you dont know amount of columns and coloum names

    Something like this should work

    CREATE TABLE #RawData

    (

    CalDate Date

    ,Value1 INT

    ,Value2 INT

    ,Value3 INT

    )

    INSERT INTO #RawData

    VALUES ('01-Jan-2014',100,120,300),('02-Jan-2014',80,150,300),('03-Jan-2014',100,20,180)

    Select * from #RawData

    DECLARE @SQL NVARCHAR(4000) = 'SELECT '

    DECLARE @SQLFrom NVARCHAR(4000) = ...

  • RE: Date Table

    Some interesting quirks mentioned.

    A lot of UK have 2 'fiscal years', one is tied to the UK government tax year, which runs Apr-Mar and is the basis for Tax and...

  • RE: Help needed in Relational Logic

    You might want to try a Recursive CTE, check out BOL for examples, I think its Example D or E on the BOL WITH (common Table Expression) help page.

Viewing 15 posts - 106 through 120 (of 901 total)