Viewing 15 posts - 106 through 120 (of 901 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. ...
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...
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...
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...
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)))) *...
February 3, 2015 at 6:03 am
Igor Micev (1/23/2015)
Sometimes I use...
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...
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...
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...
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...
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.
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) =...
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) = ...
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...
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.
December 22, 2014 at 8:06 am
Viewing 15 posts - 106 through 120 (of 901 total)