Viewing 15 posts - 14,566 through 14,580 (of 15,381 total)
lgoolsby 86333 (6/7/2011)
SELECT distinct INVOICE, MEASURE
FROM IDXRaw
am get the right number of records. Doesn't that prove that my duplicates do not have extra...
June 7, 2011 at 12:14 pm
Well distinct will always work. In fact each of those IS distinct. It is not going to solve the problem in your case.
If can give the ddl for your...
June 7, 2011 at 12:00 pm
Like this
INSERT INTO invoices (INVNUM, PROVIDER, DIVISION, BA, AGE, SEX, TES_CRE_DT,
INV_CRE_DT, INV_SER_DT, measure)
SELECT A.invoice, A.Provider, A.Division, A.BA, A.AGE_AT_DOS, A.SEX, A.TES_CRE, A.INV_CRE_DT,
A.INV_SER_DT, A.Measure
SELECT DISTINCT A.invoice, A.Provider, A.Division, A.BA, A.AGE_AT_DOS, A.SEX, A.TES_CRE,...
June 7, 2011 at 11:48 am
Then your original query should probably have needed to have a distinct .
select distinct [columns] ....
That would be why you inserted duplicates.
June 7, 2011 at 11:46 am
laddu4700 (6/6/2011)
Is it fair to provide the unique identifier (generated by our system).Just wondering how they sync username with unique identifier in their system
any suggestions for best practice. THanks
I seriously...
June 6, 2011 at 3:02 pm
We are not able to see over your shoulder nor do any of us have any knowledge of your problem other than what you stated. I can think at least...
June 6, 2011 at 2:12 pm
The number of columns is not even close to the number of columns in your group by. You are going to spend some time to format this and then go...
June 6, 2011 at 1:53 pm
your original query does not look to me like it is doing what you want it to.
SELECT A.invoice, A.Provider, A.Division, A.BA, A.AGE_AT_DOS, A.SEX, A.TES_CRE, A.INV_CRE_DT,
A.INV_SER_DT, A.Measure
FROM IDXRaw A
WHERE A.INVOICE NOT...
June 6, 2011 at 12:14 pm
I think you misunderstood what I was saying. Your original insert is inserting records it shouldn't because the query you have is not correctly selecting the records the want. This...
June 6, 2011 at 12:05 pm
Are you wanting to see what access a particular user has for each database? You can run the script I gave you above in the context of the login. Is...
June 6, 2011 at 10:42 am
Given your explanation that when you run it the first time is insert duplicates your original script is not doing what you want it to do. In other words, the...
June 6, 2011 at 9:37 am
well it will insert any records that in your select statement. It would only make sense that after they are inserted (on the first run) that they won't be inserted...
June 6, 2011 at 9:15 am
Does using a left join work better for this? something like
INSERT INTO invoices (INVNUM, PROVIDER, DIVISION, BA, AGE, SEX, TES_CRE_DT,
INV_CRE_DT, INV_SER_DT, measure)
SELECT A.invoice, A.Provider, A.Division, A.BA, A.AGE_AT_DOS, A.SEX, A.TES_CRE, A.INV_CRE_DT,
A.INV_SER_DT,...
June 6, 2011 at 9:12 am
Viewing 15 posts - 14,566 through 14,580 (of 15,381 total)