Showing posts with label tables. Show all posts
Showing posts with label tables. Show all posts

Monday, March 26, 2012

Intermediate table relations

Is there a way to find what tables are needed to form a relationship between two tables?

For example, I have an tblssue, tblElementType, and 22 other tables. There isn't a direct relationship between tbIssue and tblElementType but through tblIssue -> tblA -> tbl... -> tblZ -> tblElementType there could be a relation. Is there a way to found out what tblA -> tbl... -> tblZ are?

Create a database diagram in Visio. It'll show the FK relationships.

Adamus

Friday, March 23, 2012

Interfacing with SQL Server 2005 EXPRESS

hey howzit guys!

I am very new to SQL Server 2005 Express, my question is simple, can I only view and add database tables etc through VS 2005 when using SQL Server 2005 EXPRESS, since it does not seem to have any facilities in the Config. Manager to do this directly in SQL Server?

Did you try the managment studio express which is downloadable for SQL Server Express ?

http://www.microsoft.com/downloads/details.aspx?FamilyID=82AFBD59-57A4-455E-A2D6-1D4C98D40F6E&displaylang=en

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

Wednesday, March 21, 2012

Interesting Query Problem!

Dear All,
I have three tables:
teams table
id name
--
1 Team A
2 Team B
3 Team C
4 Team D
fixtures table
id home team id away team id
---
1 1 2
2 1 3
3 1 4
4 2 1
5 2 3
6 2 4
7 3 1
8 3 2
9 3 4
10 4 1
11 4 2
12 4 3
results table
fixture id home team result away team result
-----
1 1 3
2 4 0
3 2 2
4 2 2
5 0 4
6 1 3
7 3 1
8 2 2
9 4 0
10 2 2
11 0 4
12 1 3
what I want to be able to to is generate a table (list) of teams as the
output from a sql query in an order dependant on two things:
1) number of points won (highest number of points at the top) and 2)
(which is where the interesting bit comes into it) where two or more
teams have the same number of points the position is to be determined
by examining the results between the two or more teams in question.
So the output I am looking for in this example:
output table
team name total team points notes
----
Team C 16 1.
Team B 12 2.
Team A 12 3.
Team D 8 4.
Note: 1. Team C have 16 points therefore are the clear leaders of the
table
Note: 2. AvB = 1-3 BvA = 2-2 therefore Team B [5pts] is above Team A
[3pts]
Note: 3. see note 2
Note: 4. Team D have 8 points therefore are last in the table
My question is how do I write an sql query that will interrogate these
three tables to give my the output as described above.
Many Thanks
Simonsimon.stockton@.baesystems.com wrote:
> [stuff]
Are BAE Systems branching out into Sunday 5-a-side football logistics
now? ;-)|||Bobbo,
This is an attempt at a rather simple example so that I can
explain/understand the theory behind how to solve the problem before
applying it to my particular situation.
Regards
Simon|||simon.stockton@.baesystems.com wrote:
> This is an attempt at a rather simple example so that I can
> explain/understand the theory behind how to solve the problem before
> applying it to my particular situation.
... and that was my attempt at humour, sorry.
This code below seems to work for me, although I'm sure someone else
will be able to suggest how it can be simplified as it looks
ridiculously over-complicated.
Also, the names have changed since your example, but I'm sure you'll
get the idea.
-- Outer query to sum home and away games and order by total points
select [name], sum(points) points
from
(
-- Top half of subquery to get points for home games
select t.[name], sum(s.home) points
from scores s
join fixes f on s.fixid = f.fixid
join teams t on f.homeid = t.teamid
group by t.[name]
union all
-- Second half of subquery to get points for away games
select t.[name], sum(s.away) points
from scores s
join fixes f on s.fixid = f.fixid
join teams t on f.awayid = t.teamid
group by t.[name]
) as sub
group by [name]
order by points desc|||Bobbo,
Thanks for that. I can see how that work.
However, it doesn't cover:
"2) (which is where the interesting bit comes into it) where two or
more
teams have the same number of points the position is to be determined
by examining the results between the two or more teams in question."
So once having used your query to generate a list, this list then needs
to be sorted in the event that two teams share the same number of
points, by looking at the individual points against the opponent team
who share the same number of points.
Given the data originally specified I don't think that your query will
generate the output table as shown earlier.
Getting there though!
Thanks
Simon|||The following code may do it for you:
set nocount on
create table teams
(
id int primary key
, name varchar (20) not null
)
go
insert teams values (1, 'Team A')
insert teams values (2, 'Team B')
insert teams values (3, 'Team C')
insert teams values (4, 'Team D')
go
create table fixtures
(
id int primary key
, home int not null
references teams (id)
, away int not null
references teams (id)
)
insert fixtures values (1, 1, 2)
insert fixtures values (2, 1, 3)
insert fixtures values (3, 1, 4)
insert fixtures values (4, 2, 1)
insert fixtures values (5, 2, 3)
insert fixtures values (6, 2, 4)
insert fixtures values (7, 3, 1)
insert fixtures values (8, 3, 2)
insert fixtures values (9, 3, 4)
insert fixtures values (10, 4, 1)
insert fixtures values (11, 4, 2)
insert fixtures values (12, 4, 3)
go
create table results
(
id int primary key
references fixtures (id)
, home int not null
, away int not null
)
go
insert results values (1, 1, 3)
insert results values (2, 4, 0)
insert results values (3, 2, 2)
insert results values (4, 2, 2)
insert results values (5, 0, 4)
insert results values (6, 1, 3)
insert results values (7, 3, 1)
insert results values (8, 2, 2)
insert results values (9, 4, 0)
insert results values (10, 2, 2)
insert results values (11, 0, 4)
insert results values (12, 1, 3)
go
with totals (teamid, total, wins)
as
(
select
case type
when 1 then f.home
when 2 then f.away
end
, sum (case type
when 1 then r.home
when 2 then r.away
end)
, sum (case
when type = 1 and sign (r.home - r.away) > 0 then 1
when type = 2 and sign (r.away - r.home) > 0 then 1
else 0
end)
from
fixtures f
join
results r on r.id = f.id
cross join
(
select 1 union all
select 2
) as types (type)
group by
case type
when 1 then f.home
when 2 then f.away
end
)
select
t2.name
, t1.total
from
totals t1
join
teams t2 on t2.id = t1.teamid
order by
total desc
, wins desc
go
drop table results
drop table fixtures
drop table teams
The use of the CTE is SQL 2005, but you can do it without it - just use a
derived table instead.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
.
<simon.stockton@.baesystems.com> wrote in message
news:1155557745.509502.222530@.i42g2000cwa.googlegroups.com...
Dear All,
I have three tables:
teams table
id name
--
1 Team A
2 Team B
3 Team C
4 Team D
fixtures table
id home team id away team id
---
1 1 2
2 1 3
3 1 4
4 2 1
5 2 3
6 2 4
7 3 1
8 3 2
9 3 4
10 4 1
11 4 2
12 4 3
results table
fixture id home team result away team result
-----
1 1 3
2 4 0
3 2 2
4 2 2
5 0 4
6 1 3
7 3 1
8 2 2
9 4 0
10 2 2
11 0 4
12 1 3
what I want to be able to to is generate a table (list) of teams as the
output from a sql query in an order dependant on two things:
1) number of points won (highest number of points at the top) and 2)
(which is where the interesting bit comes into it) where two or more
teams have the same number of points the position is to be determined
by examining the results between the two or more teams in question.
So the output I am looking for in this example:
output table
team name total team points notes
----
Team C 16 1.
Team B 12 2.
Team A 12 3.
Team D 8 4.
Note: 1. Team C have 16 points therefore are the clear leaders of the
table
Note: 2. AvB = 1-3 BvA = 2-2 therefore Team B [5pts] is above Team A
[3pts]
Note: 3. see note 2
Note: 4. Team D have 8 points therefore are last in the table
My question is how do I write an sql query that will interrogate these
three tables to give my the output as described above.
Many Thanks
Simon

