Personally, I like the G23 due to the flexability of the platform. With a few extra parts, i can shoot 9mm, .40 (stock) and .357 SIG.
However, if this is your first (from what I recall of intro post), I would personally go to a local store or range where you can rent the 2 and try them side by side.
You'll be qualifying with the pistol so it's important that you're comfortable enough with it and that you can practice enough with it. Some folks really do not like the "snappy" nature of the recoil of the .40 round and this affects how much you practice and your confidence.
The ammo cost between the .40 and the 9mm can be pretty significant when you start getting into consistent shooting sessions.
Just a few more things for you to consider.
D