indexing in a table

Hi,

Can anyone confirm (or deny) that when indexing in a table is set to 'Yes - 
No Duplicates' and then you try and append data from a sorted query into that 
table, DOES THE TABLE ALWAYS ACCEPT THE FIRST ROW (as sorted by the query) or 
is it more random than that.

thanks

S
0
Utf
2/28/2010 10:19:01 PM
access 16762 articles. 3 followers. Follow

4 Replies
719 Views

Similar Articles

[PageSpeed] 1

On Sun, 28 Feb 2010 14:19:01 -0800, sdg8481
<sdg8481@discussions.microsoft.com> wrote:

SQL is not random. In fact it is firmly rooted in mathematical set
theory, and all its operations are 100% predictable.
If you meant to ask "I have another table that has data that would
violate the unique index; what happens when I append that data to this
table with unique index?"  I would expect that indeed the first rows
would make it to the table. If you wanted to be sure, you would change
your query to only select those "first" records. Techniques like
"select * from Orders where OrderDate = (select Min(OrderDate) from
Orders O2 where O2.CustomerID = Orders.CustomerID)" can be used.

-Tom.
Microsoft Access MVP


>Hi,
>
>Can anyone confirm (or deny) that when indexing in a table is set to 'Yes - 
>No Duplicates' and then you try and append data from a sorted query into that 
>table, DOES THE TABLE ALWAYS ACCEPT THE FIRST ROW (as sorted by the query) or 
>is it more random than that.
>
>thanks
>
>S
0
Tom
3/1/2010 4:25:08 AM
Thats what i thought and thats what i was hoping you would say..

Thank You

"Tom van Stiphout" wrote:

> On Sun, 28 Feb 2010 14:19:01 -0800, sdg8481
> <sdg8481@discussions.microsoft.com> wrote:
> 
> SQL is not random. In fact it is firmly rooted in mathematical set
> theory, and all its operations are 100% predictable.
> If you meant to ask "I have another table that has data that would
> violate the unique index; what happens when I append that data to this
> table with unique index?"  I would expect that indeed the first rows
> would make it to the table. If you wanted to be sure, you would change
> your query to only select those "first" records. Techniques like
> "select * from Orders where OrderDate = (select Min(OrderDate) from
> Orders O2 where O2.CustomerID = Orders.CustomerID)" can be used.
> 
> -Tom.
> Microsoft Access MVP
> 
> 
> >Hi,
> >
> >Can anyone confirm (or deny) that when indexing in a table is set to 'Yes - 
> >No Duplicates' and then you try and append data from a sorted query into that 
> >table, DOES THE TABLE ALWAYS ACCEPT THE FIRST ROW (as sorted by the query) or 
> >is it more random than that.
> >
> >thanks
> >
> >S
> .
> 
0
Utf
3/1/2010 3:43:01 PM
"sdg8481" <sdg8481@discussions.microsoft.com> wrote in message 
news:E2722264-D9CF-4A2D-BA22-5DB26056DA80@microsoft.com...
> Thats what i thought and thats what i was hoping you would say..
>
> Thank You
>
> "Tom van Stiphout" wrote:
>
>> On Sun, 28 Feb 2010 14:19:01 -0800, sdg8481
>> <sdg8481@discussions.microsoft.com> wrote:
>>
>> SQL is not random. In fact it is firmly rooted in mathematical set
>> theory, and all its operations are 100% predictable.
>> If you meant to ask "I have another table that has data that would
>> violate the unique index; what happens when I append that data to this
>> table with unique index?"  I would expect that indeed the first rows
>> would make it to the table. If you wanted to be sure, you would change
>> your query to only select those "first" records. Techniques like
>> "select * from Orders where OrderDate = (select Min(OrderDate) from
>> Orders O2 where O2.CustomerID = Orders.CustomerID)" can be used.
>>
>> -Tom.
>> Microsoft Access MVP
>>
>>
>> >Hi,
>> >
>> >Can anyone confirm (or deny) that when indexing in a table is set to 
>> >'Yes -
>> >No Duplicates' and then you try and append data from a sorted query into 
>> >that
>> >table, DOES THE TABLE ALWAYS ACCEPT THE FIRST ROW (as sorted by the 
>> >query) or
>> >is it more random than that.
>> >
>> >thanks
>> >
>> >S
>> .
>> 

0
De
3/13/2010 5:57:46 PM
;,;,v,;

