Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sending a list from vfp
Message
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
00827267
Message ID:
00829595
Views:
23
What if you change your select to
select * from memsales 
  where caldate between @sdate and @edate
    AND mem_no IN 
    (SELECT x.mem_no FROM openxml(@hDoc,'VFPData/temp') with (mem_no char(6)) x)
If this doesn't help, you'll have to run your sproc from the Query Analyzer to view Execution plan. It may help you to see what slows query down.

>The results are slow if one member is passed or 200 members are passed. The good news is that the results are the same it is just the speed issue that needs to be resolved.
>
>The procedure code is as follows:
>SET QUOTED_IDENTIFIER ON
>GO
>SET ANSI_NULLS ON
>GO
>
>ALTER  procedure sp_memsales_xml  (@memno  varchar(8000),
>				   @sdate  datetime,
>				   @edate  datetime)
>as
>
>declare @hDoc int
>execute sp_xml_preparedocument @hDoc output, @memno
>
>select * from memsales m
>	join openxml(@hDoc,'VFPData/temp') with (mem_no char(6)) x
>		on m.mem_no = x.mem_no
>	where caldate between @sdate and @edate
>
>execute sp_xml_removedocument @hDoc
>
>GO
>SET QUOTED_IDENTIFIER OFF
>GO
>SET ANSI_NULLS ON
>GO
>
>I set the @memno variable so large because on the longest lists it was being truncated and errored out when I tried to run it.
>

>The fox side code is as follows:
>
<snip>>
>The member numbers are filled into a list box control from a text file. I then create a cursor from the numbers in that control.
>
>Thanks again
>Kelly
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform