Viewing 15 posts - 106 through 120 (of 902 total)
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. ...
_________________________________________________________________________
SSC Guide to Posting and Best Practices
February 10, 2015 at 1:10 am
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...
_________________________________________________________________________
SSC Guide to Posting and Best Practices
February 9, 2015 at 5:34 am
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...
_________________________________________________________________________
SSC Guide to Posting and Best Practices
February 9, 2015 at 1:32 am
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...
_________________________________________________________________________
SSC Guide to Posting and Best Practices
February 4, 2015 at 1:32 am
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)))) *...
_________________________________________________________________________
SSC Guide to Posting and Best Practices
February 3, 2015 at 6:03 am
Igor Micev (1/23/2015)
Sometimes I use...
_________________________________________________________________________
SSC Guide to Posting and Best Practices
January 23, 2015 at 7:03 am
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...
_________________________________________________________________________
SSC Guide to Posting and Best Practices
January 22, 2015 at 9:39 am
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...
_________________________________________________________________________
SSC Guide to Posting and Best Practices
January 20, 2015 at 8:35 am
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...
_________________________________________________________________________
SSC Guide to Posting and Best Practices
January 19, 2015 at 8:41 am
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...
_________________________________________________________________________
SSC Guide to Posting and Best Practices
January 15, 2015 at 2:24 am
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.
_________________________________________________________________________
SSC Guide to Posting and Best Practices
January 9, 2015 at 9:23 am
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) =...
_________________________________________________________________________
SSC Guide to Posting and Best Practices
January 7, 2015 at 3:48 am
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) = ...
_________________________________________________________________________
SSC Guide to Posting and Best Practices
January 7, 2015 at 3:39 am
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...
_________________________________________________________________________
SSC Guide to Posting and Best Practices
January 6, 2015 at 2:12 am
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.
_________________________________________________________________________
SSC Guide to Posting and Best Practices
December 22, 2014 at 8:06 am
Viewing 15 posts - 106 through 120 (of 902 total)