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 |
|
osirisa
Constraint Violating Yak Guru
289 Posts |
Posted - 2010-06-07 : 15:39:14
|
| Hi guys:I am having problems running this query against the Oracle database. I think I need some quotation marks. But I am not sure where to put it. Thanks for the help!!!!!!-----------------------------------------Select *FROM OPENQUERY([GSP-DRPROD], (select ppx.employee_number, ppx.full_name,pps.date_startfrom per_people_x ppxjoin per_assignments_x pax on pax.person_id = ppx.person_idjoin per_Periods_of_service pps on pax.period_of_service_id = pps.period_of_service_idwhere date_start between trunc(sysdate) - 7 and trunc(sysdate)And pax.assignment_type = 'E' And pax.primary_flag = 'Y' ) |
|
|
pk_bohra
Master Smack Fu Yak Hacker
1182 Posts |
Posted - 2010-06-07 : 23:16:28
|
| I presume that you have added [GSP-DRPROD] as linked server.Try this:Select *FROM OPENQUERY([GSP-DRPROD], ('select ppx.employee_number, ppx.full_name,pps.date_startfrom per_people_x ppxjoin per_assignments_x pax on pax.person_id = ppx.person_idjoin per_Periods_of_service pps on pax.period_of_service_id = pps.period_of_service_idwhere date_start between trunc(sysdate) - 7 and trunc(sysdate)And pax.assignment_type = ''E'' And pax.primary_flag = ''Y'' ) 'Regards,BohraI am here to learn from Masters and help new bees in learning. |
 |
|
|
|
|
|