SQL SmarT Query

SQL SmarT Query

Post by lior » Sun, 31 Dec 1899 09:00:00

Hi all!  HHHHELP!

I have this table :

ID = Integer
PriceList_ID = Integer

About pricelists :

There are seveal of pricelists. no 0 is the deault and there are some products that
also appear in other pricelists.

Example :
ID            PriceList_ID        Name                  Weight
34345            0                   some name           12.14
34914            0                   some name2          1.06
34914            2                   some name3          1.06

^ you see ? PriceList no 2 is PriceList no 0 with some changes!!! those fields that marked as PriceList 2

I MUST FIND a Query that will give me a fixed pricelist. Let say no2.
If there are Products with same IDs, but different PriceList_IDs - It will take only the higher one (PriceList two).

What I tried is :

FROM products
Where (ID = 0) or (ID = 2)

Now !!!    HOW I can I remove the uneeded rows ?!?!?!!?!?

   I fear I will recieve answer and miss it in this HUGE newsgroup :))))
*** It doesn't have to be an SQL solution. It may be delphi solution. :)

10x ahead,




1. How to empty associated smart browser when smart viewer is emptied

Within a V8 window I have a smart browser associated with a smart viewer
using a smart query.

To empty the viewer I use the statement:
RUN dispatch IN THIS-PROCEDURE ('add-record'):U

The problem is that the browser still displays old records though the viewer
is already empty. How can I empty the smart browser (or smart query) too?

Thanks in advance


2. Can client Use Chinese code cp950 under NT4.0 Enterprise Edition + MSCS + MTS + SQL

3. Smarter hierarchy query

4. Parameter Substitution...

5. smart queries and scientists

6. Location of globals file different than 4gl file

7. HELP: documentation about smart queries on a database

8. do any have BBS source code(ASP use SQL server)

9. Is SQL 7 optimiszer smart enough ?!

10. Smart SQL command needed

11. Smart Set Based T-SQL

12. How to use Smart Pointers to Simplify SQL-DMO

13. Partition, How Smart the SQL Server is?