I'm new to SQL. I've used Access to create queries and some basic knowledge of sql, however, I need help with a query. I'd like to create a new field based on a field in a table. In ACCESS, I could do this in my query by naming the variable and using an if then statement. How do I do this in sql - an udf or store procedure? What I have is a customer master table with addresses and a sales table with invoice dollars. I want my query to sort by the state if the customer's country is blank, or in the USA. If the customer is in Canada, then Canada, and all others would be International. Can anyone help me? Thanks.