Viewing 15 posts - 6,226 through 6,240 (of 8,731 total)
Sachin Nandanwar (6/20/2014)
Couple of months back I used a VBScript in Script task component of SSIS package to change file extensions.Not sure about DTS.
How does that help?
I know that I...
June 20, 2014 at 11:07 am
Or you could avoid the need for a table if you're using them just once.
Select *
from YourTable
WHERE Id in (Select Id from dbo.DelimitedSplit8K(@Parameter, ','))
Notice that I used the...
June 20, 2014 at 10:44 am
You can use a Transform Data Task with your DB Server as the Source and an Excel Connection as your Destination.
To make it read-only, you might need a script task....
June 20, 2014 at 10:13 am
Why don't you create the DB on the cloud and restore it from a backup (which might be compressed if you're on 2008R2+). It seems safer than using mdf and...
June 19, 2014 at 6:03 pm
There's no need for window functions, they won't work better than a simple aggregate function.
You don't need to write a complete CASE either. Here are two options to shorten the...
June 19, 2014 at 5:51 pm
You might want to take a look at cross tabs. It's fairly easy and it just requires copy-paste-replace. 🙂
http://www.sqlservercentral.com/articles/T-SQL/63681/
SELECT
MAX(CASE WHEN ItemNumber = 1 THEN...
June 19, 2014 at 3:56 pm
Here's what I got from playing a little bit with the information.
SELECT SUBSTRING( Place, CHARINDEX('(', Place ) + 1, CHARINDEX(')', Place ) - CHARINDEX('(', Place ) - 1)
...
June 19, 2014 at 12:12 pm
And a different way of doing this with the Pattern Splitter.
http://www.sqlservercentral.com/articles/String+Manipulation/94365/
WITH sample_data(val)
AS
(
SELECT '1.9999-Q1'
UNION ...
June 19, 2014 at 10:30 am
If those are calculated columns, why do you need them at all?
You certainly don't need a table per month. On the worst scenario, you could use a self join.
June 18, 2014 at 5:21 pm
So, what's the question again?
June 18, 2014 at 5:18 pm
Take a look at the DATEADD function.
After you understand how does it work, you could go further by using this date routines: http://www.sqlservercentral.com/blogs/lynnpettis/2009/03/25/some-common-date-routines/
June 18, 2014 at 1:13 pm
You don't need the order by CID as there's only one CID on your subquery.
June 18, 2014 at 1:09 pm
You were overcomplicating your ORDER BY clause.
SELECT u.CID,
STUFF(( SELECT '; ' +CAST(tu.Dept AS VARCHAR(MAX))+' '+CONVERT(VARCHAR(25), tu.CDate,101)
...
June 18, 2014 at 12:49 pm
Just to be clear on what Sean said.
The current delete is rolled back and the previous ones remain commited.
June 18, 2014 at 12:35 pm
Maybe something like this?
SELECT ISNULL( w.Word, 'None'),
COUNT(t.String),
ISNULL( SUM((LEN(t.String)-LEN(REPLACE(t.String,w.Word,'')))/LEN(w.Word)), COUNT(t.String))
FROM @word w
RIGHT
JOIN @t t ON String LIKE '%' + Word + '%'
GROUP...
June 17, 2014 at 6:02 pm
Viewing 15 posts - 6,226 through 6,240 (of 8,731 total)