Duplicate Records

MS SQL SERVER

    Next

  • 1. Best Practices Question
    We have a small inventory database (<1GB). We have a public IIS Server and a separate box SQL 2005 backend. I have two ways I can deliver reports to the customer: 1.)create reports on the Reporting Server 2.)create them on the IIS Server locally (.rldc) In each case I use the ReportViewer component to display them (so I either connect the ReportViewer to Server Report or to a local .rdlc). My question is, is it better to create reports on the report server or to do them in the asp.net project locally -- an rdlc off a dataset? Note load is very small so server power/capacity for both is not an issue in this case. Thank you
  • 2. RS 2000 & RS 2005
    From other posts I have read, I understand that SQL Server 2000 and 2005 can co-exist on the same machine. What about RS 2000 and RS 2005? This is a development machine and I need to be able to create and deploy reports in both versions? TIA, -- AG Email: discuss at adhdata dot com
  • 3. Does the reporting server have to have SQL installed too?
    Say the Reporting server has iis and the db server is on a seperate server running SQL?
  • 4. Authentication IIS and SSRS
    I have two servers IIS Server and SQL2005. I have web app using ReportViewer on IIS Server to view reports on SQL Server SSRS. Both servers are on domain1. Authentication was not working so on IIS web app in web.config in system.web I say identity impersonate="true" userName="domain1\username" password="password" then it works fine -- but is this correct way to do? I don't like to have to have an account in there that has admin privs -- I thought it should be just impersonate="true" and not have to send a domain username/password? I read many things on nntp about this topic but was unable to finad anything to work except for the way I have it above. Thank you!
  • 5. Conditional totals for matrix report
    I have a matrix report that has the value of one (1) in the row field when my row header has that value. agent air hotel cruise ------- ---- ------ ---------- bob 1 1 jim 1 jane 1 1 What I want is a total at the bottom of the report counting the numbe of ones in the column. I am very new to SSRS as a whole, so please help!! Thanks in advance!

Duplicate Records

Postby U0FjYW51Y2s » Wed, 08 Dec 2004 01:47:16 GMT

How would I indentify duplicate Records ?

Eg. Bob has qualification A and B
 Steve has qualification A and C
Dan has qualification c and b
Nash has qualification A 

Employees with duplicate values are Bob and Nash - how do I do this in SQL?

Re: Duplicate Records

Postby Jeff A. Stucker » Wed, 08 Dec 2004 04:09:40 GMT

I'm not entirely sure what you're asking.  Could you rephrase, please?

-- 
'('     Jeff A. Stucker
\

Business Intelligence
www.criadvantage.com
--------------------------------------







Re: Duplicate Records

Postby U0FjYW51Y2s » Wed, 08 Dec 2004 04:19:07 GMT

Jeff:

The list below describes employees and the job qualifications:

Eg. Bob has qualification A and B
Steve has qualification A and C
Dan has qualification a
Nash has qualification A and B

I need a query to identify all those employees that have the same 
qualification. Using the list above only  Bob and Nash have identical 
qualifications.









Re: Duplicate Records

Postby Jeff A. Stucker » Wed, 08 Dec 2004 05:40:47 GMT

It really depends on how your qualifications are stored in the database. 
This probably is a SQL query question more than a reporting question, but if 
you post your database structure (tables/columns related to qualifications) 
we might be able to help you.

-- 
'('     Jeff A. Stucker
\

Business Intelligence
www.criadvantage.com
--------------------------------------











Re: Duplicate Records

Postby U0FjYW51Y2s » Wed, 08 Dec 2004 06:03:03 GMT

Employee Table: Contains Employee Name, And Employee ID
Employee Qualification: Contains Employee ID, and Job ID
Job ID: Contains Job ID

Employee links to employee qualifications links to jobs













Re: Duplicate Records

Postby Jeff A. Stucker » Wed, 08 Dec 2004 06:47:59 GMT

Hmmm....  This will take some thinking.  My guess is that it will take a 
FULL OUTER JOIN of the EmployeeQualification table to itself, and some very 
judicious WHERE clause manipulation to make sure that everything matches 
completely on both sides (exclude NULL values).  And depending on the logic 
you use, you may add a NOT EXISTS clause outside the whole thing.

I hope that gets you started, or at least considering some options....

Cheers,

-- 
'('     Jeff A. Stucker
\

Business Intelligence
www.criadvantage.com
--------------------------------------















Similar Threads:

