Viewing 15 posts - 12,061 through 12,075 (of 13,460 total)
well, first,
I've always tried to get rid of any tables that were trying to hold summary data with a view. it does away with needless updating.
i think based...
Lowell
August 13, 2008 at 11:20 am
from a development standpoint, multiple instances are great for testing; I've had SQL7 as a default instance, SQL2000 and 2005 as named instances, all on the same machine. helpful if...
Lowell
August 13, 2008 at 9:28 am
that is caused by the row terminator:
[slash]n is CrLf, which is found a lot.
try [slash]r which is just Carriage Return, which is common from UNIX type data sources.
Lowell
August 5, 2008 at 9:04 am
i think it's parenthesis around the @sql....exec(@sql)
this works on my machine:
DECLARE @sql VARCHAR(8000)
DECLARE @path VARCHAR(255)
SET @path='c:[slash]nelson1.txt'
SET @sql='BULK INSERT nelson_test1 FROM ''' + @path + ''' '
...
Lowell
August 5, 2008 at 8:48 am
also something else to consider;
wouldn't the where statement where len(a.NDC) > 0 force a table scan on the Reorders table in order to calculat ethe length of the field?...
Lowell
August 5, 2008 at 8:20 am
[font="Courier New"]--all the columns must exist in the table...bulk insert doesn't let you choose.
--if the data was structured like this:
--1.0" 5.1" 5.1" 1.4" .2
--1.0" 5.1" 5.1" 1.4" .2
DROP TABLE nelson_test1
--i'd...
Lowell
August 5, 2008 at 8:09 am
sorry...once your table #temp exists, i\BULK INSERT inserts into all columns....you can't identify the columns.
it should be this:
[font="Courier New"]BULK INSERT #temp1 FROM 'c:elson.txt'
WITH
(
DATAFILETYPE = 'char',
FIELDTERMINATOR =...
Lowell
August 5, 2008 at 7:35 am
this example may be much more than you need.
This is very fast.
in my case, I had thousands of .txt files, all the same format.
they were distributed in 4 folders.
Each file...
Lowell
August 5, 2008 at 6:52 am
Maybe you mean something like this?
this updates a table, and uses a SELECT to pull in relevant data from a select statement?
[font="Courier New"]
UPDATE SomeTable
SET SomeTable.BudgetAmount = X.BudgetAmount
FROM
(
SELECT ID,SUM(AMT)...
Lowell
August 5, 2008 at 6:38 am
the issue is permissions, i'm pretty sure.
it doesn't matter which user you are logging into SQL server, whether domain admin,sa, or anyone else.
it's when you try to access services or...
Lowell
August 4, 2008 at 11:34 am
I tried this and added acouple of different things, like timeouts and Content-Length to the headers...it made no difference...depending on the url it either failed witha 404, or the same...
Lowell
August 4, 2008 at 11:22 am
I've had this snippet for a while, which i thought gets the number of processors on the server. this is the physical number of processors, and not whether they are...
Lowell
August 1, 2008 at 8:21 am
awesome example michaela;
Still dealing with too much SQL 2000 here, and i wanted a nice working example to explore the new DDL trigger abilities.
I was able to read it,...
Lowell
July 25, 2008 at 10:59 am
I had created a search proc I called "uglysearch", that found every varchar/char column, in every table, and searched for a specific string. similar to what you are doing, but...
Lowell
July 25, 2008 at 9:58 am
i think this is just a result of spaces in the path/filename, right?
changing this part should work i think:
SET @folder = 'C:\Inetpub\wwwroot\Pergamum\Doc\International Banking\Caribbean'
SET @path =SUBSTRING(@folder ,...
Lowell
July 25, 2008 at 7:41 am
Viewing 15 posts - 12,061 through 12,075 (of 13,460 total)