Viewing 15 posts - 466 through 480 (of 569 total)
Hi Adi,
Fine for the convert into varchar, but
OP shows convert to timestamp
ARUN SAS
May 4, 2009 at 1:58 am
Hi,
You need to convert the records from the date time to timestamp or change the table column schema from date time to timestamp?
ARUN SAS
May 4, 2009 at 1:25 am
ezhil (5/3/2009)
Can u suggest be better way(based on performance) to split by comma delited string.
Input:
String - 1,'Joy'~2,'Jack'~3,'Rozy'
Expected Result:
As Table
ID Name
1 Joy
2 ...
May 4, 2009 at 12:27 am
Hi,
select AVG(C_ProfitPercentage)AVG_C_ProfitPercentage from
(
SELECT
J.JobID,
/*YOUR SELECT*/ AS C_ProfitPercentage
FROM Jobs J
)AS X
WHERE C_ProfitPercentage <= 20.00
ARUN SAS
May 2, 2009 at 5:20 am
Hi,
Try this
select * from
(
SELECT
J.JobID,
/*YOUR SELECT*/ AS C_ProfitPercentage
FROM Jobs J
)AS X
WHERE C_ProfitPercentage > 20
ARUN SAS
May 2, 2009 at 1:04 am
Hi,
also try this
select a.ItemName,a.ItemCost,a.ItemCostDate from #Items a,
(SELECT distinct ItemName,max(ItemCostDate)ItemCostDate FROM #Items
group by ItemName)as b
where a.ItemName = b.ItemName
and a.ItemCostDate = b.ItemCostDate
ARUN SAS
April 30, 2009 at 5:13 am
Hi,
in your side OVER / PARTITION works or not?
ARUN SAS
April 30, 2009 at 4:47 am
mathewspsimon (4/30/2009)
Isnt there another way?-Thanks
WHY?
Your in 2005 or in 2000?
ARUN SAS
April 30, 2009 at 4:42 am
Hi,
try this sp
create procedure Spinrun (@Parameter varchar(90))
as
begin
create table #temp
(
eventtype nvarchar(30),
Parameters int,
EventInfo nvarchar(255)
)
declare @SPID varchar(10)
DECLARE OPENTRANS CURSOR FOR
SELECT SPID from master.dbo.sysprocesses (nolock)
OPEN OPENTRANS
FETCH NEXT FROM OPENTRANS into @SPID
WHILE @@FETCH_STATUS...
April 30, 2009 at 4:39 am
mithun.gite (4/29/2009)
Good morning...
Before u read on make sure that there will be always only 2 decimals will be there in ur values and i wrote it in bit of...
April 30, 2009 at 1:27 am
Hi,
try this sp
create procedure XYZ (@A int)
as
begin
1) Select * from table
where
2) Select * from table
where
and @A is not null or...
April 29, 2009 at 11:42 pm
Hi,
What kind of the data type used (for the records) to insert?
And show the existing table schema
ARUN SAS
April 29, 2009 at 4:43 am
Hi,
use the SPACE(10) instead of the CHAR(10)
SELECT @vSQL='BULK INSERT dbo.Source FROM ' + ''''+@v_Path +''''
+ ' ' + 'WITH (FIELDTERMINATOR = '+''''+','+''''+' ,ROWTERMINATOR = '''+space(10)+''')'
ARUN SAS
April 28, 2009 at 9:29 pm
Hi Steve,
Post your full statement which you write
Meanwhile try this
select year(order_Dt),month(order_Dt),count(order_No) from Order_table
where order_Dt between dateadd(year,-1, getdate()) AND getdate()
GROUP BY year(order_Dt),month(order_Dt)
ORDER BY year(order_Dt),month(order_Dt)
ARUN SAS
April 27, 2009 at 4:24 am
Hi,
How can we handle this reversal of pivoting in 2000?
ARUN SAS
April 22, 2009 at 4:36 am
Viewing 15 posts - 466 through 480 (of 569 total)