Viewing 15 posts - 9,946 through 9,960 (of 26,489 total)
Luis Cazares (8/23/2012)
I would do something like this:
CREATE FUNCTION [dbo].[FnSplit_string]
(
@List nvarchar(max)
)
RETURNS table...
August 23, 2012 at 1:01 pm
I'd just use this function:
USE [Sandbox]
GO
/****** Object: UserDefinedFunction [dbo].[DelimitedSplit8K] Script Date: 08/23/2012 12:25:14 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE FUNCTION [dbo].[DelimitedSplit8K]
/**********************************************************************************************************************
Purpose:
Split a given string...
August 23, 2012 at 12:27 pm
Sometimes you have to make assumptions. We do that every day because we don't live in a perfect world that provides us with 100% of the information we need...
August 23, 2012 at 10:19 am
nzhang6666 (8/23/2012)
Just compared the results and they are same.
I don't understand why you suggest doing this. I mean even the data is different but they are still ordered....
August 23, 2012 at 9:17 am
Why is everyone calling it a trick question? It started with (0), it is a valid value.
August 23, 2012 at 8:56 am
anthony.green (8/23/2012)
August 23, 2012 at 8:53 am
Would also help if you showed the code that is getting the error. From what I see, I don't the posted code having a problem.
August 23, 2012 at 8:44 am
nzhang6666 (8/23/2012)
Please note the real question is at the end.
I have following query, both pto and ph has about 30million rows. The query initially run very slow (3...
August 23, 2012 at 8:34 am
One other problem, if you don't select from the #temp table inside the stored procedure, you won't see any data anyways as the table will be dropped when the execution...
August 23, 2012 at 8:26 am
ChrisM@Work (8/23/2012)
mtassin (8/23/2012)
I'm not seeing the XML trouncing the Delimittedsplit8k tvf though.....
Nor me. I've plugged it into the splitter test harness from the article attachent and on some permutations of...
August 23, 2012 at 8:13 am
sandeep rawat (8/23/2012)
table deftable
(
price int,
typeofpen varchar (20)
)
query
-----
,WITH Temp AS
(MAX(price ) OVER(PARTITION BY typeofpen) AS price
FROM
table
)
SELECT SUM(mx) FROM temp
Curious, this doesn't even look like...
August 23, 2012 at 8:04 am
Gazareth (8/23/2012)
WHERE YEAR(DateField) IN (2011, 2012)
WHERE YEAR(DateField) BETWEEN 2011 AND 2012
WHERE DateField BETWEEN '20110101' AND '20121231'
If there's an index on the DateField,...
August 23, 2012 at 8:01 am
Phil Parkin (8/22/2012)
vp7986 (8/22/2012)
this logic will only apply if there are only 2 matching rows.If there are multiple i cannot get the match.
Sorry, my first post was rubbish. Try this:
create...
August 22, 2012 at 3:26 pm
sqlvogel (8/22/2012)
Ankur Bajaj (8/22/2012)
Cheers!
SELECT 'CREATE VIEW ' + TABLE_SCHEMA + '.vw_' + TABLE_NAME +...
August 22, 2012 at 2:52 pm
rakesh1084 (8/22/2012)
select dbo.greatest_('1099,1,2,3,9,10') greatest
surprisingly the Result is 9
However logically the return value should be 1099.
even for below results are surprise
select dbo.greatest_('1199,989') greatest, dbo.greatest_('1199,9') greatest1
result should be 1199,119 however...
August 22, 2012 at 2:44 pm
Viewing 15 posts - 9,946 through 9,960 (of 26,489 total)