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 |
dowens
Yak Posting Veteran
82 Posts |
Posted - 2005-08-01 : 10:48:36
|
Receiving a Syntax error converting datetime from character string.Not sure why? Very new at SQL.All views are unions. User accesses data via Crystal.Below is the SQL generated by Crystal.How can I fix the syntax error? SELECT "MainView"."ClmId", "MainView"."LOB", "MainView"."MbrId", "MainView"."DOB", "MainView"."ICD9_1", "MainView"."ICD9_2", "MainView"."ICD9_3", "MainView"."ClmType", "MainView"."DOS", "MainView"."CPTCd", "MainView"."Billed", "MainView"."Max", "MainView"."Disc", "MainView"."Copay", "MainView"."Ded", "MainView"."Coins", "MainView"."Paid", "MainView"."AdjCd", "MainView"."RevExists" FROM "fl1st"."dbo"."MainView" "MainView" WHERE ("MainView"."LOB"='t082' OR "MainView"."LOB"='t084' OR "MainView"."LOB"='t087') AND "MainView"."RevExists"='0' AND ("MainView"."ICD9_1" LIKE 'v03%' OR "MainView"."ICD9_1" LIKE 'v04%' OR "MainView"."ICD9_1" LIKE 'v05%' OR "MainView"."ICD9_1" LIKE 'v06%' OR "MainView"."ICD9_1" LIKE 'v20%' OR "MainView"."ICD9_1" LIKE 'v25.43%' OR "MainView"."ICD9_1" LIKE 'v30%' OR "MainView"."ICD9_1" LIKE 'v70%' OR "MainView"."ICD9_1" LIKE 'v72.3%' OR "MainView"."ICD9_1" LIKE 'v76%') AND ("MainView"."DOS">={ts '2004-07-01 00:00:00'} AND "MainView"."DOS"<{ts '2005-06-30 00:00:01'}) |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-08-01 : 10:54:04
|
Try DOS"<Date({ts '2005-06-30 00:00:01'}))MadhivananFailing to plan is Planning to fail |
|
|
dowens
Yak Posting Veteran
82 Posts |
Posted - 2005-08-01 : 10:59:55
|
Still did not work! |
|
|
dowens
Yak Posting Veteran
82 Posts |
Posted - 2005-08-01 : 11:00:05
|
Still did not work! |
|
|
|
|
|
|
|