Interesting Query


I have four lookup tables that have identical structure. I have to
write a query to check if a particlaur string (code) exists in any of
the four lookups. What is the best way of dealing with this please?
1. Write one query with four corelated subqueries (one for each
lookup).
2. Write 4 separate queries and execute them one after the other.
If there is better way to store the lookups to make writing queries
like the one I have mentioned, easy, then I can change the lookup
tables.
ThanksIf all you have to test is existence, rather than return any value,
you could try something like:
SELECT CASE WHEN EXISTS(<query table 1> ) THEN 1
WHEN EXISTS(<query table 2> ) THEN 2
WHEN EXISTS(<query table 3> ) THEN 3
WHEN EXISTS(<query table 4> ) THEN 4
ELSE 0
END as Matched
Roy Harvey
Beacon Falls, CT
On 21 Apr 2006 03:43:14 -0700, "S Chapman" <s_chapman47@.hotmail.co.uk>
wrote:

>
>I have four lookup tables that have identical structure. I have to
>write a query to check if a particlaur string (code) exists in any of
>the four lookups. What is the best way of dealing with this please?
>1. Write one query with four corelated subqueries (one for each
>lookup).
>2. Write 4 separate queries and execute them one after the other.
>If there is better way to store the lookups to make writing queries
>like the one I have mentioned, easy, then I can change the lookup
>tables.
>Thanks|||Hi,
I'd rather create four left joins. Usually you need to return a value.
Tomasz B.
"Roy Harvey" wrote:

