Showing posts with label body. Show all posts
Showing posts with label body. Show all posts

Wednesday, March 21, 2012

How to allow access to every body

It could be strange, but i would like to know what is the best way to allow
to all the employee to have access to my reports. I don't know why but, some
people can access to the reports. What should I do or stop ?
Thanks !Thought not suggested, you can edit the report properties, grant 'everyone'
browser right.
"MIB" wrote:
> It could be strange, but i would like to know what is the best way to allow
> to all the employee to have access to my reports. I don't know why but, some
> people can access to the reports. What should I do or stop ?
> Thanks !|||I assume you are using active directory to control security....Add a user
called everyone giving them browse, view folders etc.
"MIB" wrote:
> It could be strange, but i would like to know what is the best way to allow
> to all the employee to have access to my reports. I don't know why but, some
> people can access to the reports. What should I do or stop ?
> Thanks !

Monday, March 19, 2012

How to add sub-categories??

Hi all,

Can any body tell me how to add sub-categories to a database (MS SQL Server 2000) please.

I have a db with the following tables set:
Products: ProductID, CategoryID, ProductName
Categories: CategoryID, CategoryName

If a sub-category needs to be added how would I add it and what fields would it contain and the relationship between the Products and Category Table be?
Also any useful tips on this would be appreciated.

TIATIA,

If the sub-categories are the same as the categories you can just add a SubCategoryID field to your Products table. Then create a relationship between Category.CategoryID and Products.SubCategoryID.

Have some fun.|||Then does that mean i would have to add a Sub-Category Table... and the db would be like this:

Products: ProductsID, CategoryID, SubCategoryID...etc
Category: CatogeryID...etc
SubCategory: SubCategoryID...etc

the category table would have a 1-many relationship with products and a 1-many with sub-categories too?

For instance ... the products table would have books, games, music ...etc as products and books would have computers, history, science as it's sub-cats. games would have ps2, xbox ...etc as it's sub-cats.

So what would be the best way to describe the tabels and there relationships?|||I have found the best way to handle this is to have one table with an added field called 'parentID' or something like that. This value is the key on the row of the 'parent' category. This way, you can have unlimited subcategories.

Products: ProductsID, CategoryID, ...etc
Category: CatogeryID, ParentID, CategoryName, ...etc

Category Table (|seperator)
1 | 1 | 'Food & Clothing'
2 | 1 | 'Clothing'
3 | 2 | 'Shirts'
4 | 2 | 'Pants'
5 | 3 | 'Crew Neck T-Shirts'

Here we see that 'Crew Neck T-Shirts' is a sub category of 'Shirts', which is a sub category of 'Clothing', which is a sub category of 'Food & Clothing'. As you can see, this way allows for unlimited nesting of categories and is the best solution because a sub-category table would have the exact same information as the category table, so why duplicate the effort and over complicate the database?

Sunday, February 19, 2012

how to accquer certain number of records

hi,every body.
I want to use SQL syntax to get records from a database table. As the
table may contain large number of records,I would like to get a certain
number of records first and also can get more records later as necessary.Can
anyone help me?
CrespoHi
http://www.aspfaq.com/show.asp?id=2120
"Crespo" <wuhuanfa@.21cn.com> wrote in message
news:eWB4YGflGHA.4716@.TK2MSFTNGP04.phx.gbl...
> hi,every body.
> I want to use SQL syntax to get records from a database table. As the
> table may contain large number of records,I would like to get a certain
> number of records first and also can get more records later as
> necessary.Can
> anyone help me?
>
> Crespo
>|||Good work.Thank Uri Dimant very much!
Crespo
"Uri Dimant" <urid@.iscar.co.il> дÈëÏûÏ¢
news:eEkxHJflGHA.4716@.TK2MSFTNGP04.phx.gbl...
Hi
http://www.aspfaq.com/show.asp?id=2120
"Crespo" <wuhuanfa@.21cn.com> wrote in message
news:eWB4YGflGHA.4716@.TK2MSFTNGP04.phx.gbl...
> hi,every body.
> I want to use SQL syntax to get records from a database table. As the
> table may contain large number of records,I would like to get a certain
> number of records first and also can get more records later as
> necessary.Can
> anyone help me?
>
> Crespo
>|||"Crespo" <wuhuanfa@.21cn.com> wrote in message
news:eWB4YGflGHA.4716@.TK2MSFTNGP04.phx.gbl...
> hi,every body.
> I want to use SQL syntax to get records from a database table. As the
> table may contain large number of records,I would like to get a certain
> number of records first and also can get more records later as
necessary.Can
> anyone help me?
If using SQL 2005, look into using ROW_NUMBER also.
>
> Crespo
>|||Thank Uri Dimant. your suggestion works well. Thans again.
Crespo
"Uri Dimant" <urid@.iscar.co.il> дÈëÏûÏ¢
news:eEkxHJflGHA.4716@.TK2MSFTNGP04.phx.gbl...
Hi
http://www.aspfaq.com/show.asp?id=2120
"Crespo" <wuhuanfa@.21cn.com> wrote in message
news:eWB4YGflGHA.4716@.TK2MSFTNGP04.phx.gbl...
> hi,every body.
> I want to use SQL syntax to get records from a database table. As the
> table may contain large number of records,I would like to get a certain
> number of records first and also can get more records later as
> necessary.Can
> anyone help me?
>
> Crespo
>