[thelist] ASP.NET: UNION query not returning expected results
Tab Alleman
talleman at Lumpsum.com
Fri Sep 28 09:45:37 CDT 2007
I'd stick with the UNION Rudy suggested, and replace "57" with @EmpID. Since it's a stored procedure, and not adhoc SQL, .net shouldn't try to apply the filter to the result set.
> -----Original Message-----
> From: thelist-bounces at lists.evolt.org
> [mailto:thelist-bounces at lists.evolt.org]On Behalf Of Joel D Canfield
> Sent: Friday, September 28, 2007 10:22 AM
> To: thelist at lists.evolt.org
> Subject: Re: [thelist] ASP.NET: UNION query not returning expected
> results
>
>
> > <asp:SqlDataSource ID="dsMyDataSource" runat="server"
> > ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
> > SelectCommand="MyStoredProcedure"
> SelectCommandType="StoredProcedure">
> > <SelectParameters>
> > <asp:QueryStringParameter Name="EmpID"
> > QueryStringField="id" />
> > </SelectParameters>
> > </asp:SqlDataSource>
> >
> > ...Pretty sure this would do it. This, or something like it...
>
> Yes, but what would the stored procedure look like? How do I retrive
> both the current value, where the EmpID = the QueryStringParameter,
> *plus* all the results where officeid isn't present in the Employees
> table?
>
> joel
> --
>
> * * Please support the community that supports you. * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>
More information about the thelist
mailing list