"sdg8481" <sdg8481@discussions.microsoft.com> a écrit dans le message de 
groupe de discussion : EEBD764B-EBEE-4F8A-80E1-A6440788EB63@microsoft.com...
> Hi,
>
> Can anyone confirm (or deny) that when indexing in a table is set to 
> 'Yes -
> No Duplicates' and then you try and append data from a sorted query into 
> that
> table, DOES THE TABLE ALWAYS ACCEPT THE FIRST ROW (as sorted by the query) 
> or
> is it more random than that.
>
> thanks
>
> S 

0
joelgeraldine
3/17/2010 1:42:11 PM
Reply:

Similar Artilces:

Link Access table to Excel worksheet
I want to link these so that they can be edited in either programme. Whichever way, the link box is greyed out. You can make a linked table in Access. It's File - Get External Data - Link. The data lives in the Excel workbook, I think (I don't think Access keeps a copy of it). But you can change data in either Excel or Access. -- Earl Kiosterud mvpearl omitthisword at verizon period net ------------------------------------------- "dalesrunner" <dalesrunner@discussions.microsoft.com> wrote in message news:A165D6C6-D173-45F7-94D5-352E3AA5121E@microsoft.com... ...

Using a query versus a table for the look up wizard
Hello, I have a field which I would like to use the lookup wizard for to generate a drop down list for the user to select from. My question is whether my databse would run faster if I used: a query from an already established table as the values for the lookup wizard, or to build a new table to hold the information for the lookup wizard to use. I think you'll find few of us recommend the use of the Lookup Wizard. Lookup fields only have a place in tables, and your users should never be working directly with the tables. Create a form, and use a combo box on the form. (See http...

Copy html table to word not keeping settings
I want to copy a html table to a word programatically. I have manage to get to a point where the table is pasted. But the paste is not the same as if i would use Ctrl+V or Edit/Paste. For merged cells the font settings are not kept. Is there a way to keep the settings for merged cells? Or a way to paste the html table in a word like the Ctrl+C/Ctrl+V does? ...

