Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SQL Server Datawindow Argument

89 views
Skip to first unread message

Steve Smith

unread,
Feb 18, 2008, 10:51:03 AM2/18/08
to
I'm migrating a PB app from Oracle to SQL Server and having a problem with
one of my datawindows.
The SQL looks something like this...

SELECT prt_batch_report.report_no, prt_report.report_id,
prt_report.report_name
FROM prt_batch_report, prt_report
WHERE
prt_report.report_id = prt_batch_report.report_id AND
prt_batch_report.batch_id = 3 AND
prt_batch_report.report_no NOT IN (
SELECT prt_job_status.report_no
FROM prt_job_status
WHERE prt_job_status.job_id = :an_job_id
AND prt_job_status.status = 'S')

This works fine for Oracle, but when I try to retrieve the DW against SQL
Server I get an error (SQLState= 37000, [Microsoft][ODBC SQL Server Driver]
Syntax Error or access violation.
If I replace the argument with a fixed value then the retrieve works fine.

Any assistance anyone can offer will be much appreciated.

Steve


fisher

unread,
Feb 18, 2008, 11:00:37 AM2/18/08
to
Hi Steve,

It's basically because of the argument in subquery.
Try to change binding settings before retrieving.

You can "google" this in newsgroup

like
http://groups.google.pl/group/sybase.public.powerbuilder.datawindow/browse_thread/thread/7881fcdc87d4268/cfa791b8feacd683?hl=pl&lnk=gst&q=subquery+parameter#cfa791b8feacd683
Regards

Steve Smith pisze:

Steve Smith

unread,
Feb 19, 2008, 3:35:06 AM2/19/08
to
thanks - that fixed it for me

"fisher" <fisher_NO@SPAM_wckp.lodz.pl_PLEASE> wrote in message
news:47b9aba5$1@forums-1-dub...

0 new messages