Re: [SQL] some howto/theory book/tutorial on practical problem solving in SQL

2009-01-11 Thread Ivan Sergio Borgonovo
On Sun, 11 Jan 2009 11:19:19 -0700 "Scott Marlowe" wrote: > On Sun, Jan 11, 2009 at 9:32 AM, Ivan Sergio Borgonovo > wrote: > > My current problem is how to manage discounts in SQL, inside > > transactions. Specifically how to "delete" promotions if they are > > overlapping, considering I have

Re: [SQL] Seeking for the fore-part of the key

2009-01-11 Thread Andreas Kretschmer
Havasvölgyi Ottó schrieb: > Hi, > > Let's assume I have a table (called tbl) with a column 'name' and an index on > it. > How to optimally find records whose name column begins with - say - "Pre"? > I know it can be done with LIKE (WHERE name LIKE 'Pre%'), but will this use > the > index mentio

[SQL] Seeking for the fore-part of the key

2009-01-11 Thread Havasvölgyi Ottó
Hi, Let's assume I have a table (called tbl) with a column 'name' and an index on it. How to optimally find records whose name column begins with - say - "Pre"? I know it can be done with LIKE (WHERE name LIKE 'Pre%'), but will this use the index mentioned above to optimize the search? Thanks, Ot

Re: [SQL] some howto/theory book/tutorial on practical problem solving in SQL

2009-01-11 Thread Scott Marlowe
On Sun, Jan 11, 2009 at 9:32 AM, Ivan Sergio Borgonovo wrote: > > My current problem is how to manage discounts in SQL, inside > transactions. Specifically how to "delete" promotions if they are > overlapping, considering I have to display discounted prices on a 1M > article DB and I may have hund

[SQL] some howto/theory book/tutorial on practical problem solving in SQL

2009-01-11 Thread Ivan Sergio Borgonovo
I'm looking to some book/tutorial/sample code that will teach me how to use SQL to solve some standard problem that goes a bit beyond using group by and aggregates. Something like "SQL problem solving" or "SQL design strategies for selected problems". My current problem is how to manage discounts