Viewing 15 posts - 1,111 through 1,125 (of 1,923 total)
How about this?
Function code:
IF OBJECT_ID (N'dbo.GetEloquaColumn', N'IF') IS NOT NULL
DROP FUNCTION dbo.GetEloquaColumn;
GO
CREATE FUNCTION [dbo].[GetEloquaColumn]
(
@Code_String NVARCHAR(200)
)
RETURNS TABLE
AS
RETURN
(
SELECT STUFF (Eloqua_Field_reference,1,1,'') Eloqua_Field_reference
FROM
(...
September 24, 2010 at 1:19 am
Sathish, without seeing your data, we can't debug the Function.. so can u cook up some sample data out of your original data and post it in the form of...
September 23, 2010 at 10:38 pm
Even i have seen that behaviour.. GROUP BY beats ROW_NUMBER by comfortable margin when it is run over large dataset.. if you could provide samples of your environment, it would...
September 23, 2010 at 8:04 pm
Try this:
Tweaked with the idea from Mark:
; with cte0 as
(
SELECT name,cost , saledate
,Quarter_Num = DATEPART(Q ,[saledate] )
...
September 22, 2010 at 4:59 am
OOooch :pinch:, Mark beat me to it..
one variation between Mark and mine, i used DATENAME for the Month, he used DATEPART.. both do the same, infact, mark's is good one,...
September 22, 2010 at 4:06 am
Hmmm.. try this:
; with cte as
(
SELECT name,cost , saledate ,
Quarter_Num = DATEPART(M ,[saledate] )
,Month_Name ...
September 22, 2010 at 4:03 am
Syed Khalid, tel me, honestly, it is an interview question or home-work question , isn't it?
September 22, 2010 at 3:42 am
The Dixie Flatline (9/21/2010)
You spin me round round, baby, right round....
😀 Lol,Bob
September 21, 2010 at 11:28 pm
cutecrazyguy (9/21/2010)
you put a 'd' word in the end of statement, what does it used for ?is that something like aliasses ?
thx.
Exactly, tat is the alias for the sub-query present...
September 21, 2010 at 10:02 pm
Chris Morris-439714 (9/21/2010)
Edit: Oops, ColdCoffee beat me to it.
Ah , never CM.. i always enjoy reading through your innovative ideas of solving questions, makes me learn a lot.. i enjoy...
September 21, 2010 at 5:27 am
Try this: (This is what ashish was mentioning)
Declare @UserSelection INT
SET @UserSelection = 58
select * from
(
select 1 ,0.00 ,20.00, 7.90
union all select 2, 21.00, 60.00 ,10.70
union all...
September 21, 2010 at 5:14 am
Craig Farrell (9/21/2010)
September 21, 2010 at 5:03 am
Craig and Vekatraman, With all due respect to your wonderful attempts, both of your queries are not what the OP is expecting..
Try this:
DECLARE @Tab TABLE
(
Number BIGINT,
Time_Stamp DATETIME
)
INSERT INTO @Tab
...
September 21, 2010 at 1:43 am
Thanks for the feedback, Lee
September 20, 2010 at 10:38 am
Viewing 15 posts - 1,111 through 1,125 (of 1,923 total)