Viewing 15 posts - 136 through 150 (of 462 total)
1. Not sure if it works as there are syntactical errors.
2. You are using one variable for cursor value and another for the 'inner while loop'
3. In the first...
December 7, 2009 at 1:09 am
Interview huh?
USE MSDB
Select SJS.command
from msdb.dbo.sysjobs SJ
JOIN sysjobsteps SJS ON SJ.job_id = SJS.job_id
WHERE SJ.Enabled = 1
Order by SJ.NAME DESC
December 7, 2009 at 12:59 am
Another way would be this!
select CASE OBJECTPROPERTY(OBJECT_ID(name), 'ExecIsTriggerDisabled')
WHEN 1 THEN 'Disabled'
ELSE 'Enabled' END as Status
from sysobjects o
where o.type='TR'
December 7, 2009 at 12:56 am
Can you paste the complete query out here please? (if you can)
December 7, 2009 at 12:36 am
Where is the other END and before that you are closing and deallocating cursor?
while @@fetch_status = 0
BEGIN
December 7, 2009 at 12:12 am
See if this helps, (A recent article on different ways of update)
December 7, 2009 at 12:09 am
I am sure I am miles away from what the solution is (as your requirement was not clear) but an attempt to provide solution.
Is this what you want?
Select *, (p_hold/100...
December 5, 2009 at 1:20 am
Does this help?
Select ID, Code, Name,
STUFF((Select ',' + ContactPerson
FROM @mytable M2 where M2.ID = M1.ID for xml path('')), 1,1 ,'')
Amount
from @MyTable M1
Group by ID,...
December 4, 2009 at 1:00 am
As per me,
1. Buy a good book (probably take certification exams so that you cover most of the areas of sql server. Like for eg., 70-431, it helps...
December 3, 2009 at 12:00 am
parthi-1705 (12/2/2009)
In Q2 (File Name) The O/P is False it is incorrect because 13:01:00 to 14:59:00 lies between the Temp table Range of 14:00:00 to 15:00:00
If we take it...
December 2, 2009 at 3:12 am
'Enter' where? you want to enter into the same temp table? This does not help you?
IF NOT EXISTS( Select 1 FROM @TEMP
Where FTIME <= @FROMTIME
AND TTIME...
December 2, 2009 at 12:17 am
Easy and it depends in what format you want. For the format you've shown try this,
Select RIGHT(convert(varchar(20), getdate(), 120), 8)
Edit:Just saw Lynn's post. Thats elegant take that.
December 1, 2009 at 7:16 am
From SSMS,
Server-> databases - > your database -> views ->right click Modify (for graphical representation) or Script view as Alter to New query window for script.
December 1, 2009 at 6:38 am
Sorry if I guessed it completely wrong, but when you say DDL, do you mean to say Data Definition Language of an object?
December 1, 2009 at 6:25 am
Viewing 15 posts - 136 through 150 (of 462 total)