This is my first stab at this. I have a simple report that returns a few
columns from a database no sp no expressions just a select statement. There
are two tables that have the same field name and the dataset canâ't seem to
distinguish between them it returns the first field into both columns. When
I run it in Query Analyzer it looks fine. What am I missing here?Query Analyzer seems to be a bit more forgiving about identical names. In
your query, just use Aliases, and you should be ok.
A query like
"Select table1.col1 as Table1Col1, table2.Col1 as Table2Col1 from Table1,
Table2 (...)"
should give you fields named Table1Col1 and Table2Col1. A bit more trouble
to write, but you eliminate possible errors.
Kaisa M. Lindahl
"RYF" <RYF@.discussions.microsoft.com> wrote in message
news:BD3D2857-937A-4602-80AD-C472FB295245@.microsoft.com...
> This is my first stab at this. I have a simple report that returns a few
> columns from a database no sp no expressions just a select statement.
> There
> are two tables that have the same field name and the dataset can't seem to
> distinguish between them it returns the first field into both columns.
> When
> I run it in Query Analyzer it looks fine. What am I missing here?|||THX that did the trick!
"Kaisa M. Lindahl" wrote:
> Query Analyzer seems to be a bit more forgiving about identical names. In
> your query, just use Aliases, and you should be ok.
> A query like
> "Select table1.col1 as Table1Col1, table2.Col1 as Table2Col1 from Table1,
> Table2 (...)"
> should give you fields named Table1Col1 and Table2Col1. A bit more trouble
> to write, but you eliminate possible errors.
> Kaisa M. Lindahl
> "RYF" <RYF@.discussions.microsoft.com> wrote in message
> news:BD3D2857-937A-4602-80AD-C472FB295245@.microsoft.com...
> > This is my first stab at this. I have a simple report that returns a few
> > columns from a database no sp no expressions just a select statement.
> > There
> > are two tables that have the same field name and the dataset can't seem to
> > distinguish between them it returns the first field into both columns.
> > When
> > I run it in Query Analyzer it looks fine. What am I missing here?
>
>
Showing posts with label stab. Show all posts
Showing posts with label stab. Show all posts
Friday, March 30, 2012
Friday, March 9, 2012
Newbie Database Diagraming Error Problem
I am in the process of taking my first stab at a MS SQL Server based DB.
The original DB was in MS Access and had a front end DB with the GUI and a
back end with the data. The data has been successfully transferred to the
SQL Server. Now I am in the process of re-building the relationships and am
getting a number of errors of the form:
'tblRoadTrip (MyDomain\TheUser)' table
- Unable to create relationship 'FK_tblRoadTrip_tblPrimary'.
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]ALTER TABLE
statement conflicted with COLUMN FOREIGN KEY constraint
'FK_tblRoadTrip_tblPrimary'. The conflict occurred in database
'MyFirstSQL_DB', table 'tblPrimary', column 'LinkID'.
when using the diagramming tool. The relationship between tblPrimary and
tblRoadTrip is one-to-many and the linking filed is LinkID. In tblPrimary,
LinkID is set as the primary key.
Any hints on where I can go to get information on how to solve this problem
will be greatly appreciated!
Thanks!
Don
Okay, I think I found the problem, we sort of ......
The table tblPrimary is empty! I went back to the Upsizing Wizard Report,
and low and behold the following message "Table was skipped, or export
failed". Will very authoritative, lacking in any information to diagnose
why the table was skipped or the export failed. I tried re-exporting the
table all by itself, and the report for that says "skipping table
'tblPrimary'".
What causes a file to be skipped during the upsizing wizard process?
Don
"Don" <someone@.somewhere.net> wrote in message
news:e40TnYRwFHA.2656@.TK2MSFTNGP09.phx.gbl...
> I am in the process of taking my first stab at a MS SQL Server based DB.
> The original DB was in MS Access and had a front end DB with the GUI and a
> back end with the data. The data has been successfully transferred to the
> SQL Server. Now I am in the process of re-building the relationships and
> am getting a number of errors of the form:
> 'tblRoadTrip (MyDomain\TheUser)' table
> - Unable to create relationship 'FK_tblRoadTrip_tblPrimary'.
> ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]ALTER TABLE
> statement conflicted with COLUMN FOREIGN KEY constraint
> 'FK_tblRoadTrip_tblPrimary'. The conflict occurred in database
> 'MyFirstSQL_DB', table 'tblPrimary', column 'LinkID'.
> when using the diagramming tool. The relationship between tblPrimary and
> tblRoadTrip is one-to-many and the linking filed is LinkID. In
> tblPrimary, LinkID is set as the primary key.
> Any hints on where I can go to get information on how to solve this
> problem will be greatly appreciated!
> Thanks!
> Don
>
>
|||Figuring that bad data might be a cause, I finally found the problem with
some invalid dates. While the MS Access table used date fields, looks like
it is much more forgiving in terms of mis-entered dates.
Don
"Don" <someone@.somewhere.net> wrote in message
news:OYLs7FSwFHA.3300@.TK2MSFTNGP09.phx.gbl...
> Okay, I think I found the problem, we sort of ......
> The table tblPrimary is empty! I went back to the Upsizing Wizard Report,
> and low and behold the following message "Table was skipped, or export
> failed". Will very authoritative, lacking in any information to diagnose
> why the table was skipped or the export failed. I tried re-exporting the
> table all by itself, and the report for that says "skipping table
> 'tblPrimary'".
> What causes a file to be skipped during the upsizing wizard process?
> Don
>
>
> "Don" <someone@.somewhere.net> wrote in message
> news:e40TnYRwFHA.2656@.TK2MSFTNGP09.phx.gbl...
>
The original DB was in MS Access and had a front end DB with the GUI and a
back end with the data. The data has been successfully transferred to the
SQL Server. Now I am in the process of re-building the relationships and am
getting a number of errors of the form:
'tblRoadTrip (MyDomain\TheUser)' table
- Unable to create relationship 'FK_tblRoadTrip_tblPrimary'.
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]ALTER TABLE
statement conflicted with COLUMN FOREIGN KEY constraint
'FK_tblRoadTrip_tblPrimary'. The conflict occurred in database
'MyFirstSQL_DB', table 'tblPrimary', column 'LinkID'.
when using the diagramming tool. The relationship between tblPrimary and
tblRoadTrip is one-to-many and the linking filed is LinkID. In tblPrimary,
LinkID is set as the primary key.
Any hints on where I can go to get information on how to solve this problem
will be greatly appreciated!
Thanks!
Don
Okay, I think I found the problem, we sort of ......
The table tblPrimary is empty! I went back to the Upsizing Wizard Report,
and low and behold the following message "Table was skipped, or export
failed". Will very authoritative, lacking in any information to diagnose
why the table was skipped or the export failed. I tried re-exporting the
table all by itself, and the report for that says "skipping table
'tblPrimary'".
What causes a file to be skipped during the upsizing wizard process?
Don
"Don" <someone@.somewhere.net> wrote in message
news:e40TnYRwFHA.2656@.TK2MSFTNGP09.phx.gbl...
> I am in the process of taking my first stab at a MS SQL Server based DB.
> The original DB was in MS Access and had a front end DB with the GUI and a
> back end with the data. The data has been successfully transferred to the
> SQL Server. Now I am in the process of re-building the relationships and
> am getting a number of errors of the form:
> 'tblRoadTrip (MyDomain\TheUser)' table
> - Unable to create relationship 'FK_tblRoadTrip_tblPrimary'.
> ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]ALTER TABLE
> statement conflicted with COLUMN FOREIGN KEY constraint
> 'FK_tblRoadTrip_tblPrimary'. The conflict occurred in database
> 'MyFirstSQL_DB', table 'tblPrimary', column 'LinkID'.
> when using the diagramming tool. The relationship between tblPrimary and
> tblRoadTrip is one-to-many and the linking filed is LinkID. In
> tblPrimary, LinkID is set as the primary key.
> Any hints on where I can go to get information on how to solve this
> problem will be greatly appreciated!
> Thanks!
> Don
>
>
|||Figuring that bad data might be a cause, I finally found the problem with
some invalid dates. While the MS Access table used date fields, looks like
it is much more forgiving in terms of mis-entered dates.
Don
"Don" <someone@.somewhere.net> wrote in message
news:OYLs7FSwFHA.3300@.TK2MSFTNGP09.phx.gbl...
> Okay, I think I found the problem, we sort of ......
> The table tblPrimary is empty! I went back to the Upsizing Wizard Report,
> and low and behold the following message "Table was skipped, or export
> failed". Will very authoritative, lacking in any information to diagnose
> why the table was skipped or the export failed. I tried re-exporting the
> table all by itself, and the report for that says "skipping table
> 'tblPrimary'".
> What causes a file to be skipped during the upsizing wizard process?
> Don
>
>
> "Don" <someone@.somewhere.net> wrote in message
> news:e40TnYRwFHA.2656@.TK2MSFTNGP09.phx.gbl...
>
Newbie Database Diagraming Error Problem
I am in the process of taking my first stab at a MS SQL Server based DB.
The original DB was in MS Access and had a front end DB with the GUI and a
back end with the data. The data has been successfully transferred to the
SQL Server. Now I am in the process of re-building the relationships and am
getting a number of errors of the form:
'tblRoadTrip (MyDomain\TheUser)' table
- Unable to create relationship 'FK_tblRoadTrip_tblPrimary'.
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]ALTER
TABLE
statement conflicted with COLUMN FOREIGN KEY constraint
'FK_tblRoadTrip_tblPrimary'. The conflict occurred in database
'MyFirstSQL_DB', table 'tblPrimary', column 'LinkID'.
when using the diagramming tool. The relationship between tblPrimary and
tblRoadTrip is one-to-many and the linking filed is LinkID. In tblPrimary,
LinkID is set as the primary key.
Any hints on where I can go to get information on how to solve this problem
will be greatly appreciated!
Thanks!
DonOkay, I think I found the problem, we sort of ......
The table tblPrimary is empty! I went back to the Upsizing Wizard Report,
and low and behold the following message "Table was skipped, or export
failed". Will very authoritative, lacking in any information to diagnose
why the table was skipped or the export failed. I tried re-exporting the
table all by itself, and the report for that says "skipping table
'tblPrimary'".
What causes a file to be skipped during the upsizing wizard process?
Don
"Don" <someone@.somewhere.net> wrote in message
news:e40TnYRwFHA.2656@.TK2MSFTNGP09.phx.gbl...
> I am in the process of taking my first stab at a MS SQL Server based DB.
> The original DB was in MS Access and had a front end DB with the GUI and a
> back end with the data. The data has been successfully transferred to the
> SQL Server. Now I am in the process of re-building the relationships and
> am getting a number of errors of the form:
> 'tblRoadTrip (MyDomain\TheUser)' table
> - Unable to create relationship 'FK_tblRoadTrip_tblPrimary'.
> ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]ALT
ER TABLE
> statement conflicted with COLUMN FOREIGN KEY constraint
> 'FK_tblRoadTrip_tblPrimary'. The conflict occurred in database
> 'MyFirstSQL_DB', table 'tblPrimary', column 'LinkID'.
> when using the diagramming tool. The relationship between tblPrimary and
> tblRoadTrip is one-to-many and the linking filed is LinkID. In
> tblPrimary, LinkID is set as the primary key.
> Any hints on where I can go to get information on how to solve this
> problem will be greatly appreciated!
> Thanks!
> Don
>
>|||Figuring that bad data might be a cause, I finally found the problem with
some invalid dates. While the MS Access table used date fields, looks like
it is much more forgiving in terms of mis-entered dates.
Don
"Don" <someone@.somewhere.net> wrote in message
news:OYLs7FSwFHA.3300@.TK2MSFTNGP09.phx.gbl...
> Okay, I think I found the problem, we sort of ......
> The table tblPrimary is empty! I went back to the Upsizing Wizard Report,
> and low and behold the following message "Table was skipped, or export
> failed". Will very authoritative, lacking in any information to diagnose
> why the table was skipped or the export failed. I tried re-exporting the
> table all by itself, and the report for that says "skipping table
> 'tblPrimary'".
> What causes a file to be skipped during the upsizing wizard process?
> Don
>
>
> "Don" <someone@.somewhere.net> wrote in message
> news:e40TnYRwFHA.2656@.TK2MSFTNGP09.phx.gbl...
>
The original DB was in MS Access and had a front end DB with the GUI and a
back end with the data. The data has been successfully transferred to the
SQL Server. Now I am in the process of re-building the relationships and am
getting a number of errors of the form:
'tblRoadTrip (MyDomain\TheUser)' table
- Unable to create relationship 'FK_tblRoadTrip_tblPrimary'.
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]ALTER
TABLE
statement conflicted with COLUMN FOREIGN KEY constraint
'FK_tblRoadTrip_tblPrimary'. The conflict occurred in database
'MyFirstSQL_DB', table 'tblPrimary', column 'LinkID'.
when using the diagramming tool. The relationship between tblPrimary and
tblRoadTrip is one-to-many and the linking filed is LinkID. In tblPrimary,
LinkID is set as the primary key.
Any hints on where I can go to get information on how to solve this problem
will be greatly appreciated!
Thanks!
DonOkay, I think I found the problem, we sort of ......
The table tblPrimary is empty! I went back to the Upsizing Wizard Report,
and low and behold the following message "Table was skipped, or export
failed". Will very authoritative, lacking in any information to diagnose
why the table was skipped or the export failed. I tried re-exporting the
table all by itself, and the report for that says "skipping table
'tblPrimary'".
What causes a file to be skipped during the upsizing wizard process?
Don
"Don" <someone@.somewhere.net> wrote in message
news:e40TnYRwFHA.2656@.TK2MSFTNGP09.phx.gbl...
> I am in the process of taking my first stab at a MS SQL Server based DB.
> The original DB was in MS Access and had a front end DB with the GUI and a
> back end with the data. The data has been successfully transferred to the
> SQL Server. Now I am in the process of re-building the relationships and
> am getting a number of errors of the form:
> 'tblRoadTrip (MyDomain\TheUser)' table
> - Unable to create relationship 'FK_tblRoadTrip_tblPrimary'.
> ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]ALT
ER TABLE
> statement conflicted with COLUMN FOREIGN KEY constraint
> 'FK_tblRoadTrip_tblPrimary'. The conflict occurred in database
> 'MyFirstSQL_DB', table 'tblPrimary', column 'LinkID'.
> when using the diagramming tool. The relationship between tblPrimary and
> tblRoadTrip is one-to-many and the linking filed is LinkID. In
> tblPrimary, LinkID is set as the primary key.
> Any hints on where I can go to get information on how to solve this
> problem will be greatly appreciated!
> Thanks!
> Don
>
>|||Figuring that bad data might be a cause, I finally found the problem with
some invalid dates. While the MS Access table used date fields, looks like
it is much more forgiving in terms of mis-entered dates.
Don
"Don" <someone@.somewhere.net> wrote in message
news:OYLs7FSwFHA.3300@.TK2MSFTNGP09.phx.gbl...
> Okay, I think I found the problem, we sort of ......
> The table tblPrimary is empty! I went back to the Upsizing Wizard Report,
> and low and behold the following message "Table was skipped, or export
> failed". Will very authoritative, lacking in any information to diagnose
> why the table was skipped or the export failed. I tried re-exporting the
> table all by itself, and the report for that says "skipping table
> 'tblPrimary'".
> What causes a file to be skipped during the upsizing wizard process?
> Don
>
>
> "Don" <someone@.somewhere.net> wrote in message
> news:e40TnYRwFHA.2656@.TK2MSFTNGP09.phx.gbl...
>
Subscribe to:
Posts (Atom)