If you want to use user ID or name in SPQUery then there are few ways you can pass user information. You can use user name to filter or you can use user id. You can download U2U CAML Query builder to build query.
1. Query with user name
If you have user name and you need to query a list with that user name then you can do so by using the following CAML query:
<FieldRef Name='SalesPerson' />
In the above CAML the value type user means the that the filed contains user data. If you use domain account then user name value will be domain\username. For domain you also need to set the show field option to account as shown below:
2. Query with User ID
If you have user ID instead of user name then you need to modify the above CAML query a bit. If you even use U2U CAML Query builder, it doesn't provide the support of User ID. The following CAML will result all list items with SalesPerson ID 7.
<FieldRef Name='SlaesPerson' LookupId='true' />
In the above CAML query LookupId means to compare ID instead of user name.
FYI, CAML is case sensitive.