BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

can i filter records from stored procedure

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers)
View previous topic :: View next topic  
Author Message
ganesh
Guest





PostPosted: Wed Dec 17, 2003 11:48 am    Post subject: can i filter records from stored procedure Reply with quote




can i filter records from stored procedure

if i run sp_who in sql server 2000, it returns all records, now i want to
filter by loginname, is it possible

any idea

Thanks
Back to top
Viatcheslav V. Vassiliev
Guest





PostPosted: Wed Dec 17, 2003 1:05 pm    Post subject: Re: can i filter records from stored procedure Reply with quote



sp_who has optional parameter - login_name, so

EXEC sp_who 'sa'

//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi + ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)

"ganesh" <gsganesh (AT) yahoo (DOT) com> сообщил/сообщила в новостях следующее:
news:3fe0508e$1 (AT) newsgroups (DOT) borland.com...
Quote:

can i filter records from stored procedure

if i run sp_who in sql server 2000, it returns all records, now i want to
filter by loginname, is it possible

any idea

Thanks



Back to top
Robert MacLean
Guest





PostPosted: Wed Dec 17, 2003 1:09 pm    Post subject: Re: can i filter records from stored procedure Reply with quote



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

ganesh was moved enough, that he took time and energy to create the a
news post (which will probebly come back to haunt him in the future):

Quote:
can i filter records from stored procedure

Yes


- --
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][]
Robert MacLean
[email]robert (AT) sadev (DOT) co.za[/email]
http://www.sadev.co.za
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][]

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBP+BVamKbqld7dYgLEQL7xwCgo1HXeTmE2wTdXUcqVIZXeDY3728AoPmX
Fmihu9Iwav6qkcKEdjY5uh6d
=PKup
-----END PGP SIGNATURE-----



Back to top
Ross
Guest





PostPosted: Wed Dec 17, 2003 1:15 pm    Post subject: Re: can i filter records from stored procedure Reply with quote

ganesh wrote:
Quote:
can i filter records from stored procedure

if i run sp_who in sql server 2000, it returns all records, now i want to
filter by loginname, is it possible

any idea

Thanks
sp_Who can take a parameter for the login name. Read Books On Line for

more details.
Here is the article on MSDN
http://tinyurl.com/zmgw

Ross


Back to top
Robert Cerny
Guest





PostPosted: Wed Dec 17, 2003 2:10 pm    Post subject: Re: can i filter records from stored procedure Reply with quote

All that trash around your unhelpfull "yes"...

--
Robert Cerny
DelphiShaman
"Robert MacLean" <robert (AT) nospam (DOT) sadev.co.za> wrote

Quote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

ganesh was moved enough, that he took time and energy to create the a
news post (which will probebly come back to haunt him in the future):

can i filter records from stored procedure

Yes

- --
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][]
Robert MacLean
[email]robert (AT) sadev (DOT) co.za[/email]
http://www.sadev.co.za
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][]

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com

iQA/AwUBP+BVamKbqld7dYgLEQL7xwCgo1HXeTmE2wTdXUcqVIZXeDY3728AoPmX
Fmihu9Iwav6qkcKEdjY5uh6d
=PKup
-----END PGP SIGNATURE-----





Back to top
Robert MacLean
Guest





PostPosted: Wed Dec 17, 2003 3:15 pm    Post subject: Re: can i filter records from stored procedure Reply with quote

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Cerny was moved enough, that he took time and energy to create
the a news post (which will probebly come back to haunt him in the
future):

Quote:
All that trash around your unhelpfull "yes"...

trash = maybe, probebly. but atleast i cut out anything unneed in the
post and do not top post Smile
unhelpful = WTF?

- --
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][]
Robert MacLean
[email]robert (AT) sadev (DOT) co.za[/email]
http://www.sadev.co.za
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][]

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBP+BzEmKbqld7dYgLEQI9bgCg6DlLL8EvMBH1oSc5r0pEcnHztJ4AmwX0
tsHKkIJEmIjLpMOH4EADwt4s
=1i69
-----END PGP SIGNATURE-----



Back to top
Ganesh
Guest





PostPosted: Wed Dec 17, 2003 11:22 pm    Post subject: Re: can i filter records from stored procedure Reply with quote

Thanks for your answer and comments

ok fine for sp_who, but actually i wanted to know filter stored procedure

it can not be treated as result set some how by view or .....

Thanks

