Viewing 15 posts - 271 through 285 (of 346 total)
The following links from MS might be of help...(problems observed if you are using Exchange 2000 or are trying to send open files as attachments via SQL mail)
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q274330
September 7, 2003 at 11:45 am
check this link...it has a discussion (and a solution) on something on the same lines...
August 5, 2003 at 3:33 pm
This should (hopefully!!) work out for all the consumers...you'll have to alias the outer table so that you can reference it in the sub query...
SELECT MAP.Consumer_ID, MAP.Provider_ID, MAP.Effective_Date AS LastVisit
FROM...
August 5, 2003 at 2:52 pm
you could use TOP in the select statement of your cursor...
DECLARE CursorName CURSOR FOR
Select Top 13 ......
August 5, 2003 at 2:48 pm
Hi,
This link
http://www.sql-server-performance.com/stored_procedures.asp
provides some of the general recommendations to optimize stored procedures which might be of help...
and like Frank said - there are many ways to "optimize" stored...
August 4, 2003 at 8:19 am
I think GOTO is frowned upon as it makes understanding the code difficult...
However BREAK only breaks out of the innermost WHILE loop so GOTO could be used to break out...
July 30, 2003 at 9:51 am
you could also use BREAK
declare @i int
set @i = 0
while @i < 60
begin
set @i = @i + 1
print @i
if @i > 9
begin
Print 'exited while statement'
break
end
end
July 30, 2003 at 9:43 am
Is the third argument in the Substring function the length of the text field???...if so this should work :
Substring(Field,3,Datalength(Field))
July 28, 2003 at 10:11 am
thanks for that info Jpipes...I'm going to use it for my requirement of getting filenames and dates...this is better than my previous "parsing mechanism"....
July 28, 2003 at 9:34 am
Exec master.dbo.xp_cmdshell 'dir d:\MSSQL7 /b'
the '/b' switch should return only the filenames (and subdirectory names) from the directory...
To list only the files
Exec master.dbo.xp_cmdshell 'dir d:\MSSQL7 /b/a-d'
good old DOS commands.......
July 28, 2003 at 9:18 am
Hi,
You could use the Convert function to convert the date into the format required...
Convert(Varchar(10),getdate(),111) will convert the date into the yyyy/mm/dd format and you can then use :
SELECT RETUDATE FROM...
July 28, 2003 at 9:09 am
Hi Ritch,
I think this is what you need :
Declare @Store Int
SELECT @Store = Sum(Field) from Table
One thing to consider - assuming that Field is of data type int...
July 4, 2003 at 4:51 am
How about :
SELECT
isNull(COUNTEDBY,1) as Countedby,
SUM(ISNULL(APPLES,0)),
SUM(ISNULL(ORANGES,0))
FROM #FRUIT
GROUP BY isNull(COUNTEDBY,1)
this seems to be giving the results that you are looking for...I think....
June 23, 2003 at 3:50 pm
one way would be to use the sp_MSForEachTable stored proc :
exec sp_MSForEachTable 'SELECT * FROM ? where MembId=1234'
this will execute the select statement against all the tables in the...
June 23, 2003 at 3:42 pm
Viewing 15 posts - 271 through 285 (of 346 total)