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 |
|
JeffS23
Posting Yak Master
212 Posts |
Posted - 2008-12-13 : 14:22:18
|
| Can someone assist me with this section of coding? I looked at BOL and still have issues. THANKS!!Msg 1018, Level 15, State 1, Procedure cusMPMSuperbillSCOS06, Line 589Incorrect syntax near 'INDEX'. If this is intended as a part of a table hint, A WITH keyword and parenthesis are now required. See SQL Server Books Online for proper syntax.[CODE]SELECT TOP 1 '277.GlobalFrom' = pvp.dateofservicefrom , '278.GlobalDays' = ISNULL(pvp.gpdays , 0) , '279.GlobalTo' = DATEADD(d , pvp.gpdays , pvp.dateofservicefrom) FROM patientvisit pv JOIN patientvisitprocs pvp ( INDEX = GPDays_Voided_DateOfServiceFrom ) ON pvp.patientvisitid = pv.patientvisitid WHERE ...... (Rest of my coding).....[/CODE] |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-12-13 : 14:29:01
|
quote: Originally posted by JeffS23 Can someone assist me with this section of coding? I looked at BOL and still have issues. THANKS!!Msg 1018, Level 15, State 1, Procedure cusMPMSuperbillSCOS06, Line 589Incorrect syntax near 'INDEX'. If this is intended as a part of a table hint, A WITH keyword and parenthesis are now required. See SQL Server Books Online for proper syntax.[CODE]SELECT TOP 1 '277.GlobalFrom' = pvp.dateofservicefrom , '278.GlobalDays' = ISNULL(pvp.gpdays , 0) , '279.GlobalTo' = DATEADD(d , pvp.gpdays , pvp.dateofservicefrom) FROM patientvisit pv JOIN patientvisitprocs pvp WITH ( INDEX (GPDays_Voided_DateOfServiceFrom) ) ON pvp.patientvisitid = pv.patientvisitid WHERE ...... (Rest of my coding).....[/CODE]
try like above |
 |
|
|
JeffS23
Posting Yak Master
212 Posts |
Posted - 2008-12-13 : 14:29:08
|
| Please disregard:SELECT TOP 1 '277.GlobalFrom' = pvp.dateofservicefrom , '278.GlobalDays' = ISNULL(pvp.gpdays , 0) , '279.GlobalTo' = DATEADD(d , pvp.gpdays , pvp.dateofservicefrom) FROM patientvisit pv JOIN patientvisitprocs pvp WITH ( INDEX = GPDays_Voided_DateOfServiceFrom ) ON pvp.patientvisitid = pv.patientvisitid WHERE ...... (Rest of my coding)..... |
 |
|
|
JeffS23
Posting Yak Master
212 Posts |
Posted - 2008-12-13 : 14:29:52
|
| visakh16 -THANKS - I got it right when you posted. You were correct!! |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-12-13 : 14:33:53
|
No problem...Glad that you sorted it out |
 |
|
|
|
|
|
|
|