"Ross" <polks71 (AT) hotmail (DOT) com> wrote

Quote:
ganesh wrote:
can i filter records from stored procedure

if i run sp_who in sql server 2000, it returns all records, now i want
to
filter by loginname, is it possible

any idea

Thanks
sp_Who can take a parameter for the login name. Read Books On Line for
more details.
Here is the article on MSDN
http://tinyurl.com/zmgw

Ross




Back to top
Robert Cerny
Guest





PostPosted: Wed Dec 17, 2003 11:48 pm    Post subject: Re: can i filter records from stored procedure Reply with quote

If you mean client side filter, use filter property.
If you mean server side, well, some servers support it, MSSQL AFAIK doesn't.

--
Robert Cerny
DelphiShaman
"Ganesh" <gsganesh (AT) yahoo (DOT) com> wrote

Quote:
Thanks for your answer and comments

ok fine for sp_who, but actually i wanted to know filter stored procedure

it can not be treated as result set some how by view or .....



Back to top
Robert MacLean
Guest





PostPosted: Thu Dec 18, 2003 5:42 am    Post subject: Re: can i filter records from stored procedure Reply with quote

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ganesh was moved enough, that he took time and energy to create the a
news post (which will probebly come back to haunt him in the future):

Quote:
ok fine for sp_who, but actually i wanted to know filter stored
procedure

it can not be treated as result set some how by view or .....
All datasets (eg TADODataset) as well as querys (eg TQuery and

TADOQuery) can work with the results of the stored proc the exact
same as if you did a "select * from table" and returned the data into
a dataset etc... (so any of the filtering options the dataset
provides will work as well)

- --
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][]
Robert MacLean
[email]robert (AT) sadev (DOT) co.za[/email]
http://www.sadev.co.za
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][]

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBP+E+VWKbqld7dYgLEQLF0gCfTaMiS2xuJq9tHc/wpoWJHBKJYFgAnisN
PMAmmp6G6CEAenDeaV4F5bdf
=5qsk
-----END PGP SIGNATURE-----



Back to top
ganesh
Guest





PostPosted: Thu Dec 18, 2003 8:05 am    Post subject: Re: can i filter records from stored procedure Reply with quote


thanks for your reply, just wanted to know is it possible from quert analyser, seems to be sql server 2000 doesn't support this future

thanks

"Robert MacLean" <robert (AT) nospam (DOT) sadev.co.za> wrote:
Quote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ganesh was moved enough, that he took time and energy to create the a
news post (which will probebly come back to haunt him in the future):

ok fine for sp_who, but actually i wanted to know filter stored
procedure

it can not be treated as result set some how by view or .....
All datasets (eg TADODataset) as well as querys (eg TQuery and
TADOQuery) can work with the results of the stored proc the exact
same as if you did a "select * from table" and returned the data into
a dataset etc... (so any of the filtering options the dataset
provides will work as well)

- --
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][]
Robert MacLean
[email]robert (AT) sadev (DOT) co.za[/email]
http://www.sadev.co.za
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][]

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com

iQA/AwUBP+E+VWKbqld7dYgLEQLF0gCfTaMiS2xuJq9tHc/wpoWJHBKJYFgAnisN
PMAmmp6G6CEAenDeaV4F5bdf
=5qsk
-----END PGP SIGNATURE-----




Back to top
Kevin Frevert
Guest





PostPosted: Thu Dec 18, 2003 1:12 pm    Post subject: Re: can i filter records from stored procedure Reply with quote

It does, sort of.

I've posted an example in the .attachments group.

krf

"ganesh" <gsganesh (AT) yahoo (DOT) com> wrote

Quote:

thanks for your reply, just wanted to know is it possible from quert
analyser, seems to be sql server 2000 doesn't support this future

thanks



Back to top
Ganesh
Guest





PostPosted: Thu Dec 18, 2003 7:00 pm    Post subject: Re: can i filter records from stored procedure Reply with quote

thanks


"Kevin Frevert" <Work (AT) drinkingcoffee (DOT) com> wrote

Quote:
It does, sort of.

I've posted an example in the .attachments group.

krf

"ganesh" <gsganesh (AT) yahoo (DOT) com> wrote in message
news:3fe16de5$1 (AT) newsgroups (DOT) borland.com...

thanks for your reply, just wanted to know is it possible from quert
analyser, seems to be sql server 2000 doesn't support this future

thanks





Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.