Hi,
I have three tables its contains same kind of fields for different time periods. For the result i want to link the tables. can u tell me some examples.
9 11383
Hi,
I have three tables its contains same kind of fields for different time periods. For the result i want to link the tables. can u tell me some examples.
Hi. If you would kindly post the table structures here we could do business :)
Hi. If you would kindly post the table structures here we could do business :)
My Table contains City, VenueId,VenueNa me, Industry, Address,DS,GW,M L, Total, Rn, FalioNo, Date, Status. ( All the three tables contains the same Field structure). Now i want make a link to get all the rows in one.
My Table contains City, VenueId,VenueNa me, Industry, Address,DS,GW,M L, Total, Rn, FalioNo, Date, Status. ( All the three tables contains the same Field structure). Now i want make a link to get all the rows in one.
-
SELECT
-
City, VenueId,VenueName, Industry, Address,DS,GW,ML, Total, Rn, FalioNo, Date, Status
-
FROM TableA
-
UNION
-
SELECT
-
City, VenueId,VenueName, Industry, Address,DS,GW,ML, Total, Rn, FalioNo, Date, Status
-
FROM TableB
-
UNION
-
SELECT
-
City, VenueId,VenueName, Industry, Address,DS,GW,ML, Total, Rn, FalioNo, Date, Status
-
FROM TableB
-
ORDER BY 1
-
-
-
SELECT
-
City, VenueId,VenueName, Industry, Address,DS,GW,ML, Total, Rn, FalioNo, Date, Status
-
FROM TableA
-
UNION
-
SELECT
-
City, VenueId,VenueName, Industry, Address,DS,GW,ML, Total, Rn, FalioNo, Date, Status
-
FROM TableB
-
UNION
-
SELECT
-
City, VenueId,VenueName, Industry, Address,DS,GW,ML, Total, Rn, FalioNo, Date, Status
-
FROM TableB
-
ORDER BY 1
-
-
I m getting error when i m saving the view in sql. It showing the Error like "The Query Designer does not support the UNION SQL construct" I m using Sql Server2000.
I m getting error when i m saving the view in sql. It showing the Error like "The Query Designer does not support the UNION SQL construct" I m using Sql Server2000.
Use the query analyser instead
Use the query analyser instead
In the Query Analyser its showing the result. Bu tin the Enterprise manager when i m trying to save the query its showing that "View Definition includes no output columns or includes no items in the FORM Clause"
Here my Code
SELECT *
FROM November
UNION ALL
SELECT *
FROM October;
First i m trying only two tables and its contains the same fields but time period is different. In the query analyser its giving result.
In the Query Analyser its showing the result. Bu tin the Enterprise manager when i m trying to save the query its showing that "View Definition includes no output columns or includes no items in the FORM Clause"
Here my Code
SELECT *
FROM November
UNION ALL
SELECT *
FROM October;
First i m trying only two tables and its contains the same fields but time period is different. In the query analyser its giving result.
The enterprise manager does not recognise UNION. You can't use it for such a query.
The enterprise manager does not recognise UNION. You can't use it for such a query.
So how to link two tables in query.
So how to link two tables in query.
The enterprise manager is not something that you would normally use for day to day processes. Design and analysis maybe.
SQL Sever recognises the UNION structure so you either run your query as a stored procedure or from another app such as vb or Access.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: VisionSet |
last post by:
I have already posted this under 'Simple table organisation question'
here is a more lucid version. It will be under MySQL v4.0 which now supports
unions
Consider 2 entities - books & authors and their respective tables:
book(id, title, author_id)
author(id, name)
Now consider another entity: review. Reviews can be of either books or
|
by: Steve |
last post by:
Hi;
I am looking for suggestions about how to solve a problem using tsql.
I have been asked to create a report concerning 4 tables.
Each of the 4 tables is in its own database.
The 4 tables are identical in name and structure.
|
by: RLN |
last post by:
Re: Access 2000
I have three history tables.
Each table contains 3 years worth of data.
All three tables have a date field in them (and autonum field).
Each table has the potential to contain over 100K rows each.
A common request the user receives is a request to pull all data written
in a given month. I need to write some sort of union query across all
three tables that would pull data for, say, only the month of December
of all nine...
|
by: Eli Sidwell |
last post by:
I have an Access DB that contains 5 tables for the last 5 years. All 5
tables have the same structure. I wanted to keep each year separate
for organizational purposes.
But, I want to query all 5 tables with one query for an application.
What would an query look like that uses all 5 tables as a source ?
Should I create a view that inserts all 5 tables into a recordset ?
(Wouldn't this be resource heavy ?)
|
by: Sami |
last post by:
I can create queries and reports based on info from one table. How do
I create one using information from multiple tables. What do I need
to make sure the information from one table will be correctly assigned
to specific person from another table?
Thanks.
| |
by: phillip.s.powell |
last post by:
MySQL 3.23.58 - 4.0.17 (yep, several database server instances, don't
ask)
I have database Spring with table Students
I have database Summer with table Students
I am tasked to produce a query of all students in both tables with no
duplicates. No clue whatsoever.
|
by: John |
last post by:
Hi
I have three tables with a common id with which they can be linked. I need
to merge them in a way that the resultant table has all records from three
tables. Below is what sort of result I am expecting;
Table 1
ID Value1
1 A1
|
by: smaczylo |
last post by:
Hello, I've recently been asked to work with Microsoft Access, and
while I feel quite comfortable with Excel, I'm at a complete loss with
databases. If someone could help me with this issue I'm having I'd be
most appreciative. The database is already constructed, I'm just
wanting to export the data to an excel file.
In short, I'm hoping to export two Tables (or queries...not sure which
to use - they both seem to have the same data) in...
|
by: Henrootje |
last post by:
I have a lot of tables that hold a lot of numeric fields.
The names of all of these tables start with ' tblRO'
Now it turns out that all of the numeric fields with type double
precision have the property 'schaal' (<- dutch, the one above
'precision' ) set to zero. This should be '10' .
Is there a way to change this through VBA? Using a loop or so?
TIA Henro
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |