Question: I have excel sheet data like below 

```
CustomerNo LoginDate
101        25/05/2012
101        10/05/2012
101        20/05/2012
101        10/04/2012
102        21/05/2012
102        12/04/2012
103        20/05/2012
104        08/04/2012

```

I want to get last login date match with customer number and result like below.

```
101   25/05/2012
102   21/05/2012
103   20/05/2012
104   08/04/2012

```

Answer: 
Without an ORM, prepared statements or stored procedures I'd be cautious of any string SQL sanitization routine.
No.

Let's say you have an integer field which they input a PIN into:

"SELECT columns FROM table WHERE PIN = " + sanitizedstring

and then for input you type in:
1234 OR 1 = 1

And now your "pin" always is accepted, without any funny characters being used.

This could work for fields besides ints too (since yes, you could validate that an int input is actually an int before handing it over to the SQL.)