1.Fix Duplicate fields Rather then Duplicate Records?

Hi All,
I have a problem...

I have duplicate field values that are causing Duplicate Records in a sense.
Examples:
--------------------------------
CREATE TABLE VTable (vid VarChar(100), vname VarChar(50))
Insert into VTable (vid, vname) Values('1', 'bill')
Insert into VTable (vid, vname) Values('2', 'bill')
Insert into VTable (vid, vname) Values('3', 'mike')
Insert into VTable (vid, vname) Values('4', 'mike')
Insert into VTable (vid, vname) Values('5', 'mike')
Insert into VTable (vid, vname) Values('6', 'jill')
Insert into VTable (vid, vname) Values('7', 'jill')

I have eight other tables that link the value of vname by relating the vid
field.  I need to essentially pick one of the duplicate records(fields) and
change the subsequent tables entries where the other ones are present:

CREATE TABEL T1(vid VarChar(100))
Insert into VTable (vid) Values('1')
Insert into VTable (vid) Values('2')
Insert into VTable (vid) Values('1')
Insert into VTable (vid) Values('3')
Insert into VTable (vid) Values('4')

I figured out a way of creating temporary tables and querying and updating
the data.  My problem with this, as I started working on it, is that I
realized that I could not get a distinct record based on vid and vname;
because in fact they are all unique records.

Any ideas how to resolve this?


2.Updating duplicate records and then deleting one of the duplicates

Hi all...

I am having a problem with what I thought should have been quite
simple:
I have a table:
declare @tb_Results table
	(PeriodSID int
	,PeriodStartDate datetime
	,PeriodEndDate dateTime
	,TotalDaysOff real)
I want to find any records that have the three fields PeriodSID
,PeriodStartDate ,PeriodEndDate  duplicated.
eg:Record 1-->12, 2005-01-01, 2005-12-31
     Record 2-->12, 2005-01-01, 2005-12-31

Once we have a duplicate record I would like to update the duplicates
with the SUM value of the duplicated TotalDaysOff fields.
I would then like to be able to delete all but one of the duplicate
records.

Any help with this would be greatly appreciated
Many thanks
Paul

3.TOUGH INSERT: Copy Sale Record/Line Items for "Duplicate" Record

I have a client who needs to copy an existing sale.  The problem is
the Sale is made up of three tables:  Sale, SaleEquipment, SaleParts. 
Each sale can have multiple pieces of equipment with corresponding
parts, or parts without equipment.  My problem in copying is when I go
to copy the parts, how do I get the NEW sale equipment ids updated
correctly on their corresponding parts?

I can provide more information if necessary.
Thank you!!

Maria

4.How to Select First Record when we have duplicate records

Hi All,
How to Select the "First Record" from the Table when we have duplicate 
values. and we dont want to see the duplicate values.
Scanario.
i have Company and Address Table,
Company_id is the foreign key in Address table.
one company can multiple addresses.
plz guide me how i can select the company first address.
Thanx in Advance
Tenzeel.

5.duplicate record-...type mismatch

I have a frontend (*.adp) - backend (Sqlserver) application. 
I made a command button on a form that takes the current record,
duplicates it and then displays the new identical record. 
When I compile the procedure, I haven't errors, but when I click on a 
command button I get message 'Type mismatch'.
I have selected reference MS DAO 3.6. Object Library.
What's wrong?
Thanks in advance, Marie


Private Sub cmd_Duplicate_Click()
On Error GoTo Err_cmd_Duplicate_Click

    Dim Sifr As Long
    Dim RstDup As Recordset
    Sifr = Me.ID
   
    Set RstDup = Me.RecordsetClone
   DoCmd.GoToRecord , , acNewRec
    RstDup.FindFirst "[ID]=" & Sifr
   
    If Not RstDup.NoMatch Then
        Me!ID_nar = RstDup!ID_nar
        Me!ID_izv = RstDup!ID_izv
        'etc.
        RunCommand acCmdSaveRecord
    End If
   
    RstDup.Close
    Set RstDup = Nothing

Exit_cmd_Duplicate_Click:
    Exit Sub

Err_cmd_Duplicate_Click:
    MsgBox Err.Description
    Resume Exit_cmd_Duplicate_Click

End Sub
-- 
marie

6. Duplicate Record

7. Duplicate Records in Access 2000 linked to SQL 2000

8. Duplicate records when sending SQL update statements



Return to MS SQL SERVER

 

Who is online

Users browsing this forum: No registered users and 53 guest