Viewing 15 posts - 7,936 through 7,950 (of 8,731 total)
Could you please post your sample data as DDL statements? I'll give you an example but right now, I don't have time to do it with all the tables. This...
July 13, 2013 at 11:59 am
The output you posted doesn't match with the output of my query using the sample data, but it does what you need.
The articles mention numeric data but it's the same...
July 12, 2013 at 11:39 am
I'm afraid that there's something wrong with your sample data. However, you could do something like this.
SELECT productdate,
MAX(CASE WHEN personname = 'Jasper' THEN productname END) Jasper,
MAX(CASE WHEN personname = 'Milo'...
July 12, 2013 at 10:54 am
Maybe you could use something like this. The CTE is just to have some sample data to test with.
WITH SampleData(String) AS(
SELECT 'Doe, John, H *^' UNION ALL
SELECT 'Doe, John, H,...
July 11, 2013 at 9:37 am
The problem is you're using double quotes instead of single quotes.
However, you should really avoid doing a simple replace with a UDF as it will degrade performance in a horrible...
July 11, 2013 at 9:30 am
To get better help on performance problems, please read the following article. I'm sure someone around here will help you to solve the problem.
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
July 10, 2013 at 5:03 pm
The best way that comes to my mind is to use the 8K Splitter. Read the following article and come back if you need help.
July 10, 2013 at 4:54 pm
Are you checking on the same server and database? (it has happened to me more than once)
Are you sure the spelling of the alias is correct?
Have you refreshed the Intellisense...
July 10, 2013 at 10:01 am
Jeffrey Williams 3188 (7/9/2013)
Not sure if this will perform any better - but is another way of generating your tally table and a calendar.
You may want to take a look...
July 9, 2013 at 9:34 am
Erin Ramsay (7/8/2013)
July 8, 2013 at 2:51 pm
Maybe an example will show how it works and it will be up to you if it does what it is supposed to do.
DECLARE @test-2 TABLE(
DischargeDatedatetime NULL,
enddtdatetime NULL)
INSERT @test-2 VALUES
('20130101',...
July 8, 2013 at 2:03 pm
What are you trying to figure out? What if you think the other way around?
CASE
WHEN CONVERT(varchar(8), DischargeDate, 112) < CONVERT(varchar(8), enddt, 112)
...
July 8, 2013 at 1:09 pm
As CREATE PROCEDURE or CREATE FUNCTION must be the first line of a batch (except for comments), the only way to do it is through dynamic SQL. In fact, the...
July 8, 2013 at 11:51 am
Basically is the same method but using a different Tally approach to have zero reads.
declare @date1 datetime
declare @date2 datetime
set @date1='20130801'
set @date2='20130807'
;WITH E1(N) AS (
...
July 8, 2013 at 7:23 am
Do you mean something like this?
SELECT DATEDIFF(dd, @date1, @date2)
July 8, 2013 at 6:48 am
Viewing 15 posts - 7,936 through 7,950 (of 8,731 total)