Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Trininole
Yak Posting Veteran
83 Posts |
Posted - 2011-07-21 : 11:39:21
|
| what is the syntax on finding the same dates in a table? For example seeking the same registration dates, participation dates, exit dates on table called static claimants for an individual(s)?Roger DeFour |
|
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2011-07-21 : 11:52:13
|
| You mean dupliactes?select *from tblwhere regdate in (select regdate from tbl group by regdate having count(*) > 1)order by regdate==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
jcelko
Esteemed SQL Purist
547 Posts |
Posted - 2011-07-21 : 11:55:28
|
| Please post DDL with specs and not narratives or an invented language. We need keys, DRI actions, and constraints. Learn to use ISO-11179 rules for the data element names, avoid needless dialect and use ISO-8601 temporal formats, codes and so forth. Let us know if you can changed the DDL --CELKO--Books in Celko Series for Morgan-Kaufmann PublishingAnalytics and OLAP in SQLData and Databases: Concepts in Practice Data, Measurements and Standards in SQLSQL for SmartiesSQL Programming Style SQL Puzzles and Answers Thinking in SetsTrees and Hierarchies in SQL |
 |
|
|
Trininole
Yak Posting Veteran
83 Posts |
Posted - 2011-07-21 : 12:06:15
|
| what would be the syntax for finding duplicates for all three dates for example the regdate, particpation date and exit date being all the same?Roger DeFour |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-07-21 : 12:12:40
|
select c.*from claimant cinner join (select [registration dates], [participation dates], [exit dates] from claimant group by [registration dates], [participation dates], [exit dates] having count(*) > 1) ton t.[registration dates] = c.[registration dates]and t.[participation dates]=c.[participation dates]and t.[exit dates] = c.[exit dates] ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|
|
|