Viewing 15 posts - 49,321 through 49,335 (of 49,571 total)
Please don't cross-post. Replies to the following thread
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=9&messageid=238067
November 22, 2005 at 2:56 am
OK, so it's not HDD space.
Please run sp_helpdb 'TempDB' and post the output
November 22, 2005 at 12:56 am
It looks like either the disk that TempDB is on is full, or the TempDB database is set with fixed size and has filled up.
Check the disk, check the properties...
November 22, 2005 at 12:00 am
As an aside. Consider moving the insert into a stored procedure and calling the stored procedure from your app. It's more efficient and more secure.
As written, your code is potentialy...
November 21, 2005 at 4:48 am
Sure. You can have as many ouput parameters as you want.
CREATE PROCEDURE Test
@Out1 int OUTPUT,
@Out2 char(1) OUTPUT
AS
SELECT @Out1=1, @Out2='Y'
GO
DECLARE @Var1 int, @Var2 char(1)
EXEC Test @Var1 OUTPUT, @Var2 OUTPUT
SELECT @Var1, @Var2
--
I...
November 21, 2005 at 4:31 am
Does the function have to return a string. It would be easier if it was a table-returning function.
If it has to be a string, you could always count the nuber...
November 21, 2005 at 2:23 am
Could you please post the definition of your table, some example data and expected output please. I'm not completely sure from your description what it is you want.
thanks
November 21, 2005 at 1:43 am
November 21, 2005 at 1:30 am
First, may I suggest you post in a more appropriate forum, like SQL Administration or SQL General. This forum is for discussion of the site's question of the Day, not general...
November 21, 2005 at 12:34 am
Pleasure, got nothing else to do right now.
(looks cautiously around for boss)
November 17, 2005 at 2:52 am
You can get variables out. I find, personally, it's the main use of it.
DECLARE @RecordCount INT
EXEC sp_executesql N'SELECT @RecordCountOut=COUNT(*) FROM sysobjects', N'@RecordCountOut INT OUTPUT', @RecordCountOut=@RecordCount OUTPUT
SELECT @RecordCount
It's like a stored procedure...
November 17, 2005 at 2:39 am
Use UNION ALL rather than UNION. There's no possibility of duplicates between the two queries.
UNION means SQL will take the two result sets, concatinate, then sort to remove duplicates. UNION...
November 17, 2005 at 12:19 am
And if you don't know all the columns and need dynamic SQL
B. Execute('Select @NEWVAL = ins.' + @FIELDNAME + ' FROM inserted ins WHERE ins.RegAudited = ' +...
November 17, 2005 at 12:02 am
Actually, come to think of it, the initial insert that you do to insert all the products is unnecessary. If there's a possibility that there will be products in Product_Forcast...
November 15, 2005 at 11:25 pm
btw HTH stands for Hope that helps.
Close, but not quite.
Create the table sales and populate the years and products you want....
November 15, 2005 at 11:16 pm
Viewing 15 posts - 49,321 through 49,335 (of 49,571 total)