Viewing 15 posts - 18,181 through 18,195 (of 18,926 total)
Just correcting myself here :
In my previous post I assume that you are creating a bitmap so I suggested you do something like this :
Declare @BitMap as int
set...
April 11, 2005 at 11:49 am
Is that the whole code from the proc??
If so then you just don't need a cursor to execute that command.
the only thing I could suggest is to change the cursor...
April 11, 2005 at 11:42 am
It's inherant to the site. But I agree that it could use some tweaking.
April 11, 2005 at 9:24 am
You can run this script to see for yourself :
if object_id('TestMyTheory') > 0
drop function TestMyTheory
GO
CREATE Function dbo.TestMyTheory()
RETURNS INT
AS
BEGIN
RETURN 1
END
GO
SELECT
Routine_Name, Routine_Type, Routine_Definition
FROM
INFORMATION_SCHEMA.ROUTINES
WHERE
ROUTINE_DEFINITION LIKE '%TestMyTheory()%'
GO
drop function TestMyTheory
GO
April 11, 2005 at 9:01 am
INFORMATION_SCHEMA.ROUTINES includes SPS and Functions (all 3 types).
April 11, 2005 at 8:57 am
Function Main()
Dim oFSO
Dim sDirectoryPath
Dim oFolder
Dim oFileCollection
Dim oFile
Dim oLog
Dim iDaysOld
'Set Variables
iDaysOld = 30
Set oFSO = CreateObject("Scripting.FileSystemObject")
sDirectoryPath = "C:\TEMP"
set oFolder...
April 11, 2005 at 8:53 am
Maybe you'd have a better chance of getting a good answer if you started a new thread instead of a finished one.
April 11, 2005 at 3:10 am
Here's the lon version to calculate the next birthday from the birthdate (I know I could've made it much shorter but I went for clarity):
Declare @BirthDate as datetime
Declare @ThisYear...
April 8, 2005 at 1:44 pm
I didn't consider that before answering. But even then he didn't make any mention of why he wanted to drop the formula on the column; let's all wait for...
April 8, 2005 at 12:08 pm
I read this code on these forums... I definitly didn't invent anything here
.
April 8, 2005 at 11:53 am
I think Jeff is trying to do the opposite...
You can try something like this :
if object_id('Test') > 0
DROP TABLE Test
GO
CREATE TABLE [dbo].[Test] (
[id] [int] IDENTITY (1, 1) NOT NULL...
April 8, 2005 at 11:48 am
Well I can think of 2 things :
1 - Are you sure you have the right password for the sa account?
--most likely
2 - Is the authentication mode windows only...
April 8, 2005 at 9:42 am
You can't do it like this (you're asking sqlserver to select from a table variable) try :
EXEC ('Select name from ' + @Target)
please read this before using dynamic sql...
April 8, 2005 at 9:35 am
Y r u getting me involved in this Frank?? ![]()
Anyways, I used cursors in production only once in my whole life (ok 13 months...
April 8, 2005 at 7:39 am
Can you show us the code and how you are using it (how you call 'em)?
April 8, 2005 at 7:21 am
Viewing 15 posts - 18,181 through 18,195 (of 18,926 total)