I have 3 retail sites running MSDE and I want to aggregate sales data at a
separate SQL Server. I run a VPN and I guess I need to use merge replication
to a full SQL Server Database. My questions are
1. Is the central server the publisher or subscriber
2. The three sites tables are identical and I would like a siteID added at
the table in the central server to distinguish which the data came from
3. If the central server is the publisher will unwanted data from one site
flow across to another.
4. Is what I am asking clear enough and is merge replication appropriate
For merge, the central SQL Server should be the publisher. If you filter
your articles by site name data will not flow to the other subscribers. For
your version of sql server, yes merge is the most appropriate.
However, does data only flow centrally? If so, transactional replication
would be faster, not require a guid column on each table (assuming you have
pks on each table). This would require at least sql server standard edition
everywhere.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Steve Hall" <SteveHall@.discussions.microsoft.com> wrote in message
news:A3AF25D9-8D4B-4C0E-80B6-E95ED675E82E@.microsoft.com...
>I have 3 retail sites running MSDE and I want to aggregate sales data at a
> separate SQL Server. I run a VPN and I guess I need to use merge
> replication
> to a full SQL Server Database. My questions are
> 1. Is the central server the publisher or subscriber
> 2. The three sites tables are identical and I would like a siteID added
> at
> the table in the central server to distinguish which the data came from
> 3. If the central server is the publisher will unwanted data from one site
> flow across to another.
> 4. Is what I am asking clear enough and is merge replication appropriate
|||Steve pls look at this:
http://www.replicationanswers.com/CentralSubscriberArticle.asp
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
|||You guys rock!
That is two great replies within 30 minutes of posting.
Steve
"Paul Ibison" wrote:
> Steve pls look at this:
> http://www.replicationanswers.com/CentralSubscriberArticle.asp
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
>
>
Showing posts with label merge. Show all posts
Showing posts with label merge. Show all posts
Monday, March 26, 2012
Easy query help... :(
Hi,
I'm trying to write a sql query to create a report that will act kind of like a Mail Merge in Microsoft Word. I want to send letters to our customers to remind them their machines need to be ballbar'd or calibrated.
My database is set up as follows:
CustomerInformation(CustomerID[pk], CompanyName, CompanyPhone, etc etc etc)
CustomerMachine(MachineID[pk], MachineManufacturer, MachineModel, MachineSerialNumber, MachineSize, CustomerID[fk])
LaserCalibrations(LaserID[pk], LaserDate, MachineID[fk])
Ballbars(BallbarID[pk], BallbarDate, MachineID[fk])
My query looks like this:
SELECT CustomerInformation.CustomerID, CustomerMachine.CustomerID, CustomerMachine.MachineID, CustomerMachine.MachineManufacturer, CustomerMachine.MachineModel, CustomerMachine.MachineSerialNumber, CustomerMachine.MachineSize, LaserCalibrations.LaserID, LaserCalibrations.LaserDate, LaserCalibrations.MachineID
FROM CustomerInformation, CustomerMachine, LaserCalibrations
WHERE (((CustomerInformation.CustomerID)=CustomerMachine .CustomerID) And ((CustomerMachine.MachineID)=LaserCalibrations.Mac hineID))
ORDER BY CustomerInformation.CompanyName, LaserCalibrations.LaserDate;
The problem is that it will not print the laser calibration dates in order. I wanted to include a history of past service on the letter. I tried to write the query including ballbars, but it got too messy, I think I was missing a "Distinct" descripter. I also want to change the price according to the size of the machine... and I'm not certain how to go about doing that.
Please help :)
Thanks!you have here two unrelated one-to-many relationships that cannot easily be combined in one query
if a single machine has 3 LaserCalibrations and 4 Ballbars, the query will return 12 rows for that machine
you need two separate queries, one for LaserCalibrations and a separate one for Ballbars
I'm trying to write a sql query to create a report that will act kind of like a Mail Merge in Microsoft Word. I want to send letters to our customers to remind them their machines need to be ballbar'd or calibrated.
My database is set up as follows:
CustomerInformation(CustomerID[pk], CompanyName, CompanyPhone, etc etc etc)
CustomerMachine(MachineID[pk], MachineManufacturer, MachineModel, MachineSerialNumber, MachineSize, CustomerID[fk])
LaserCalibrations(LaserID[pk], LaserDate, MachineID[fk])
Ballbars(BallbarID[pk], BallbarDate, MachineID[fk])
My query looks like this:
SELECT CustomerInformation.CustomerID, CustomerMachine.CustomerID, CustomerMachine.MachineID, CustomerMachine.MachineManufacturer, CustomerMachine.MachineModel, CustomerMachine.MachineSerialNumber, CustomerMachine.MachineSize, LaserCalibrations.LaserID, LaserCalibrations.LaserDate, LaserCalibrations.MachineID
FROM CustomerInformation, CustomerMachine, LaserCalibrations
WHERE (((CustomerInformation.CustomerID)=CustomerMachine .CustomerID) And ((CustomerMachine.MachineID)=LaserCalibrations.Mac hineID))
ORDER BY CustomerInformation.CompanyName, LaserCalibrations.LaserDate;
The problem is that it will not print the laser calibration dates in order. I wanted to include a history of past service on the letter. I tried to write the query including ballbars, but it got too messy, I think I was missing a "Distinct" descripter. I also want to change the price according to the size of the machine... and I'm not certain how to go about doing that.
Please help :)
Thanks!you have here two unrelated one-to-many relationships that cannot easily be combined in one query
if a single machine has 3 LaserCalibrations and 4 Ballbars, the query will return 12 rows for that machine
you need two separate queries, one for LaserCalibrations and a separate one for Ballbars
Subscribe to:
Posts (Atom)