> If all you have to test is existence, rather than return any value,
> you could try something like:
> SELECT CASE WHEN EXISTS(<query table 1> ) THEN 1
> WHEN EXISTS(<query table 2> ) THEN 2
> WHEN EXISTS(<query table 3> ) THEN 3
> WHEN EXISTS(<query table 4> ) THEN 4
> ELSE 0
> END as Matched
> Roy Harvey
> Beacon Falls, CT
>
> On 21 Apr 2006 03:43:14 -0700, "S Chapman" <s_chapman47@.hotmail.co.uk>
> wrote:
>
>|||>> I have four lookup tables that have identical structure. I have to write
a query to check if a particular string (code) exists in any of the four loo
kups. What is the best way of dealing with this please? <<
The best way is not to split the encoding over four tables. Do you
also keep a personnel table for each employee's weight class?
This is a common design flaw called attribute splitting. You can build
a UNION-ed view and use it.
That view will also help show you that you have the same code with
different definitions in your data model (do you know the Patent Office
story?). Think you don't have this problem? Just wait. Or get the
extra overhead of prevetning it with triggers or other procedural,
proprietary code.
You will also have redundant data (look up a series of articles by Tom
Johnston on non-normal form redundancies).

Monday, March 19, 2012

interdatabase trigger possible?

Hello to all,

I have say two databases A and B.
A database has tables a1 and a2.
B database has a table b1.

My question is

Can i write a trigger for the table b1, which access the fields from
the table a1 and a2?

Simply, can i write a trigger which access data from other databases?

Thank you in advance,
vishnuSure for different databases on the same server you can use the
threepart name: Database.Owner.ObjectName (e.g. SELECT * FROM
somedatabase.dbo.SomeTable)

For database on a different server you have to use a linekd server
within the fourpart name: linkedServername.Database.Owner.ObjectName
(e.g. SELECT * FROM linkedServername.Database.Owner.ObjectName )

HTH, jens Suessmeyer.

Inter-Database References

Hello

Suppose a database Db1 with tables tl1 and tl2 and a second database db2
with tables tl3 et tl4.

Is it possible to make a join between tables of the two databases ?

As for example, Select * from tl1 INNER JOIN tl3 where tl1.Field1 =
tl3.Field3

Thank for any help

ThierryIf we have the databases Db1 and Db2 on the same server
we can join as follows

Select *
from db1..tl1 a
INNER JOIN db2..tl3 b on a.Field1 = b.Field3

HTH
Srinivas Sampangi

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Monday, March 12, 2012

Interactive Size/Report Size

Hello,

This is SQL 2005 Reporting Services. I have several reports that are repeating tables with grouped information and subtotals. When deployed, we are noticing that the interactive HTML view renders a great deal more detail per page than the printed version of the report.

This didn't really become a problem until a user reported an issue where they wanted to print pages 93-97 of a 104-page report. She based the page number selection on the page numbers she was seeing in the report viewer. When printed, she did not get the data she wanted to print... and the full printed version is about 50 pages longer than the interactive viewer version.

