3

Which construction is better, "for" or "to"?

Writes null value FOR not valid fields.

or

Writes null value TO not valid fields.

The field in question is a column in a database.

  • 1
    i suggest for. – Java D Oct 10 '13 at 11:26
3

I think it depends on what you want to say.

With the information we have, the first sentence seems the better fit because it says that: For a given field, if it has an invalid value, you write Null.

However it is not clear where you write that Null value. You could guess that maybe the Field is being set to Null, but it is not clear from your sentence.

The second sentence seems to suggest that you set to Null the fields with invalid values, but it feels a bit awkward in the way it is written. So, if that is the meaning you are trying to convey, maybe you should write something like this instead:

Writes null in the fields that have invalid values.

(Meaning you set to Null the field in the database).

Or maybe better:

Sets to null the fields that have invalid values.

2

As Dyzann wrote, it depends on what you want to say.

If you would like to fill the non valid fields with null, I would use one of the sentences Dzyann suggested. I personally like the 2nd one:

Set to null the fields that have invalid values.

(I would prefer not to use 3rd form with -s)


However, the first sentence

Write null value FOR not valid fields.

is completely valid in case you want to set nulls somewhere else (not in the non valid fields). For example, if you have 2 rows, in the 1st row you have numbers but some of them are no valid, and in the 2nd row you mark the non valid fields of the 1st row by null and the valid by one.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.