Viewing 15 posts - 16 through 30 (of 42 total)
Swarndeep (9/17/2009)
You need to consider on optimize the query and indexes.Make sure the maintenance tasks are running regularly as per schedule, like, rebuilding indexes, de-fragmenting etc.
If a field with auto...
September 17, 2009 at 7:35 pm
Actually I having 2 cases with timeout expired error, both using application to do insertion and selection:
Case A:
When insert a record into a table which 1,000,000 records.
- Getting timeout...
September 13, 2009 at 9:47 pm
But in this case, I MUST use the EntryDateTime as one of the where selection right? I CANNOT use ExitDateTime as selection because it might return me 0 record?
Am I...
September 3, 2009 at 8:16 pm
Jim McLeod (8/28/2009)
August 28, 2009 at 5:44 am
Jim McLeod (8/28/2009)
August 28, 2009 at 12:35 am
Jim McLeod (8/27/2009)
CREATE TABLE #Sales (SalesDT datetime, SalesAmt money)
INSERT INTO #Sales (SalesDT, SalesAmt)...
August 28, 2009 at 12:09 am
Jim McLeod (8/27/2009)
SELECT CONVERT(varchar(13), SalesDT, 121) + ':00', Sum(SalesAmt) AS SalesAmount FROM...
August 27, 2009 at 11:14 pm
drew.allen (8/14/2009)
ALTER procedure Emp_name_proc
(
@emp_id varchar(100)
)
as
begin
declare @sql varchar(100)
select @sql = 'SELECT EmpName FROM Test WHERE EmpID IN (' + @emp_id +...
August 23, 2009 at 8:45 pm
Dave Ballantyne (8/20/2009)
setlan1983 (8/20/2009)
Just in case where someone changed the entryt.EntryDateTime accidently, need show the record in exit table also.
But WHICH exit row for WHICH entry row ?
Presumably 'Bob' will...
August 23, 2009 at 8:40 pm
pawan.falor (8/20/2009)
select
ISNULL(entryt.EmpName,exitt.EmpName) EmpName,
ISNULL(entryt.EntryDateTime,exitt.EntryDateTime) EntryDateTime,
exitt.ExitDateTime
from
dbo.EntryTable...
August 20, 2009 at 3:10 am
Dave Ballantyne (8/20/2009)
setlan1983 (8/20/2009)
but if I have a case where entryt.EntryDateTime does not match with exitt.EntryDateTime, and I still need to display the record out, how to do that?
Then what...
August 20, 2009 at 2:39 am
Lynn Pettis (8/19/2009)
select
entryt.EmpName,
entryt.EntryDateTime,
exitt.ExitDateTime
from
dbo.EntryTable entryt
...
August 20, 2009 at 12:35 am
Thanks for your help and I manage to solve this case.
"arun.sas" you are such a genius man !!! 😀
Remark: But cannot view Estimated Execution Plan, got error "Invalid object...
August 14, 2009 at 1:54 am
arun.sas (8/13/2009)
(
@emp_id int
)
as
begin
1) output like
‘Bob’
‘Charles’
select EmpName from Employee/*with lock options*/
where EmpID = @emp_id
union
select EmpName from Employee/*with lock options*/
where EmpID = @emp_id+1
2) output like ‘Bob,Charles’
declare @concat nvarchar(1000)
select @concat=...
August 13, 2009 at 11:13 pm
arun.sas (8/13/2009)
create procedure Emp_name_proc
(
@emp_id int
)
as
begin
select EmpName from Employee/*with lock options*/
where EmpID = @emp_id
end
A2)
insert into TempEmployee
exec Emp_name_proc 2
And it’s not advisable to create the procedure with SP_
Because it’s also reflects/access...
August 13, 2009 at 9:57 pm
Viewing 15 posts - 16 through 30 (of 42 total)