Viewing 15 posts - 766 through 780 (of 1,109 total)
CREATE FUNCTION dbo.split ( @in NVARCHAR(4000) )
RETURNS @result TABLE
( seqNr INT IDENTITY(1, 1)
, item NVARCHAR(100)
)
AS BEGIN
...
October 17, 2007 at 5:25 am
Search for "running total" or "running balance" on these forums.
Basically to do this in SQL and calculating this in queries is very inefficient and does not scale. You are much...
October 17, 2007 at 4:22 am
Books online will be your best source (the documentation that comes with SQL Server). It is also available online. For triggers http://msdn2.microsoft.com/en-us/library/ms189799.aspx is a good starting point.
Regards,
Andras
October 17, 2007 at 4:04 am
Have a look at the Database Engine Tuning Advisor http://msdn2.microsoft.com/en-us/library/ms188639.aspx
You can start it from Management Studio Via: Tools-> Database Engine Tuning Advisor
(but do not believe everything it says). It can...
October 17, 2007 at 4:02 am
Hi Sandy,
Piotr is right with the solution of removing the default from the select. The select statement should execute on its own when its result is used to put into...
October 17, 2007 at 3:33 am
Hi,
What recovery mode is your database in?
select databasepropertyex('databasename', 'Recovery')
If you it is in simple recovery mode, check if you have any transactions that are still running.
If your database...
October 17, 2007 at 1:51 am
You could use a user defined function to do this. If you are on 2005 then there is a nice trick to use xml path, or you could revert to...
October 15, 2007 at 3:25 am
Well, this is no longer a limitation on 2000 SP3
(of course at that time it was not around :))
Andras
October 15, 2007 at 3:10 am
Hi Susan,
switching to bulk just before dbreindex, then switching back will keep the transaction log file much smaller. It will increase the transaction log backup file size though. Probably it...
October 15, 2007 at 2:53 am
Could you describe in more detail what you mean by declaring variables dynamically? You can declare a variable at any time. If you create them on demand, how would...
October 15, 2007 at 2:34 am
This is the same post as http://www.sqlservercentral.com/Forums/Topic410712-149-1.aspx. I reckon it will be easier for you too to look up the answers on a single page.
Andras
October 15, 2007 at 2:24 am
I've sent you my email address in a pm, but there are many experienced people looking at these forums, so instead of email it would be nicer if you posted,...
October 15, 2007 at 2:17 am
As a follow up, if your LOB data is smaller than 8000 bytes, you could of course convert it to varchar(8000) and do a replace on that.
To see an...
October 12, 2007 at 3:56 pm
Hi Bill,
this is unfortunately a limitation of the LOB (text, ntext and image) datatypes. This has been improved in 2005 with the new LOM data types ([n]varchar(max) and varbinary(max)),...
October 12, 2007 at 3:40 pm
You could use dynamic sql, i.e. construct the query string and then use execute, like:
DECLARE @query NVARCHAR(4000)
SET @query = N'SELECT tID,... FROM '+
@table +'.. rest of the query'
EXECUTE(@query)
Regards,
Andras
October 12, 2007 at 3:28 pm
Viewing 15 posts - 766 through 780 (of 1,109 total)