Viewing 15 posts - 256 through 270 (of 325 total)
Thanks for trying it Todd. Actually the quary you gave returns different previous no for a given Phone number. My requirement is that the values of column "Just previous number"...
February 7, 2011 at 6:44 am
ok, this is what I am trying to achieve:
if is_transferred <>0 then I want the most recent transferred_to_phone_no. That is why order by date is done. So essentially "just previous...
February 2, 2011 at 9:44 pm
IF EXISTS (
SELECT *
FROM dbo.sysobjects
WHERE 1=1
AND id = object_id(N'dbo.xxx')
AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
DROP TABLE dbo.xxx
the condition 1=1 is redundent as it is always true.
id = object_id(N'dbo.xxx') ...
February 2, 2011 at 4:31 am
If you meant , how to do it using command from SQl box, then you may use:
xp_cmdshell 'typeperf "\Memory\Available bytes" "\processor(_total)\% processor time"'
December 29, 2010 at 3:39 am
Yes, they won't be added again. Just to elaborate it more:
I have a clutered index idx1 on Col1 and a non Clustered index on Col2,Col3. if my predicate is like...
December 28, 2010 at 11:55 pm
Thanks for your answers Gail....Now I don't see any point in dropping the name of clustered key from my NC index definition.
December 28, 2010 at 10:11 pm
Many thanks Gail..My thinking was that if the NC index is able to implicitly use the Clustered key, what is the point in adding it to the NC? Won't it...
December 28, 2010 at 3:26 am
There is no memory pressure. Its a development box and I am the only person doing work on it. And also if I execute other procs and check their plans...
December 17, 2010 at 4:20 am
That is the catch here Gail.
If I run below query:
select * from sys.dm_exec_cached_plans a cross apply sys.dm_exec_sql_text(plan_handle)
I can see from text column that the plan is for a proc. I...
December 8, 2010 at 5:20 am
Vivek
You can use exec in funtion but only for extended procs. Here I have created a batch file which I executed using:
exec master..xp_cmdshell 'c:\runproc.bat'
runproc.bat is the batch file here...
December 8, 2010 at 4:58 am
I knew that gail but since it was having objid, i thought of using it. but even the DMV's you mentioned wont give me the name of the proc corresponding...
December 8, 2010 at 3:22 am
what do you get for your database when you run this:
select state_desc from sys.databases where name='test'
November 24, 2010 at 2:24 am
WayneS (11/23/2010)
i.e.:
alter function db.dbo.fn1
returns int
as
begin
declare @id int
set @id=3
select col1 from dbo.test1 where col1=2
return @id
end
then call it by:
select...
November 23, 2010 at 9:29 pm
Hi Lowell
I indeed missed your point. But when I tried as you told, I still can't make it working. I was able to create a funtion that starts with fn_...
November 22, 2010 at 11:41 pm
Well Jeff, I didn't ask if we can execute a dynamic sql from function, I asked if there is a work around for it. i knew there is no direct...
November 22, 2010 at 10:09 pm
Viewing 15 posts - 256 through 270 (of 325 total)