So I have a table (table A) with a list of drivers and the races they entered and their finishing position

Fields are

```
Date of race
Driver id
Finishing position

```

I want to create a left join query where I can have the above 3 fields and then then joined on them the previous race that the driver entered and its date , finishing position

So a table that has the headers below…………

```
Date of race | Driver id | Finishing position | prev race date | prev race id | prev finishing position

```

I want it to only return the previous and not races prior to the last race

I want to use the date and or driver id as my variable that I will use to input prior to running query.

Any support or thoughts would be grateful

FYI - i am using SSMS 2008
['https://Stackoverflow.com/questions/32995441', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5094247/']
You could try multiple (say, 1000) values per INSERT:

```
START TRANSACTION;
CREATE TABLE foo (a INTEGER, b STRING);
INSERT INTO foo VALUES (1, 'a'), (2, 'b'), (3, 'c');
COMMIT;

```

But really, bulk load with `COPY INTO` is generally a much better idea...
<https://www.nuget.org/packages/MonetDb.Mapi>

```
int count;
string tableName; // "\"MyTable\""
string columns; // '"' + string.Join("\", \"", columnArray) + '"'

dbCommand.Execute($"COPY {count} RECORDS INTO {tableName} FROM STDIN ({columns}) DELIMITERS ',','\\n','\\'';");

string records; // string.Join('\n', recArrayOfArray.Select(x => string.Join("," x))
dbCommand.Execute(records);

```