Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
sqllearner
Aged Yak Warrior
639 Posts |
Posted - 2004-10-04 : 13:00:41
|
| Here When I execute the query it works but in the application its giving some error saying comma problem.Here the datecompleted is a string in the table SELECT MAX(ISNULL(DATECOMPLETED,'')) orderDate FROM tbl_track(nolock) WHERE mc_code = @unique_id |
|
|
sqllearner
Aged Yak Warrior
639 Posts |
Posted - 2004-10-04 : 13:24:26
|
| if I use COALESCE will it have a difference to the above |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2004-10-04 : 13:32:55
|
Coalesce won't have any diff. if it works in the QA then maybe the problem is in your app?Go with the flow & have fun! Else fight the flow |
 |
|
|
sqllearner
Aged Yak Warrior
639 Posts |
Posted - 2004-10-04 : 13:36:41
|
| okay Thanks a lot |
 |
|
|
sqllearner
Aged Yak Warrior
639 Posts |
Posted - 2004-10-04 : 13:37:12
|
| should I convert the date to datetime right now its varchar |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2004-10-04 : 13:51:07
|
well it depends on your date format.if you store it in yyyymmdd then nobut if it's dd.mm.yyyy you should.you probably should because that way you'll get the max date and not the max string.Go with the flow & have fun! Else fight the flow |
 |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2004-10-04 : 14:13:19
|
| you are mixing two different return types in the same expression -- a date and a string. The same column in a resultset cannot have two different data types. Why are you trying to replace NULL dates with '' ? What does that accomplish for you?- Jeff |
 |
|
|
|
|
|