Viewing 15 posts - 511 through 525 (of 1,346 total)
Try sp_executesql
This question gets asked at least once a month usually more, I'm surprised you couldn't do a simple search to find the answer
Use Pubs
declare @SQLCommand nvarchar(4000)
declare @TableName varchar(50)
declare @myoutputRowcount...
April 7, 2006 at 8:38 am
In sql server DTS under package select save as, then save them as Structured storage file. Then send them. Then have the associate open dts select open, open the file,...
March 31, 2006 at 8:01 am
No, I would suggest you wait for it to finish.
If a transaction was running for an hour, and you killed it, it would take about an hour (generally speaking) to...
March 31, 2006 at 7:59 am
you can /may reduce the size of the file on a log shipped database.
Generally though if there are pending transactions it will not shrink very much unless you force a...
March 31, 2006 at 7:57 am
I believe that is because only c# can be used when creating code for sql 2005.
I havn't found anything to back that up though.
March 28, 2006 at 8:22 am
use sp_executesql with output parameter
CREATE PROCEDURE TEST_ROW_COUNT
@SQLeval nvarchar(2000),
@count int output
AS
BEGIN
declare @RowsReturned int
SP_EXECUTESQL @SQLeval,'N@RowsReturned int OUTPUT', @RowsReturned OUTPUT
SET @count = @RowsReturned
END
DECLARE @output as int
EXEC TEST_ROW_COUNT 'select @RowsReturned...
March 24, 2006 at 10:21 am
No
Create a source connection.
An excel destination.
Transform data task.
Select sql query.
Put in stored procedure name with parameter
Select the destination tab, DTS will interrogate the proc for the resultset, and create a...
March 23, 2006 at 11:50 am
Is this what your trying to explain
-- One table with only 3 rows?
Create table #Ref_Preference (Field varchar(50), Value varchar(10))
insert into #Ref_Preference (Field, Value)
select 'Schd_dt', 'Foo' union
select 'Plan_dt', 'Bar' union
select 'Ship_dt',...
March 23, 2006 at 8:29 am
the best/easiest way is SQL Compare it is a third party software to buy. They have a product to compare table schema and code, and also a product to compare...
March 22, 2006 at 9:26 pm
Posted here.
There is no need to cross post. We usually check all boards
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=19&messageid=267793
March 22, 2006 at 9:25 pm
March 22, 2006 at 9:24 pm
or create a function.
use pubs
Create table mytable ([ID] int, col varchar(20))
insert into mytable ([id],col)
select 1, 'aaa' union
select 2, 'bbb' union
select 3, 'ccc' union
select 3, 'ddd' union
select 4, 'eee' union
select 5,...
March 21, 2006 at 3:26 pm
Modified from code I found in the scripts section of this site.
(Sorry can't seem to find the original to give credit)
declare @DateX datetime
select @DateX = '02/12/2006'
-- First day of quarter...
March 21, 2006 at 3:20 pm
select *
from #TestX
where AuditID in (select max(AuditID)
from #TestX
Group by ws_Num)
Results
129 F52A 3818
180 BC102A 4182
204 BH130A 7877
March 21, 2006 at 3:11 pm
Do a search on "Trees in SQL" "Nested Sets" or Expanding Hierarchies on this site or google, you will get lots of info.
March 21, 2006 at 3:06 pm
Viewing 15 posts - 511 through 525 (of 1,346 total)