Viewing 15 posts - 11,911 through 11,925 (of 13,465 total)
the trick is to simply join your original table with the subquery that identified the duplicates;
try this:
[font="Courier New"]
SELECT * FROM
[5K5_PatLevelData_September_2008-9_MST_20089_029]
INNER JOIN (
SELECT [PatID(HospitalNumber)],
Specialty_Service,
POD,
COUNT(*) AS [Number of Dups]
FROM [5K5_PatLevelData_September_2008-9_MST_20089_029]
GROUP BY
[PatID(HospitalNumber)],
Specialty_Service,
POD
HAVING...
November 7, 2008 at 7:58 am
i typically import into a staging table first, and then into the actual data; that way i can use something like this:
insert into FinalDestination(column list ....)
select
ltrim(rtrim(somefield)),
coalesce(somedatetimefield2,getdate()),
coalesce(somemoneyfield,0.00)
from StagingTable
that lets...
November 6, 2008 at 4:36 pm
I would suggest a different procedure to get totals for all groups:
create procedure spTotalPrestamosTipoUsuarioTotal @FechaIni varchar(10), @FechaFin varchar(10), @Tipo varchar(30)
as
begin
select
count(*) as TotalPrestamosTipoUsuario,
T.TipoUsuario
from dbo.Servicios S, dbo.Usuarios...
November 6, 2008 at 12:39 pm
bulk insert can handle comma delimited, + quote delimited data automatically, but you must use a format file.
see this blog for an example:
http://lanestechblog.blogspot.com/2008/08/sql-server-bulk-insert-using-format.html
that way there is no need to clean...
November 6, 2008 at 9:13 am
i found this link with a simple search:http://www.alpesh.nakars.com/blog/unattended-sql-server-2005-installation/
i also second guessed that by unattended installation, you might have meant "install sql2005 with my application"
which you can get more info...
November 6, 2008 at 5:08 am
just checking the basics....are you using a full path in the query, for example
select * from ServerB.DbName.dbo.Employees where Ename='Bob'
could you please show a sample query, where a table exists in...
November 6, 2008 at 5:00 am
when you restore a database on a DIFFERENT server, you get something called "orphaned users" ; remember a database with a login "Bob" on my server is not the same...
November 5, 2008 at 6:16 pm
if you think you need a cursor in a trigger, you're always, and i mean ALWAYS, looking at the problem wrong.
one of the new feature sin SQL2005 is the COLUMNS_UPDATED...
November 5, 2008 at 10:09 am
SELECT DISTINCT [Name],[Date Of Birth]
FROM [zzWembley WIC 2ND QTR 2008]
I get 2664 records with one record null
this implies that there are people who have the same name, but are...
November 5, 2008 at 9:53 am
the mdf file is open and held open by sql server....only by stopping the SQL Server service would the file date get refreshed....changes happen, but the file is never "closed"...
November 5, 2008 at 6:50 am
I looked in the registry on my machine, and I think this is where you want to go to delete old servers you no longer connect to:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Client\SuperSocketNetLib\LastConnect
mine has a list...
November 5, 2008 at 6:46 am
if you are lucky, you can hope for a couple of design standards that could make it easier.
IF you can assume that FK columns have the same name as it's...
November 5, 2008 at 6:22 am
the CDO object has the ability to send the SMTP user And password, but the default procedure
sp_send_cdosysmail does not have parameters for it;
if you don't have the sp you...
November 4, 2008 at 7:57 am
Viewing 15 posts - 11,911 through 11,925 (of 13,465 total)