Click here to Skip to main content
15,915,093 members
Home / Discussions / Database
   

Database

 
GeneralRe: SQL Server fills event log Pin
Hesham Amin4-Feb-05 23:48
Hesham Amin4-Feb-05 23:48 
GeneralDifficult JOIN Pin
Luis Alonso Ramos4-Feb-05 15:24
Luis Alonso Ramos4-Feb-05 15:24 
GeneralRe: Difficult JOIN Pin
Yulianto.4-Feb-05 16:05
Yulianto.4-Feb-05 16:05 
GeneralRe: Difficult JOIN Pin
Luis Alonso Ramos4-Feb-05 19:18
Luis Alonso Ramos4-Feb-05 19:18 
GeneralRe: Difficult JOIN Pin
Mike Dimmick5-Feb-05 1:52
Mike Dimmick5-Feb-05 1:52 
GeneralRe: Difficult JOIN Pin
Luis Alonso Ramos5-Feb-05 6:41
Luis Alonso Ramos5-Feb-05 6:41 
GeneralRe: Difficult JOIN Pin
Mike Dimmick5-Feb-05 7:32
Mike Dimmick5-Feb-05 7:32 
GeneralRe: Difficult JOIN Pin
Luis Alonso Ramos5-Feb-05 8:13
Luis Alonso Ramos5-Feb-05 8:13 
Wow! that was a long reply, thank you very much!! Big Grin | :-D

I had already solved my problem with what you suggested in your last post about denormalizing my table. I developed a simple SP that would update the customer record with the ID_address of the latest address after all addresses had been inserted/updated. The only problem was that I had to call that SP at the end of every customer save operation.

I've copied and tested your query now, and after adding some WHERE clauses, I think it works beautifully. So I've just updated my search stored procedure, and removed the ID_lastaddress field from my Customers table. All I can say is THANKS!

That thing about unique search column, I don't think it'll be a problem. Even if somehow the customer could move twice in the same day, the address is stored in a datetime, and using DateTime objects in C# makes the column contain a date and a time, so they'll always be different.

So, I won't be needing triggers for this particular use anymore, but it sure will be useful to know about them for a later need. I've never had any formal SQL training (not even read a book). I only recently learned about stored procedures, and mainly design all my queries (JOINs and all that) in Access. But know I look back to some other projects I developed earlier and I see how much code I could have replaced with a little stored procedure. I guess it happens to everyone, once you learn a new thing you see a thousand places where that could have been useful in the past.

Well, I better keep on working that I still have plenty of things to do today (and it's Saturday noon for me.) Again, thank you very much for your help!

-- LuisR



Luis Alonso Ramos
Intelectix - Chihuahua, Mexico

Not much here: My CP Blog!

Generali can't to insert a new row Pin
Sasuko4-Feb-05 6:38
Sasuko4-Feb-05 6:38 
GeneralRe: i can't to insert a new row Pin
tojamismis4-Feb-05 6:52
tojamismis4-Feb-05 6:52 
GeneralRe: i can't to insert a new row Pin
Sasuko4-Feb-05 11:00
Sasuko4-Feb-05 11:00 
GeneralRe: i can't to insert a new row Pin
tojamismis4-Feb-05 11:23
tojamismis4-Feb-05 11:23 
GeneralRe: i can't to insert a new row Pin
Sasuko4-Feb-05 11:30
Sasuko4-Feb-05 11:30 
GeneralRe: i can't to insert a new row Pin
tojamismis4-Feb-05 14:11
tojamismis4-Feb-05 14:11 
GeneralRe: i can't to insert a new row Pin
Sasuko4-Feb-05 22:29
Sasuko4-Feb-05 22:29 
GeneralRe: i can't to insert a new row Pin
Sasuko4-Feb-05 23:58
Sasuko4-Feb-05 23:58 
GeneralRe: i can't to insert a new row Pin
tojamismis5-Feb-05 4:49
tojamismis5-Feb-05 4:49 
GeneralRe: i can't to insert a new row Pin
Sasuko5-Feb-05 12:22
Sasuko5-Feb-05 12:22 
GeneralRe: i can't to insert a new row Pin
tojamismis5-Feb-05 4:47
tojamismis5-Feb-05 4:47 
GeneralRe: i can't to insert a new row Pin
tojamismis5-Feb-05 4:58
tojamismis5-Feb-05 4:58 
GeneralEnterprise manger Pin
Tom Wright4-Feb-05 5:50
Tom Wright4-Feb-05 5:50 
GeneralRe: Enterprise manger Pin
David Salter4-Feb-05 6:15
David Salter4-Feb-05 6:15 
GeneralRe: Enterprise manger Pin
Tom Wright4-Feb-05 6:43
Tom Wright4-Feb-05 6:43 
GeneralRe: Enterprise manger Pin
tojamismis4-Feb-05 6:43
tojamismis4-Feb-05 6:43 
GeneralRe: Enterprise manger Pin
Tom Wright4-Feb-05 6:45
Tom Wright4-Feb-05 6:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.