Target posted better-than-expected fiscal second-quarter sales and raised its full-year outlook.