Could someone convert the SyBase “Where” clause listed below to SQL Server? See SQL Script below:
[SQL]: SELECT ml.ts, ml.bus, ev.ts, ev.n, ev.route, ev.run, ev.fs, ev.loc_n, ev.rdr_c
from ml, ev
where (ev.loc_n=1 OR ev.loc_n=2 OR ev.loc_n=3) AND (ml.ts>=dateadd(hour,-20, today(*)) AND ml.ts<dateadd(minute,240,today(*)))
and ml.loc_n=ev.loc_n
and ml.id=ev.id
ORDER BY ev.loc_n, ml.bus
[Error]: SQLSTATE = 42000
Microsoft SQL Server Native Client 10.0
Incorrect syntax near '*'.
SELECT ml.ts, ml.bus, ev.ts, ev.n, ev.route, ev.run, ev.fs, ev.loc_n, ev.rdr_c from ml, ev where (ev.loc_n=1 OR ev.loc_n=2 OR ev.loc_n=3) AND (ml.ts>=dateadd(hour,-
Thanks for any assistance.
[SQL]: SELECT ml.ts, ml.bus, ev.ts, ev.n, ev.route, ev.run, ev.fs, ev.loc_n, ev.rdr_c
from ml, ev
where (ev.loc_n=1 OR ev.loc_n=2 OR ev.loc_n=3) AND (ml.ts>=dateadd(hour,-20, today(*)) AND ml.ts<dateadd(minute,240,today(*)))
and ml.loc_n=ev.loc_n
and ml.id=ev.id
ORDER BY ev.loc_n, ml.bus
[Error]: SQLSTATE = 42000
Microsoft SQL Server Native Client 10.0
Incorrect syntax near '*'.
SELECT ml.ts, ml.bus, ev.ts, ev.n, ev.route, ev.run, ev.fs, ev.loc_n, ev.rdr_c from ml, ev where (ev.loc_n=1 OR ev.loc_n=2 OR ev.loc_n=3) AND (ml.ts>=dateadd(hour,-
Thanks for any assistance.