Table of Conents Out of Order`
Using Word 2007 and I have created a Table of Contents within a frame (working on a newsletter). The TOC is picking up its data from styles and it works perfectly, except the items within the table of contents are out of order. For example, I have two articles on page 1 and the second article title is showing first in the table of contents. Suggestions? As always, thank you for any help you can provide. If the articles are in text boxes, it could be that the "second" article is anchored to a paragraph that actually precedes the paragraph to which the "first&q...

Webstore / exchnage Table
I want to import my XML order document into the database table "Exchange" set the ProcessorCode field to "YahooStore". Due to my limited expierence with XML I can not get the file into the Exchange table. Is there a specific SP, DTS or VB script that does this? Also, if I have multiple orders in one file do I need to strip them out and insert into the exchange table as individual orders? Your assistance would be much appreciated. Cliff ...

Is it possible to get text values in a pivot table?
From this: ROW COL VAL A HD1 X B HD2 Y B HD1 Z C HD3 J A HD3 Z B HD3 R C HD1 S Get this? Var of VAL COL ROW HD1 HD2 HD3 A X Z B Z Y R C S J (If 2 rows go to same cell, would need to get maximum or first). Not with Pivot Table Let you A, B C data be A1:A7, the HDn data in B1:B7 and the other data in C1:C7 In some convenient place (I use A11) enter =A1&B1 and copy down the column (you could put this in another sheet or in a hidden column) Make the heading HD1, HD2 - I did this in F1:H1 and the row ...

In Excel 2000, How can I change the order in a pivot table?
I am having problems changing the order of my pivot table. The "Drop Column Fields here" is date related and I grouped that area by month. I can change the chart data series order, save the file, close the file, then reopen it and the changes go back to the default view before the series order in the chart changed. I have another co-worker that has Office 2003 and it does not happen to her. It retains the information as she saved it. Is it a glitch in Excel 2000? ...

copy a pivot table to another sheet in a macro
Hi there, I created a macro that will copy copy the information from a created pivot table to another sheet. I seemed ok when I recorded the macro. But there's no pivot table on the new sheet when I run the macro. What should I do to correct the problem? Thanks, Aline -- Aline Record another macro when you try it again? If it fails again, you may want to describe what you did to copy the data (copy the cells to a new sheet or copy the sheet???). And share the code (that fails) that does the copy. Aline wrote: > > Hi there, > > I created a...

How do I print addresses in an Excel table on a flyer for mailing?
I have a one-sided flyer that will be tri-folded for mailing. Before folding, how do I print the addresses from an Excel table on the blank side of the flyer? And how do I include my return address? -- kateinmo Hi Kateinmo, Look here: http://www.mvps.org/dmcritchie/excel/mailmerg.htm -- Kind regards, Niek Otten Microsoft MVP - Excel "kateinmo" <kateinmo@discussions.microsoft.com> wrote in message news:8542D8A7-0132-42DF-933A-5E1B7780CF4D@microsoft.com... |I have a one-sided flyer that will be tri-folded for mailing. Before folding, | how do I print the addresses fr...

Index/Contents Sheet
I use Excel for 90% of the day. I use and create lots of sheets. Nothing is worse than when your Boss asks you a question and you say "I have that info in a sheet I created last month", but because it i over a month ago you either cannot remember the name or in which of th multitude of folders it lives in. and he is standing there looking mor and more frustrated as you do a search on *.xls at a rough date. I got really sick of this scenario and decided to do something about i and this might help you! Save a sheet called 'Commonly Used Files' or anything you want i Program...

Table Filters and Empty Records
Hi, I'm quite new to Reporting Services and am having a bit of a confusing afternoon with it. I'm trying to build a report that contains a series of discrete reports for a number of projects that show project data and any milestone tasks associated with each project; if a project has no milesetones, the project data is still to be displayed. So, I build a report that has a series of fields showing project information (name, cost, state, etc.) and then a table below it to contain the milestone tasks for each project. All of these are placed within a list data region ...

Display table name as field in query
Does anyone know if there is a way to display the table name as a field in a query? I have a UNION query that merges all of the records from 10 different tables, but I need a field that indicates which table each record comes from. Any help would be greatly appreciated. Thanks, Craig Craig wrote: >Does anyone know if there is a way to display the table name as a field in a >query? > >I have a UNION query that merges all of the records from 10 different >tables, but I need a field that indicates which table each record comes from. Just use the table name in a calcula...

pivot table with dynamic base data
hiya, im trying to create a pivot table where I can change my base data (inserting or deleting rows of data) and still have this reflected in the pivot table. My solution was to use entire columns as my range for input to the pivotTable, but this means including blank rows which seems to muck up the calculations. I cant think how else i can allow for new rows to be added to the base data anyone got any ideas how to do this? thanks loads for your help! You can use a dynamic range as the source. There are instructions here: http://www.contextures.com/xlPivot01.html bb wrote: > hiy...

Ref Transfering Info from a table
I don't know if I'm asking the impossible here but I'll give it a try. I have a excel program which I am trying to set up a function whereby it will create a work rota based on a shift pattern. It currently will create a table with staff names on it and there shift pattern for a given week. What I am trying to do is let the user select shift pattern 1 for example and have excel transfer this onto the rota but place the name instead of shift in the appropriate shift. ie If I select shift 1 it will place name A onto the early shift and place A on the Day off line whi...

Selecting Maximum Values in a Query with joins to other tables
I'm having difficulty with a query and hope someone can help me out. Basically, I'm looking to select the maximum amounts from a table based on a column in one of the tables named StateID. It works fine when I do this: SELECT TOP (100) PERCENT dbo.Bids.StateID, MAX(DISTINCT dbo.Bids.Amount) AS Amount, dbo.States.StateName FROM dbo.Bids INNER JOIN dbo.States ON dbo.Bids.StateID = dbo.States.StateID GROUP BY dbo.Bids.StateID, dbo.States.StateName ORDER BY dbo.States.StateName However, when I start to join fields from other tables in...

table sy_users error
Hi; I am new to GP and this client is using ver 5 on win 98. We are getting message on both pcs now that " an open operation on table sy_users_mstr failed because the path does not exist or ... main pc that handles gp has multiple directorys. GP seems to operate out of c:\acct\dynamics. Under utilitys I see where one can change which machine uses alias for c. Most of the pcs use a mapped drive g ( that goes to the main pc, directory acct (NOT all the way to dyamics) or f that goes to same pc, another directory not in my mind just now. thanks for any help. I am assumming that this i...

Pivot Table #16
After I have created my Pivot Table, how do I find the "source data" from the Pivot Table i just created. Thanks in advance. DaveB Right click... go to pivot wizard... press back a couple times to get to the source data. >-----Original Message----- >After I have created my Pivot Table, how do I find >the "source data" from the Pivot Table i just created. >Thanks in advance. > >DaveB >. > ...

Pivot Table? #2
This is an example of my data Name ID Source A SA Amt a SA Amt b SA Amt c Source B SB Amt a SB Amt b SB Amt JAMES 23 1 40 500 1000 10 10 100 75 JOHN 24 10 0 800 1200 4 15 200 80 SUE 25 3 20 1000 700 1 20 300 95 BETTY 26 1 30 2000 2500 10 25 400 110 BOSS 27 3 5000 3000 4000 1 30 500 120 This is what I want it to look like Name ID Source Amt a Amt b Amt JAMES 23 1 40 500 100 10 10 100 75 7 1000 350 10 JOHN 24 10 0 800 120 4 15 200 80 SUE 25 3 20 1000 70 1 20 300 95 BETTY 26 1 30 2000 250 10 25 400 110 BOSS 27 3 5000 3000 400 1 30 500 120 6190 9150 1430 What is the ...

charting pivot table results by month
I am trying to create a chart that shows monthly totals from pivot table results. Each record has a date in the first field in the format, 01/01/2004. I have been using the Month function on the date field to change it to a number corresponding to the month before creating the pivot chart. This gives me the monthly totals that I need but I think there must be an easier way. Any suggestions? Thanks. Ken Ken - If you use a custom number format of m or mm, your date will appear as just the month's number, 2 or 02 for February. mmm would give you Feb, and mmmm February. This wouldn'...

Table Names
Does anyone know the table names for Ship To Addresses and for Sales Header data? I need to extract these two tables from SQL and do know what tables to use. Thank you. Regards, Diane All the information you requested can be found in the SOP10100 table. However, if you have individual ship to addresses by line item you will need to look at the SOP10200. You may want to check "Info Flow and Posting" from Accolade Publications (http://www.accoladepublications.com) which is a very simple to understand manual catored to the GP administrator and developer, written by Richard Wh...

Basketball/Any Sport League Table
I know the basics of Excel, but the more different things i try to do, the more complicated the whole thing gets. Anyway, My main aim is to create a league table. so far i have an excel spreadsheet with an entire seasons worth of info in it,aswell as 18 teams worth of individual team performance, so the crowning glory would be a league table. but i am stumped. i have created a new sheet with all of the teams on and used COUNTIF to count win, lose or draw from the relevant sections. The problem now is how to ask excel to differentiate between win and draw in terms of the number of points awa...

Can you access the old-style Help Index using Excel 2003?
I've recently obtained Office 2003 for my work laptop, and to say the least it is getting on my nerves! When I want to access Help, I want a nice little index of terms that I can search against that is intuitive, user-friendly and allows me to have a browse around the subject. Is there anyway of getting this old-style help functionality working within Excel 2003, which so far has produced the least helpful responses of any help system I've come across. Create a short-cut to the internal help file. Should be called something like: XLMAIN10.CHM or XLMAIN11.CHM XLADDIN.CHM fo...

Life Insurance table in HR module
Is there any way to increase the decimal places allowed for Insurance Rates? For example our payroll is processed weekly, but the life insurance rate is monthly. So when it is $0.25 / 1000 per month that is $0.577 /1000 per week and the system ONLY allows 2 decimal places. Anyone worked around this? -- Mark VA Yes, allow three decimal places for deductions. -- Charles Allen, MVP "Mark" wrote: > Is there any way to increase the decimal places allowed for Insurance Rates? > For example our payroll is processed weekly, but the life insurance rate is > monthly. So ...

Data Table #2
Hi I'm going around in circles!! I have the following: Tons Price/Ton Sales 555.00 6,420.00 Prod 627.40 5,482.86 Contr 937.14 6,420.00 937.14 1000 937.1380002 1500 937.1380002 2000 937.1380002 2500 937.1380002 3000 937.1380002 3500 937.1380002 4000 937.1380002 4500 937.1380002 5000 937.1380002 5500 937.1380002 6000 937.1380002 6500 937.1380002 7000 937.1380002 7500 937.1380002 8000 937.1380002 8500 937.1380002 9000 937.1380002 The 937.14 in the table to the right of 6420 is a formula which is 6420-5482.86 The 6420 is a cell reference to the 6420 in the table abov...

Calculations, Queries and making it all come together in my table
hello, I am trying to create a very simple database (I'm pretty new to Access). In my main table it have a field call % Safe which is to show the results a calculation. I understand I should create a query. I have two issues - one, the calculation I created doesn't seem to work. I created a simple query based on the fields in my main table, in the query field called % Safe, under Criteria I entered = [# Safe]-[# Unsafe]/[# Safe]. now, I assumed it would look at the data entered in the main table, perform the calculation and BAM present me with answer in this field. ...