In my report I have the following settings (no page breaks on the groups or anything, it's just a table with a header, footer, and detail rows per group:

Interactive Size: 11"wide by 8.5" long (landscape)
PageSize: 11" wide by 8.5" long (same as above)
Margins: .5in (all 4 sides)

I get the same thing when previewing via Visual Studio... so I don't think it's a web viewer problem. Are there any options to work around this problem?

I guess not. The reporting rendering behaviour of the HTML is different than the printed one. I didn′t investigate that in detail so far, but I know about this issue that the page numbers don′t match in comparison with the HTML and the PDF export.

HTH, Jens Suessmeyer.


http://www.sqlserver2005.de

Interaction between tables of local and remote SQL databases

Hi all,

I would be very glad if someone can suggest me what techniques I should use in the following scenario:

I have 2 SQL Server databases : DB1 and DB2. DB 1 is on a remote server (hosting server) and DB 2 is on a local server.

Some tables of each db contain tables that are polulated and changed by the appropriate application, i.e.:

DB1.users, DB1.orders,... etc are managed by "webapplication"

DB1.products ... are not managed by "webapplication" : in fact only used to read from

DB2.products, DB2.customers, .... etc are managed by "winapplication"

DB2.orders,....are partially managed by "winapplication"

Since the amount of data can go over 100000 records i'm wondering what would by the best approach to :

- synchronize the data of DB1.products and DB2.products in DB1 on remote server (updated newly added rows and update changed rows,....)

- the products data is only (at the moment) added, edited and deleted on the local server

I think SQLBulkCopy will not do the job. Should it be possible with some query? Or...?

Any suggestions are appreciated!!

O.

Some addition:

- Does SQLBulkCopy copy-append data to the destination database.table?

- What about identity keys?

- Should it be the best solution to modify the SqlCommand so it takes only those rows I want to be inserted as (depending on bulkcopies already done before) or is this done by SQLBulkcopy itself....?

Please inform.

O.

Friday, March 9, 2012

Intent exclusive lock problem

Hi,
We have an application that works with SQL Server 2000
and has 20 users. All the users reach 4-5 tables most of
the time.They do select/update/insert very frequently to
those 4-5 tables.
The problem is, 2 or 3 times in a day, all the user
applications stuck with showing hourglasses. They all
stuck at the same time.They cannot go normal processing
until we reset the server machine.When the application
hangs,I control the locks in the SQL Server by calling
sp_lock stored procedure. I saw locks on the heavily
used 4-5 tables in the type TAB and MODE IX. No
transaction in the application needs to update or insert
so many rows to these tables at a time (and it actually
does not insert/update that many rows).
I guess the problem is those ıntent exclusive locks.
Since at the time of blocking all the frequently used
tables are IX locked, no one can select them.So the
application stucks there.
But how those IX locks happens? And why they just go
away from the lock tables after a small amount of time?
Thanks in advance...The table IX locks are normal and are required so that pages or rows can be
exclusively locked (X mode). Your problem sounds like a deadlock in your
application code. If you contact PSS they will be able to help you
(http://support.microsoft.com)
Regards.
--
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Caglar Okat" <gypsybregovic@.yahoo.com> wrote in message
news:337801c3fd5b$ecb7b6e0$a001280a@.phx.gbl...
> Hi,
> We have an application that works with SQL Server 2000
> and has 20 users. All the users reach 4-5 tables most of
> the time.They do select/update/insert very frequently to
> those 4-5 tables.
> The problem is, 2 or 3 times in a day, all the user
> applications stuck with showing hourglasses. They all
> stuck at the same time.They cannot go normal processing
> until we reset the server machine.When the application
> hangs,I control the locks in the SQL Server by calling
> sp_lock stored procedure. I saw locks on the heavily
> used 4-5 tables in the type TAB and MODE IX. No
> transaction in the application needs to update or insert
> so many rows to these tables at a time (and it actually
> does not insert/update that many rows).
> I guess the problem is those ıntent exclusive locks.
> Since at the time of blocking all the frequently used
> tables are IX locked, no one can select them.So the
> application stucks there.
> But how those IX locks happens? And why they just go
> away from the lock tables after a small amount of time?
> Thanks in advance...
>

Intent exclusive lock problem

Hi,
We have an application that works with SQL Server 2000
and has 20 users. All the users reach 4-5 tables most of
the time.They do select/update/insert very frequently to
those 4-5 tables.
The problem is, 2 or 3 times in a day, all the user
applications stuck with showing hourglasses. They all
stuck at the same time.They cannot go normal processing
until we reset the server machine.When the application
hangs,I control the locks in the SQL Server by calling
sp_lock stored procedure. I saw locks on the heavily
used 4-5 tables in the type TAB and MODE IX. No
transaction in the application needs to update or insert
so many rows to these tables at a time (and it actually
does not insert/update that many rows).
I guess the problem is those ıntent exclusive locks.
Since at the time of blocking all the frequently used
tables are IX locked, no one can select them.So the
application stucks there.
But how those IX locks happens? And why they just go
away from the lock tables after a small amount of time?
Thanks in advance...The table IX locks are normal and are required so that pages or rows can be
exclusively locked (X mode). Your problem sounds like a deadlock in your
application code. If you contact PSS they will be able to help you
(http://support.microsoft.com)
Regards.
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Caglar Okat" <gypsybregovic@.yahoo.com> wrote in message
news:337801c3fd5b$ecb7b6e0$a001280a@.phx.gbl...
> Hi,
> We have an application that works with SQL Server 2000
> and has 20 users. All the users reach 4-5 tables most of
> the time.They do select/update/insert very frequently to
> those 4-5 tables.
> The problem is, 2 or 3 times in a day, all the user
> applications stuck with showing hourglasses. They all
> stuck at the same time.They cannot go normal processing
> until we reset the server machine.When the application
> hangs,I control the locks in the SQL Server by calling
> sp_lock stored procedure. I saw locks on the heavily
> used 4-5 tables in the type TAB and MODE IX. No
> transaction in the application needs to update or insert
> so many rows to these tables at a time (and it actually
> does not insert/update that many rows).
> I guess the problem is those ıntent exclusive locks.
> Since at the time of blocking all the frequently used
> tables are IX locked, no one can select them.So the
> application stucks there.
> But how those IX locks happens? And why they just go
> away from the lock tables after a small amount of time?
> Thanks in advance...
>|||Paul S Randal [MS] wrote:
> The table IX locks are normal and are required so that pages or rows can b
e
> exclusively locked (X mode). Your problem sounds like a deadlock in your
> application code. If you contact PSS they will be able to help you
> (http://support.microsoft.com)
> Regards.
One day microsoft customers will recognize, that bothering about locks
is no longer needed in other SQL databases due to MVCC, MVTO, MVRC
mechanisms (Firebird, PostgreSQL, LogicSQL, Informix).
Microsoft solves problems, i do not have without microsoft.
regards, Guido Stepken

Wednesday, March 7, 2012

Integrity check on selected tables

We do a general DB integrity check weekly through a DB maintenance plan on our SQL 2000 S.E. servers. I'd like to do a nightly integrity check on just a few tables on very large databases. The DB Maintenance Plan Wizard does not appear to allow this.

What T-SQL can be used to accomplish this?
Does Enterprise Manager offer a way to do this?See DBCC CHECKTABLE in BOL|||[See DBCC CHECKTABLE in BOL [/SIZE][/QUOTE]

I have checked into this in the past. However, it doesn't appear to allow me to list a group of tables to check. I get a parameter incorrect for this statement.

I'd like to do something where I list several tables. Or, all tables between the letters A and D. In this manner, I may be able to run 7 days of maintenace weekly but do integrity checking piecemeal.|||Originally posted by Fulvio Hayes
We do a general DB integrity check weekly through a DB maintenance plan on our SQL 2000 S.E. servers. I'd like to do a nightly integrity check on just a few tables on very large databases. The DB Maintenance Plan Wizard does not appear to allow this.

What T-SQL can be used to accomplish this?
Does Enterprise Manager offer a way to do this?

You should be able to to create a maint plan that just does integrity checks. On my SQL7 I can go through and click off the backup portions and just turn on the nightly integrity checks.|||Originally posted by Fulvio Hayes
[See DBCC CHECKTABLE in BOL

I have checked into this in the past. However, it doesn't appear to allow me to list a group of tables to check. I get a parameter incorrect for this statement.

I'd like to do something where I list several tables. Or, all tables between the letters A and D. In this manner, I may be able to run 7 days of maintenace weekly but do integrity checking piecemeal. [/SIZE][/QUOTE]

Create sp:

dbcc checktable for table from list (get list from table will be better)

dbcc checktable 'tableA'
dbcc checktable 'tableB'
.................
Also, you can save results of checking in table or return as recordset.

insert #tmp
dbcc checktable 'tableA'
insert #tmp
dbcc checktable 'tableB'

select * from #tmp|||Load a list of tables into a cursor dataset, and then loop through the set to execute your DBCC.

If you store the name of the last table completed, you can start with the next table the following night. You could even define a processing period by setting your code to exit the loop after a certain number of minutes, or at a specified hour.

blindman|||Originally posted by blindman [/i]
Load a list of tables into a cursor dataset, and then loop through the set to execute your DBCC.

If you store the name of the last table completed, you can start with the next table the following night. You could even define a processing period by setting your code to exit the loop after a certain number of minutes, or at a specified hour.

blindman

Thanks! I'll try that. In some cases, I may use 'snails' recommendation to use checktable repeatedly for a small number of recurring tables. But for my larger, high I/O databases I'll look to going the route of the cursor dataset you recommend. I'll let youknow how it works.

Fulvio

Integration Services: ?Table refresh (UPDATE/INSERT)“

Hello

I have a question about the new Integration Services of the MS SQL Server 2005.

Situation:
- SQL Server 2005 (standard edition)

- 2 tables with identical structure (same attributes)

- the table ?TestSource“ will be constantly extend (new records & updates).

- the table ?TestDestination“ will just be refreshed by SSIS (Data Warehouse table)


I would like to create a Integration Service, witch refreshes the table ?TestDestination“ with the data from table ?TestSource“.

Existing records (ID already exists) should be updated (UPDATE), not existing records should be created (INSERT).

I would like to use the IS Data Flow Task, because in future i won’t just copy the data. I also will use Toolbox items like ?Data Conversion“, ?Derived Column“ and so on.

Alike I won’t use an easy SQL-Query, because it would be complicated to make changes and to Log the transactions.

Just clear and refill the whole table is not possible because of performance and availability requests (large data).


Question:
How can I implement this workflow as Data Flow in a Integration Service?
Witch components from the Toolbox do I need?

Greetings

Not sure if you can use this within SSIS, but the tablediff.exe that comes with sql server 2005 is pretty slick. I wrote a c# wrapper for it and I have a config file that holds all the table names that I want to sync as well as the source and destination servers. It then generates the sql change file as well as gives output of the number of rows that are out of sync. It works really well for me especially using the C# wrapper that I wrote.

Just a thought....

Sunday, February 19, 2012

Integrating data from two Tables into one

Hi all,

In case I have two tables. In them there is data and I want to integrate all this data into one table.

that is to say Table A and Table B has data (Both A and B are from the same database)

I want to integrate all this data into Table c.

How do i go about this?

Regards,

Ronaldlee

Can you be more specific? How exactly do you want to "integrate" this data?

-Jamie

|||

Hi Jamie, I want to use SSIS 2005 to get data from Table A and Table B into table C.

At the end of the day Table C will act as my staging table.

Ronald

|||

Do tableA & tableB have the same structure as each other?|||

Table A has three columns and Table B has two columns.

Table A and B are in the same database and table C is in the different database.

Ronald

|||

My god this is like pulling teeth!!!!!

What transformation do you want to perform on TableA & TableB in order to get the data into tableC?|||

No men, you are not rude.

Okay, I do not have any idea about the JOIN or UNION Transformation. May be you can recommend.

I need table C to have all the five columns from table A(3Columns) and B(2Columns).

Table A and Table B are the source

Table C is the target.

I need to find a way to join Table A and B.(Is it possible?)

Ronald

|||

Ronaldlee Ejalu wrote:

No men, you are not rude.

Okay, I do not have any idea about the JOIN or UNION Transformation. May be you can recommend.

I need table C to have all the five columns from table A(3Columns) and B(2Columns).

OK, that's useful!

Ronaldlee Ejalu wrote:

I need to find a way to join Table A and B.(Is it possible?)

Only you can answer that. Is there a field in each of those two tables that means the same thing for both tables? If so, you could join on that field in the MERGE JOIN component.

Joining two tables that don't have a relationship between them is an incredibly uncommon thing to do and hence SSIS doesn't contain anything to do it. There is possibly a way to do it but i suspect that that is not what you want to do!

-Jamie

|||

Thanx Jamie,

Could you tell me the other way. May i Could come across it in future.

Thanx alot

Regards,

Ronald

|||

The "other way" I spoke of is to do the joining in a script component or custom component that you build yourself. Those options mean writing code!

-Jamie