Viewing 15 posts - 136 through 150 (of 163 total)
Okay, you're 100% correct about views. Forgive my ignorance.
Just tested it out (without the linked servers part) and it's working great.
If VIEWs support linked servers, then I'll add that and...
December 28, 2006 at 7:03 pm
I'm just ignorant in that case.
How would I go about it?
BTW can views even get data from linked servers?
December 28, 2006 at 6:56 pm
Thanks for the info. You are absolutely correct.
However, I was using a SP because I need to pass an argument which will be used in the WHERE clause. VIEWS don't...
December 28, 2006 at 6:40 pm
And I should mention that sp_getAllEmployees is not simply a select * from a single employee table.
If it was, then I wouldnt have a problem just doing a select count(*)...
December 28, 2006 at 5:19 pm
No, these 2 things are used for different things.
I check to see if there are any employees. If there are but pemployee processing is off, I do something like send...
December 28, 2006 at 5:16 pm
Perhaps you are correct... but:
At one point my app just needs to know whether there are any employees. It doesn't need to know all the data. Wouldn't it be wrong...
December 28, 2006 at 5:06 pm
I can see where you are coming from, but it's a little difficult to explain all the WHY's and HOW's of what I am trying to accomplish.
All I want to...
December 28, 2006 at 4:58 pm
I don't use it in this case. It gets used somewhere else.
I was implying that the sp that needs the count of rows doesn't use the data.
Either way, this is...
December 28, 2006 at 4:28 pm
Sorry, I wasn't very clear. I use both SP's. I just don't use the actual "data" returned by sp_GetAllEmployees. All I am interested in is finding out how many rows...
December 28, 2006 at 4:20 pm
Yep, the only way I use the resultset is to determine how many rows are returned.
Also, a function is not an option as I will be calling the stored procs...
December 28, 2006 at 3:36 pm
I just want sp_CountEmployees to return the number of rows sp_GetAllEmployees returns. That's it.
December 27, 2006 at 9:37 pm
sp_CountEmployees or any other stored proc will call it.
P.S. No worries... I was just using sp_ for clarity in this example, so it's clear that that is the stored proc.
December 27, 2006 at 9:23 pm
As far as getting the count of rows goes, the following gets it (but it also gets the entire resultset from the sp_GetAllEmployees stored proc):
exec sp_GetAllEmployees
select @@rowcount
December 27, 2006 at 8:36 pm
In another stored proc. 😉
I have a stored proc that returns a table, for example, something like: sp_GetAllEmployees.
Then I want to have a separate stored proc that determines if there...
December 27, 2006 at 8:24 pm
Viewing 15 posts - 136 through 150 (of 163 total)