Viewing 13 posts - 1 through 13 (of 13 total)
Check here for info on Format Files:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_impt_bcp_9yat.asp
Or IN BOL, go to:Administring SQL Server> Importing Exporting Data> Using BCP and Bulk Insert> Using Format Files
April 16, 2004 at 9:38 am
Hi!
If your field is defined as an "IDENTITY" field - then you can just ignore that field in your upload - SQL will automatically insert unique ids in that field...
April 16, 2004 at 7:44 am
I had a similar issue and I wrote a fucntion to achieve this.
CREATE FUNCTION quoteSurround(@STR VARCHAR(4000))
RETURNS VARCHAR(4000)
AS
BEGIN
RETURN('"' + @STR + '"')
END
Now you can call this as follows:
SELECT quoteSurround(fieldName)
FROM table1
WHERE id...
March 30, 2004 at 8:57 am
You could do something like this:
SELECT TOP 10 *
FROM table1
WHERE id_field NOT IN
(SELECT TOP @previous_count id_field FROM table1 ORDER BY id_field)
ORDER BY id_field
Here @previous_count is an integer denoting the...
March 9, 2004 at 10:27 am
We had a similar issue - backup times had gone up drastically - and it turned out that 1 of the disks in the array had gone bad - as...
March 9, 2004 at 10:18 am
I havent tried this as yet. Will do in the next couple of minutes. Meanwhile I found this in BOL:
"DELETE statements are not allowed if there is a self-join with...
March 1, 2004 at 6:26 am
Yeah, I did change the PK to reflect the actual primary keys. The primary key is a composite key of 3 fields. Here's what it looks like:
DELETE VP
FROM dbo.vw_part VP
JOIN
(
SELECT...
February 27, 2004 at 1:24 pm
This too returns the same error. This is what I used:
DELETE VP
FROM dbo.vw_part VP
JOIN
( SELECT *
FROM dbo.vw_part
WHERE dbo.vw_part.partition_number = 1
AND EXISTS (
SELECT NULL
FROM dbo.vw_part b
WHERE
...
February 27, 2004 at 11:39 am
The view and the base tables fulfill all the requirements as mentioned in the FAQ. Also dropped and re-created the constraints (as suggested in the MS KB article) - but...
February 27, 2004 at 10:21 am
Thanks for your input! I think I will try to "preproces" the csv file to include the primary keys in it.
The other option would not work for me as this...
February 27, 2004 at 8:42 am
You could use a regular expression for doing this. Theres an extended SP that allows you to use regexps in SQL Server 2000
December 17, 2003 at 8:24 am
We already have some good hardware - 2GB, dual processor, RAID 10 arrays, but still have issues. Have looked into the indexes and the query plans - most queries run...
October 31, 2003 at 4:03 pm
Viewing 13 posts - 1 through 13 (of 13 total)