Viewing 15 posts - 796 through 810 (of 1,156 total)
skip the d*** loops. Use a numbers table to do this:
After looking at your solution, its is so very clear. Before I was only think loop :hehe:. This...
January 16, 2008 at 10:25 pm
While this is a feasible solution there are potential pitfalls including networking congestion, timeouts, bad timing (BOL has a great example of how a wait delay can actually run longer...
January 16, 2008 at 9:28 pm
I do not know of any fix, if you have too many objects in your database catalog. What is the error message?
January 16, 2008 at 3:23 pm
You could do something like this
declare @start datetime, @counter int, @end int
set @start = '1/1/2007'
set @end = datediff(dd,@start,getdate())
set @counter = 0
declare @tbl table(
Dt SMALLDATETIME
)
while @counter <= @end
begin
INSERT INTO @tbl...
January 16, 2008 at 3:05 pm
The variable has to be wrapped in a dynamic sql statement like such.
DECLARE @somebox as nvarchar(20), @sql NVARCHAR(500)
SET @somebox = '[LINKEDBOX]'
SET @sql = N'SELECT * FROM ' + @somebox +...
January 16, 2008 at 2:37 pm
I hope I misunderstood what you are trying to do.
converting all you floats to varchar....
Doing the cast to do the queries, or possibly even creating a computed field...
January 16, 2008 at 1:02 pm
EXEC master.dbo.sp_addlinkedserver
@server = N'ExcelSource',
@srvproduct=N'Excel',
@provider=N'Microsoft.Jet.OLEDB.4.0',
@datasrc=N'C:\DeleteMe.xls',
@provstr=N'Excel 8.0'
You have to use Excel 8.0 for Excel 97 +
January 16, 2008 at 12:18 pm
The cleanup task deletes all .bak files not ones made by a particular maintenance plan. You would have to segregate the backups into seperate folders as another poster mentioned....
January 16, 2008 at 11:31 am
As an aside I was recieving the same error as you until I made HDR=NO and IMEX=0
January 16, 2008 at 11:14 am
try using this syntax:
INSERT INTO OPENROWSET ('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=c:\ExcelFile.xls;',
'SELECT * FROM [Sheet1$]')
select 1, 2, 3
GO
January 16, 2008 at 11:05 am
Roy,
thank you but that is still only giving me the order_date that is exaclty 30 days + or - the subscriptions.paid_thru. I need any date that falls within that 30...
January 16, 2008 at 10:41 am
Check the properties of C:\ExcelFile.xls and confim that it is not marked read only.
January 16, 2008 at 10:28 am
You would have to make a package for each way SQL to ACCESS and ACCESS to SQL, both of which can be done via the import/export wizard, as I specified...
January 16, 2008 at 10:03 am
Thanks a ton, guys! Yes, I agree with the 'truncate history row' part. That's exactly what I'm going to do.. will have to think over it a little.
Jsheldon, the purge...
January 16, 2008 at 10:02 am
Ok, in developing the code to convert all of the database tables that contain the FLOAT datatype fields to VARCHAR datatype fields, I discovered a solution to the initial QUERY...
January 15, 2008 at 3:55 pm
Viewing 15 posts - 796 through 810 (of 1,156 total)