Hello again

I have 1 well working function and one working stored procedure which counts the quantity of rows in table.

Now I've created special table which has only two rows

1. Id (int null)(!++)
2. Rows(int not null)

In Rows I want to store the quantity of rows from another table.
So, I thought it's a piece of cake to put just in 'default value or binding' parameter the name of my function like getdate(), but looks like i'm mistaken.

So, the question is how can I assign to this row the value from my getRows() function?

Any gen is highly appreciated. Thank you.

Recommended Answers

[code]
Update SpecialTable Set Rows = dbo.GetRows(SpecialTable.Id)
[/code]

Jump to Post

All 5 Replies

Re: How to assign to row default value? 80 80
Update SpecialTable Set Rows = dbo.GetRows(SpecialTable.Id)
Re: How to assign to row default value? 80 80

Ok. this doesn't work as well, but now it not important. will get to this problem later. Thanks for support.

Re: How to assign to row default value? 80 80

Hello, looks like I need it again. Any help?

Also, I have some table where a lot of rows with repeating countries. Let's say 5 times UK, 6 times Israel, 7 times USA. I can use 'distinct' clause to print every country once.

What I need:
To count how many times every country was repeated.

example:

UK: 5
Israel: 6
USA: 7

Thank you.

Re: How to assign to row default value? 80 80

Hi,

Have you tried using the group by clause

ie

Select count (*) as total, country_name from your_table_name group by country_name

Re: How to assign to row default value? 80 80

Set a default value

1. In the Navigation Pane, right-click the form that you want to change, and then click Design View.
2. Right-click the control that you want to change, and then click Properties or press F4.
3. Click the All tab in the property sheet, locate the Default Value property, and then enter your default value.
4. Press CTRL+S to save your changes.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.