Viewing 15 posts - 6,916 through 6,930 (of 8,731 total)
I can't find the problem you mention. Maybe the sample data is wrong.
WITH tbl_source AS(
SELECT Col2, Col3
FROM (VALUES('abc','123454321'),
('abc','12345678-ABC'),
('abc','10123456789'),
('abc','10123456789-A'),
('abc','11199999999'),
('abc','11122222222-X'))x(Col2, Col3)
)
SELECT Col1 = CASE WHEN LEN(col3_num) > 10 AND col3_num LIKE '111%'...
February 14, 2014 at 9:08 am
dhananjay.nagarkar (2/14/2014)
------ My...
February 14, 2014 at 8:27 am
You should change your function to an inLine table-valued function to improve performance.
CREATE FUNCTION dbo.GetDates(@from AS DATETIME, @to AS DATETIME)
RETURNS TABLE
AS
RETURN
WITH E1(N) AS(
SELECT N FROM(VALUES(0),(0),(0),(0),(0),(0),(0),(0),(0),(0))E(N)
),
E3(N) AS(
SELECT a.N FROM...
February 13, 2014 at 6:04 pm
What's the question or the point of this post?
February 13, 2014 at 4:50 pm
You could post DDL, sample data and expected results to get better answers. I'm sure you've been told how to do that.
February 13, 2014 at 4:07 pm
Here's a possible solution for you. Be sure to understand it and ask any questions you have.
UPDATE t SET
Tag = 1
FROM #temp1 t
WHERE ExpDate = '2014-03'
AND Symbol IN( SELECT x.Symbol...
February 13, 2014 at 11:48 am
The method you use was subject to fail even with 2000. The best solution as always is to normalize the data.
As you can imagine, every option will need code changes,...
February 13, 2014 at 10:41 am
Why do you believe that replace is causing performance problems?
February 13, 2014 at 9:58 am
That's not the best option. SSRS has an option to send the parameters in a way that can be evaluated as necessary within the IN clause.
I don't remember how to...
February 13, 2014 at 9:52 am
Sean Lange (2/13/2014)
February 13, 2014 at 9:22 am
To do a dynamic pivot, check the following article: http://www.sqlservercentral.com/articles/Crosstab/65048/
If you build your table something like this, it doesn't matter if you have 1, 3 or 200 results:
CREATE TABLE Quiz_Results(
...
February 13, 2014 at 9:18 am
Yes you can with dynamic code. But you might face the same issues when calling that table. Why wouldn't you want to use a normalized temp table?
February 13, 2014 at 9:05 am
I'd go a little further and get the data as time.
declare @timevar int
select @timevar = '145345'
select CAST( STUFF( STUFF( right('000000' + cast(@timevar as varchar(6)), 6), 5, 0, ':'), 3, 0,...
February 13, 2014 at 9:00 am
elkinfortiz (2/13/2014)
Alguien tiene una idea de...
February 13, 2014 at 8:40 am
Viewing 15 posts - 6,916 through 6,930 (of 8,731 total)