Viewing 15 posts - 11,371 through 11,385 (of 18,923 total)
I forgot to mention this. It's safer to create a variable a save the value of @@rowcount.
That's because @@rowcount is evaluated after any t-sql statement... as demonstrated here :
Declare...
November 2, 2006 at 5:59 am
Yes it does. But just creating a fake primary key on a view will not fix the problem. You need to create a primary key on the table(s) displayed in the...
November 1, 2006 at 12:25 pm
create procedure...
insert into ...
Select...
IF @@RowCount = 0
BEGIN
RAISERROR ('No rows were inserted (SpName)', 13, 1)
RETURN 1 --custom error message for that proc
END
November 1, 2006 at 12:23 pm
I would suggest you go back to the developpers to see if they can find a better solution.. if they can't and you have a working one, then use it......
November 1, 2006 at 12:14 pm
Again WHY????
Explain from A to Z what you need to do. There are way too many possibilities for me to start answering that question.
November 1, 2006 at 12:05 pm
And the view is only used on the server???
Can you give more details on what you are trying to accomplish, it would greatly help us provide the best solution.
November 1, 2006 at 11:49 am
Why can't you use the application to display the row count?
November 1, 2006 at 11:22 am
Thanx for the appreciation. I had also considered you version, but I didn't like the fact that I couldn't reverse engineer the constraint to understand the business rule. And since...
November 1, 2006 at 10:17 am
Thanx for clearing that up. As for the outrage part, I can't say I didn't feel the need to but I try to let the user explain the reasons before...
November 1, 2006 at 8:45 am
I'm tempted to say that you should reconsider the whole operation. I never saw the need for continuous calls of the same function to do selects.
Can you post some sample...
November 1, 2006 at 7:30 am
Alright, thanx for clearing this up.
Good luck finishing that project!
November 1, 2006 at 7:29 am
Can you post some sample data and the required output... without that we can't help you anymore than we already did.
October 31, 2006 at 4:02 pm
The view in question is located in the master database.
However the information displayed comes from the database from where you call the view.
So if you call the view from pubs,...
October 31, 2006 at 2:50 pm
I'm afraid to ask but here it goes :
Why isn't this data kept in a single date time column?
In a single ROW????
October 31, 2006 at 1:42 pm
Then I suggest you tell him to prove you wrong. Otherwise you can send him the link to this thread and start doing some more productive work!
October 31, 2006 at 11:19 am
Viewing 15 posts - 11,371 through 11,385 (of 18,923 total)