BULK INSERT your_table
from 'absolute/path/to/your/file'
WITH
(
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n'
)
Obviously, you could also use different terminators, but all you need to do is to alter the specified parameter.
...or how to be heavyweight and agile at the same time
BULK INSERT your_table
from 'absolute/path/to/your/file'
WITH
(
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n'
)
However, in the last six minutes as 13 successive scrums were set five metres from the All Blacks line, and Neemia Tialata, having changed to the loosehead prop was sin-binned for taking a scrum down, the Italians were not able to get past a determined All Blacks pack.
@Test(expected=IllegalArgumentException.class) public void makeBaby() { Family family = moz.getFamily(); assertNotNull(family); assertEquals(2, family.getChildren().size()); BabyFactory factory = family.getWife(); assertNotNull(factory); Baby babygirl = factory.makeBabyGirl("Mila"); assertNotNull(babygirl); family.addChild(babygirl); assertEquals(3, family.getChildren().size()); boss.askForRaise(moz); }
...for tonight is the night that my beautiful creature is destined to be born!
select *
from table_one
where my_key not in
(
select my_key
from table_two
)
select *
from table_one
where my_key not in
(
select cast (my_key as ${type}) collate ${collation}
from table_two
)
exec sp_help table_one
Englishmen play rugby because they invented it. Welshmen, Irishmen and Scots play rugby because if they bashed Englishmen in any other way they'd end up in jail.
@RunWith(JMock.class)
private Mockery context = new JUnit4Mockery();
@Test
public void testGetTable() {
System.out.println("getTable");
context.setImposteriser(ClassImposteriser.INSTANCE);
final LookupTableRepository repository = context.mock(LookupTableRepository.class);
final LookupTable table = context.mock(LookupTable.class);
final LookupTableFacadeResultFactory factory = context.mock(LookupTableFacadeResultFactory.class);
final LookupTableFacadeResult expResult = context.mock(LookupTableFacadeResult.class);
context.checking(new Expectations() {{
oneOf(repository).getTable(with(equal(tableName)));
will(returnValue(table));
oneOf(factory).make(with(equal(table)));
will(returnValue(expResult));
}});
LookupTableFacade instance = new LookupTableFacadeImpl(repository, factory);
LookupTableFacadeResult result = instance.getTable(tableName);
assertSame(expResult, result);
}
context.checking(new Expectations() {{
Matcher<LookupTable> tableNameMatcher = Matchers.hasProperty("tableName", equal(tableName));
oneOf(repository).save(with(tableNameMatcher));
will(returnValue(table));
oneOf(factory).make(with(equal(table)));
will(returnValue(expResult));
}});
Matcher<LookupTableItem> codeMatcher = Matchers.hasProperty("code", equal(code));
Matcher<LookupTableItem> descriptionMatcher = Matchers.hasProperty("description", equal(description));
oneOf(repository).save(with(allOf(codeMatcher, descriptionMatcher)));
will(returnValue(table));
Don't comment bad code - rewrite it.
"Ooh, I'd better comment that!" No! You'd better clean it!
Fear is the path to the Dark Side.
result = Normalizer.normalize(myString, Normalizer.Form.NFD);
return result.replaceAll("\\W", "").toUpperCase();
Our mentors have a way of seeing more of our faults than we would like... it is the only way we can grow.
The waterfall model is wrong!
right or wrong, I'm still the captain
OrderBuilder.createOrder()The builder actual code might look something like this:
.forCustomer(customer)
.with(STEAK, 1)
.with(FRIES, 1)
.with(BEER, 3)
.build();
public class OrderBuilder {After playing with my code for a while I discovered that implementing a good fluent interface is not as easy as it might seem at first: you have to carefully think about what you really want to do (program by intention), how to clearly express it, and have your APIs reflect it. Nevertheless I think I'll experiment with them a little, they could be another nice trick in my toolbox.
private final Order order;
private OrderBuilder() {
this.order = new Order();
}
public static OrderBuilder createOrder() {
return new OrderBuilder();
}
public OrderBuilder forCustomer(Customer customer) {
order.setCustomer(customer);
return this;
}
// ...similar setters ...
public Order build() {
// ...maybe perform some validation
return order;
}
}
It's not enough what I did in the past - there is also the future.
Ho perso un po' la vista, molto l'udito. Alle conferenze non vedo le proiezioni e non sento bene. Ma penso più adesso di quando avevo vent'anni. Il corpo faccia quello che vuole. Io non sono il corpo: io sono la mente.
Since MS Access is THE best application on the planet, you can right-click your way to happines...
...now listen to my lay. For I will sing to you of Frodo of the Nine Fingers and the Ring of Doom.
And when Sam heard that he laughed aloud for sheer delight, and he stood up and cried: 'O great glory and splendour! All my wishes have come true!' And then he wept.
But Merry stood at the foot of the green mound, and he wept, and when the song was ended he arose and cried: 'Théoden King, Théoden king! Farewell! As a father you were to me, for a little while. Farewell!'
He drew a deep breath. 'Well, I'm back', he said.