The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024

Latest message you have seen: Re: Showshifter vs. Tivo - the final score, Sky + Wins


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UKHA Classified update - SQL Help!




Jon Whiten writes:

> I _hate_ having to cut paste data from a web browser to excel - in
fact one
> of our customers attempted to convince us that this is a viable way of
> receiving orders.  It is quite simple to send (using asp) a page to
excel
> assuming the client has both Excel and IE.
>
Fair comment Jon, and I suppose it is safe to assume that everyone will
have access to both IE and Excel (after all the whole has Microsoft don't
they ;-)). I will put a page up with this functionality as soon as I get a
chance.

On a related topic, I was trying to write an SQL Server stored procedure to
drill down a 'branch' in the product hierarchy and calculate the total
number of products attached to all the branches below. The stored procedure
runs without errors, is based on the example in the 'Bokks online' but
doesn't appear to give any result! I don't have access to the code at the
moment but if there are any SQL/ASP gurus out there who fancy a challenge,
here are the table structures:

tblProductsType
ProductTypeID int
Description varchar (30)
ParentProductTypeID int
DeletedFlag int

tblProducts
ProductID int
Description varchar (100)
ProductTypeID int
StatusID int

tblStatus
StatusID int
Description varchar (30)
ArchivedFlag int
DeletedFlag int
PublishedFlag int

There are other fields on these tables, but they don't matter for now. In
plain English, what I require is a stored procedure that will take a
ProductTypeID as input and the deliver a count of all Products, with
PublishedFlag set to 1 in the Status table, across all lower level
ProductTypes that have DeletedFlag set to 0.

If anyone can help and you want more info then let me know.

Regards

Graham


Home | Main Index | Thread Index

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.