Showing posts with label contains. Show all posts
Showing posts with label contains. Show all posts

Thursday, March 22, 2012

Crystal Reports error

Hello: :wave:
I have a C# project which contains a web form, which has a button calling a web page containing a crystalreportviewer, which contains a CrystalReport report; when I call this page through Response.Redirect("WebForm2.aspx"); WebForm2 is not opening, instead it is sending me an error: [Null]Reference Exception: Reference to object does not stated as object's instance.]
Somebody know what is reason of this error?
I'll thank you for your help.
A.L.Hello.
At last I found the way to solve it. Something wrong was in it.
I reinstalled Visual Studio .NET.
Regards.
A.L.
:wave:

Monday, March 19, 2012

Crystal Report10 duplicate row

hi,
attachment contains the problem i am getting while suppressing. Although i have checked the property "Suppress if duplicated" in FormatText=>"Common Tab". found duplicate rows for label "9999 Unknown". Please help me in solving these. example is shown in attachment
i have report format as belowCould just be Crystal exporting or MS Word weirdness, but I noticed the fields didn't line up under FIL and MAINT.

Is the "UNK" entered by users manually? If so, there might be some spaces as well as "UNK" in those fields. You might try using the Trim function to turn " UNK" and "UNK " into "UNK", then see if they get suppressed in the report.|||no i am not exporting report. I just have copy paste the rows which i have to suppress

Thursday, March 8, 2012

Crystal Report Error

Hi

How do I open the password protected .mdb when there is sub reports in the Crystal Report. I got it to work on reports which contains no subreports. The problem is with the ones thats got subreports. It crashes the calling program and generate the runtime error 20535
unable to open database incorrect session parameters.

Please help me.Hi

How do I open the password protected .mdb when there is sub reports in the Crystal Report. I got it to work on reports which contains no subreports. The problem is with the ones thats got subreports. It crashes the calling program and generate the runtime error 20535
unable to open database incorrect session parameters.

Please help me.
Urgent need please help me.

Wednesday, March 7, 2012

Crystal Equivalent in SQL 2K5?

I have an existing Crystal report that contains a subreport which lists
items across the page rather than down. The subreport has a Header and
Detail section, which are both supressed, and a footer section that is
visible. In the Header section, a field is defined with the following
expression:
WhilePrintingRecords;
global stringvar strItems;
strItems :=""
The Detail section has a field defined with the following expression:
WhilePrintingRecords;
global stringvar strItems;
strItems := strItems + ToText({uspGetItems;1.ItemID}, 0, "") + ", "
The Footer section has a field defined with the following expression:
WhilePrintingRecords;
global stringvar strItems;
If Len(strItems) > 1 Then
strItems := Left(strItems, Len(strItems) - 2)
Is there a way to do this in a SQL report?
Any feedback would be appreciated.
Thanks.You could do something like this in a data set in SQL
Declare @.a varchar(1000)
Select @.a = ''
select @.a =@.A + ISNULL(NAME + ', ','') FROM Production.Product
Select @.a as myList
You'd need to take off the last , ...
--
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
I support the Professional Association for SQL Server ( PASS) and it''s
community of SQL Professionals.
"jason.pileski@.pacourts.us" wrote:
> I have an existing Crystal report that contains a subreport which lists
> items across the page rather than down. The subreport has a Header and
> Detail section, which are both supressed, and a footer section that is
> visible. In the Header section, a field is defined with the following
> expression:
> WhilePrintingRecords;
> global stringvar strItems;
> strItems :=""
> The Detail section has a field defined with the following expression:
> WhilePrintingRecords;
> global stringvar strItems;
> strItems := strItems + ToText({uspGetItems;1.ItemID}, 0, "") + ", "
> The Footer section has a field defined with the following expression:
> WhilePrintingRecords;
> global stringvar strItems;
> If Len(strItems) > 1 Then
> strItems := Left(strItems, Len(strItems) - 2)
> Is there a way to do this in a SQL report?
> Any feedback would be appreciated.
> Thanks.
>

Friday, February 24, 2012

crossjoin problem?

i need to calculated the number of participants during a specific period for a give club. the member table contains the following info: member id, club id, starting date, ending date, etc. i have created four named calculations: starting year, starting month, ending year, ending month. starting year and starting month are part of the hierarchy starting period while ending year and ending month belong to the hierarchy ending period.

i defined a basic measure: count and a calculated measure: numberofparticipants. the calculated measure is defined as:

sum(crossjoin([starting period].currentmember.parent.firstsibling.firstchild:[starting period].currentmember, [ending period].currentmember:[ending period].currentmember.parent.lastsibling.lastchild, [club id].currentmember), [measures].[count]))

i could use nonempty crossjoin but since the hierarchies are from the same dimension, it doesn't make a difference.

the MDX query i have looks something like:

select [starting period].[2005].[x] on axis(0), [ending period].[2005].[x] on axis(1) from clubstats where ([measures].[numberofparticipants], [club id].[23])

i am hoping to get the number of participants in club 23 during the month x of 2005. the problem is that for some months, the query returns correct result and for other months. the months that do have a problem are those where there is no existing record in the table with an ending date in month x even if there are records with ending date in month x+1, x+2, etc. it seems that crossjoin or the query "bailed out" after it determines that tuple (x, x) does not exist.

if i use different months for starting and ending period, e.g.

select [starting period].[2005].[3] on axis(0), [ending period].[2005].[4] on axis(1) from clubstats where ([measures].[numberofparticipants], [club id].[23])

again the result is empty if no participant with starting month of 2005 3 and ending month of 2005 4 even if there is participant starting in 2005 3 and ending in 2005 6, which ought to be part of the result.

does anybody know why this is happening? any help will be greatly appreciated.

I found the cause of the problem. Since the dimension itself is based on the fact table, (x, x) or (x, y) may not correspond to any valid dimension member. To get around this, I need to create two server generated time dimension and use starting date and ending date to setup regular relationship between the measure and these dimensions.

I am still interested in hearing recommendations from experts on this forum because there maybe more elegant/efficient ways to construct cube/dimension/calculated measures to get the count.

crossjoin problem?

i need to calculated the number of participants during a specific period for a give club. the member table contains the following info: member id, club id, starting date, ending date, etc. i have created four named calculations: starting year, starting month, ending year, ending month. starting year and starting month are part of the hierarchy starting period while ending year and ending month belong to the hierarchy ending period.

i defined a basic measure: count and a calculated measure: numberofparticipants. the calculated measure is defined as:

sum(crossjoin([starting period].currentmember.parent.firstsibling.firstchild:[starting period].currentmember, [ending period].currentmember:[ending period].currentmember.parent.lastsibling.lastchild, [club id].currentmember), [measures].[count]))

i could use nonempty crossjoin but since the hierarchies are from the same dimension, it doesn't make a difference.

the MDX query i have looks something like:

select [starting period].[2005].[x] on axis(0), [ending period].[2005].[x] on axis(1) from clubstats where ([measures].[numberofparticipants], [club id].[23])

i am hoping to get the number of participants in club 23 during the month x of 2005. the problem is that for some months, the query returns correct result and for other months. the months that do have a problem are those where there is no existing record in the table with an ending date in month x even if there are records with ending date in month x+1, x+2, etc. it seems that crossjoin or the query "bailed out" after it determines that tuple (x, x) does not exist.

if i use different months for starting and ending period, e.g.

select [starting period].[2005].[3] on axis(0), [ending period].[2005].[4] on axis(1) from clubstats where ([measures].[numberofparticipants], [club id].[23])

again the result is empty if no participant with starting month of 2005 3 and ending month of 2005 4 even if there is participant starting in 2005 3 and ending in 2005 6, which ought to be part of the result.

does anybody know why this is happening? any help will be greatly appreciated!

> i need to calculated the number of

participants during a specific period for a give club

I think the definition of task needs to be clarified a bit before diving into

programming...

Suppose your start and end dates for any given member have "day"

granularity, meaning that for your system it does not make sense to record

the time of joining the club and time of quitting the club by the member. It

gives you capability to calculate the number of members in the club at certain

day.

How would you define this measure at other levels

like week, month and year? Is it the average number of members of the club

during the period?

|||

You mentioned above that: "..but since the hierarchies are from the same dimension..". If you're using AS 2005, and the [starting period] and [ending period] hierarchies are indeed in the same dimension (though I don't understand how/why it would be modelled that way), then the "Autoexists" feature will eliminate combinations of members from the 2 hierarchies which don't exist in the dimension data:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql90/html/imdxsmss05.asp

>>

Introduction to MDX Scripting in Microsoft SQL Server 2005

...

Autoexists

The true space of the cube is more restricted than the product of its attribute hierarchies. There are cells that do not exist, because Autoexists Attribute members from the same dimension, which do not exist with one another, do not exist in this cube space. For example, (Beijing, Canada) does not exist. The concept of Autoexists runs throughout this document.

Note This has nothing to do with data in the fact table. It is a dimensional concept only-Autoexists only pertains to the attributes in the same dimension.

Queries can request cells that do not exist in the cube space. For example, the statement select customer.gender.members on 0, {Customer.Name.Fred, Customer.Name.Jane} on 1 from sales includes cells that do not exist in this space. These cells always return empty-they cannot contain calculations and they cannot be written to.

...

>>

|||

You are right at pointing out the cause of the problem. To get around this, I need to create two server generated time dimension and use starting date and ending date to setup regular relationship between the measure and these dimensions.

I am still interested in hearing recommendations from experts on this forum because there maybe more elegant/efficient ways to set up the cube/dimensions.

Sunday, February 19, 2012

Cross-database Dependency Check

Is there anyway to check for cross-database dependencies?

For example:
I have a stored proc in the Pubs database that contains a query that references a table in the Northwind database (as well as reference a table in the Pubs database.) I'm having no problems finding the depencency for the Pubs table. I can't seem to find the dependency for the Northwind table.

Any help would be appreciated.

Thanks in advance.

ScottSQL Server 2000 only tracks objects in the current database within dbo.sysdepends.

-PatP

Thursday, February 16, 2012

Cross Tab Query

I have a table called summary. This table contains calldate, projects, hours
.
I need to create a report/table that shows the date down the left column and
the projects across the top.
Date ProjectA ProjectB ProjectC
20060401 12 0 2
20060402 2 5 4
20060403 3 5 1
How can I accomplish this?
Any help would be greatly appreciated.
code:

CREATE TABLE [#TEST] (
[sCalldate] [varchar]((20) NULL ,
[sProject] [varchar] (20) NULL ,
[dHours] numeric (10,4) NULL)
INSERT [#TEST] (sCalldate,sProject, dHours)
VALUES ('20060401', 'A', 12)
INSERT [#TEST] (sCalldate,sProject, dHours)
VALUES ('20060401', 'B', 0)
INSERT [#TEST] (sCalldate,sProject, dHours)
VALUES ('20060401', 'C', 2)
INSERT [#TEST] (sCalldate,sProject, dHours)
VALUES ('20060402', 'A', 2)
INSERT [#TEST] (sCalldate,sProject, dHours)
VALUES ('20060402', 'B', 5)
INSERT [#TEST] (sCalldate,sProject, dHours)
VALUES ('20060402', 'C', 4)
INSERT [#TEST] (sCalldate,sProject, dHours)
VALUES ('20060403', 'A', 3)
INSERT [#TEST] (sCalldate,sProject, dHours)
VALUES ('20060403', 'B', 5)
INSERT [#TEST] (sCalldate,sProject, dHours)
VALUES ('20060403', 'C', 1)


Thanks,
Ninel
Message posted via http://www.webservertalk.comTry:
select
sCallDate
, sum (case when sProject = 'A' then dHours else 0 end) ProjectA
, sum (case when sProject = 'B' then dHours else 0 end) ProjectB
, sum (case when sProject = 'C' then dHours else 0 end) ProjectC
from
#TEST
group by
sCallDate
go
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
.
"ngorbunov via webservertalk.com" <
u9125@.uwe>
wrote in message
news:5e3bc0ad31e3a@.uwe...
I have a table called summary. This table contains calldate, projects,
hours.
I need to create a report/table that shows the date down the left column and
the projects across the top.
Date ProjectA ProjectB ProjectC
20060401 12 0 2
20060402 2 5 4
20060403 3 5 1
How can I accomplish this?
Any help would be greatly appreciated.
code:

CREATE TABLE [#TEST] (
[sCalldate] [varchar]((20) NULL ,
[sProject] [varchar] (20) NULL ,
[dHours] numeric (10,4) NULL)
INSERT [#TEST] (sCalldate,sProject, dHours)
VALUES ('20060401', 'A', 12)
INSERT [#TEST] (sCalldate,sProject, dHours)
VALUES ('20060401', 'B', 0)
INSERT [#TEST] (sCalldate,sProject, dHours)
VALUES ('20060401', 'C', 2)
INSERT [#TEST] (sCalldate,sProject, dHours)
VALUES ('20060402', 'A', 2)
INSERT [#TEST] (sCalldate,sProject, dHours)
VALUES ('20060402', 'B', 5)
INSERT [#TEST] (sCalldate,sProject, dHours)
VALUES ('20060402', 'C', 4)
INSERT [#TEST] (sCalldate,sProject, dHours)
VALUES ('20060403', 'A', 3)
INSERT [#TEST] (sCalldate,sProject, dHours)
VALUES ('20060403', 'B', 5)
INSERT [#TEST] (sCalldate,sProject, dHours)
VALUES ('20060403', 'C', 1)


Thanks,
Ninel
Message posted via http://www.webservertalk.com|||--2000
SELECT
sCallDate
,SUM(CASE WHEN sProject = 'A' THEN dHours ELSE NULL END) AS ProjectA
,SUM(CASE WHEN sProject = 'B' THEN dHours ELSE NULL END) AS ProjectB
,SUM(CASE WHEN sProject = 'C' THEN dHours ELSE NULL END) AS ProjectC
FROM #TEST
GROUP BY sCallDate
--2005
SELECT sCallDate, A AS ProjectA, B AS ProjectB, C AS ProjectC
FROM #TEST
PIVOT(MAX(dHours) FOR sProject IN(A, B, C)) AS P
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"ngorbunov via webservertalk.com" <
u9125@.uwe>
wrote in message news:5e3bc0ad31e3a@.uwe...[color
=darkred]
>
I have a table called summary. This table contains calldate, projects, hour
s.
>
I need to create a report/table that shows the date down the left column a
nd
>
the projects across the top.
>
>
Date ProjectA ProjectB ProjectC
>
20060401 12 0 2
>
20060402 2 5 4
>
20060403 3 5 1
>
>
How can I accomplish this?
>
Any help would be greatly appreciated.
>
>
code:

>
CREATE TABLE [#TEST] (
>
[sCalldate] [varchar]((20) NULL ,
>
[sProject] [varchar] (20) NULL ,
>
[dHours] numeric (10,4) NULL)
>
>
INSERT [#TEST] (sCalldate,sProject, dHours)
>
VALUES ('20060401', 'A', 12)
>
>
INSERT [#TEST] (sCalldate,sProject, dHours)
>
VALUES ('20060401', 'B', 0)
>
>
INSERT [#TEST] (sCalldate,sProject, dHours)
>
VALUES ('20060401', 'C', 2)
>
>
INSERT [#TEST] (sCalldate,sProject, dHours)
>
VALUES ('20060402', 'A', 2)
>
>
INSERT [#TEST] (sCalldate,sProject, dHours)
>
VALUES ('20060402', 'B', 5)
>
>
INSERT [#TEST] (sCalldate,sProject, dHours)
>
VALUES ('20060402', 'C', 4)
>
>
INSERT [#TEST] (sCalldate,sProject, dHours)
>
VALUES ('20060403', 'A', 3)
>
>
INSERT [#TEST] (sCalldate,sProject, dHours)
>
VALUES ('20060403', 'B', 5)
>
>
INSERT [#TEST] (sCalldate,sProject, dHours)
>
VALUES ('20060403', 'C', 1)
>


>
>
Thanks,
>
Ninel
>
>
--
>
Message posted via http://www.webservertalk.com[/color]|||How can I do this without hardcoding the projects? New projects are added
almost everyday.
Tibor Karaszi wrote:
>--2000
>SELECT
> sCallDate
>,SUM(CASE WHEN sProject = 'A' THEN dHours ELSE NULL END) AS ProjectA
>,SUM(CASE WHEN sProject = 'B' THEN dHours ELSE NULL END) AS ProjectB
>,SUM(CASE WHEN sProject = 'C' THEN dHours ELSE NULL END) AS ProjectC
>FROM #TEST
>GROUP BY sCallDate
>--2005
>SELECT sCallDate, A AS ProjectA, B AS ProjectB, C AS ProjectC
>FROM #TEST
>PIVOT(MAX(dHours) FOR sProject IN(A, B, C)) AS P
>
>[quoted text clipped - 44 lines]
Message posted via webservertalk.com
http://www.webservertalk.com/Uwe/Forum...amming/200604/1|||SELECT SCALLDATE, SUM([PROJECT A]) AS [PROJECT A], SUM([PROJECT B]) AS
[PROJECT B], SUM([PROJECT C]) AS [PROJECT C]FROM
(
SELECT SCALLDATE,
CASE WHEN SPROJECT = 'A' THEN DHOURS ELSE 0 END AS [PROJECT A] ,
CASE WHEN SPROJECT = 'B' THEN DHOURS ELSE 0 END AS [PROJECT B] ,
CASE WHEN SPROJECT = 'C' THEN DHOURS ELSE 0 END AS [PROJECT C]
FROM #TEST
)AS A
GROUP BY SCALLDATE|||Unfortunately, you'd have to use dynamic SQL to generate the statement and
then execute the statement.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
.
"ngorbunov via webservertalk.com" <u9125@.uwe> wrote in message
news:5e3bec27d6652@.uwe...
How can I do this without hardcoding the projects? New projects are added
almost everyday.
Tibor Karaszi wrote:
>--2000
>SELECT
> sCallDate
>,SUM(CASE WHEN sProject = 'A' THEN dHours ELSE NULL END) AS ProjectA
>,SUM(CASE WHEN sProject = 'B' THEN dHours ELSE NULL END) AS ProjectB
>,SUM(CASE WHEN sProject = 'C' THEN dHours ELSE NULL END) AS ProjectC
>FROM #TEST
>GROUP BY sCallDate
>--2005
>SELECT sCallDate, A AS ProjectA, B AS ProjectB, C AS ProjectC
>FROM #TEST
>PIVOT(MAX(dHours) FOR sProject IN(A, B, C)) AS P
>
>[quoted text clipped - 44 lines]
Message posted via webservertalk.com
http://www.webservertalk.com/Uwe/Forum...amming/200604/1|||Try this,,
select sCalldate, ProjectA = ISNULL ((SELECT dHours FROM #Test WHERE
sProject = 'A' AND sCalldate =
Q.sCallDate),0),
ProjectB = ISNULL ((SELECT dHours FROM #Test WHERE sProject = 'B' AND
sCalldate =
Q.sCallDate),0),
ProjectC = ISNULL ((SELECT dHours FROM #Test WHERE sProject = 'C' AND
sCalldate =
Q.sCallDate),0)
FROM #test Q
GROUP BY sCallDate
Ref : EN-US;
q175574" target="_blank">http://support.microsoft.com/defaul...b;
EN-US;
q175574
Thanks,
Sree
[Please specify the version of Sql Server as we can save one thread and time
asking back if its 2000 or 2005]
"ngorbunov via webservertalk.com" wrote:

>
I have a table called summary. This table contains calldate, projects, hou
rs.
>
I need to create a report/table that shows the date down the left column a
nd
>
the projects across the top.
>
>
Date ProjectA ProjectB ProjectC
>
20060401 12 0 2
>
20060402 2 5 4
>
20060403 3 5 1
>
>
How can I accomplish this?
>
Any help would be greatly appreciated.
>
>
code:

>
CREATE TABLE [#TEST] (
>
[sCalldate] [varchar]((20) NULL ,
>
[sProject] [varchar] (20) NULL ,
>
[dHours] numeric (10,4) NULL)
>
>
INSERT [#TEST] (sCalldate,sProject, dHours)
>
VALUES ('20060401', 'A', 12)
>
>
INSERT [#TEST] (sCalldate,sProject, dHours)
>
VALUES ('20060401', 'B', 0)
>
>
INSERT [#TEST] (sCalldate,sProject, dHours)
>
VALUES ('20060401', 'C', 2)
>
>
INSERT [#TEST] (sCalldate,sProject, dHours)
>
VALUES ('20060402', 'A', 2)
>
>
INSERT [#TEST] (sCalldate,sProject, dHours)
>
VALUES ('20060402', 'B', 5)
>
>
INSERT [#TEST] (sCalldate,sProject, dHours)
>
VALUES ('20060402', 'C', 4)
>
>
INSERT [#TEST] (sCalldate,sProject, dHours)
>
VALUES ('20060403', 'A', 3)
>
>
INSERT [#TEST] (sCalldate,sProject, dHours)
>
VALUES ('20060403', 'B', 5)
>
>
INSERT [#TEST] (sCalldate,sProject, dHours)
>
VALUES ('20060403', 'C', 1)
>


>
>
Thanks,
>
Ninel
>
>
--
>
Message posted via http://www.webservertalk.com
>
|||Thats really informative sql 2005 way of doing cross tab.
Thanks,
Sree
[Please specify the version of Sql Server as we can save one thread and time
asking back if its 2000 or 2005]
"Tibor Karaszi" wrote:

> --2000
> SELECT
> sCallDate
> ,SUM(CASE WHEN sProject = 'A' THEN dHours ELSE NULL END) AS ProjectA
> ,SUM(CASE WHEN sProject = 'B' THEN dHours ELSE NULL END) AS ProjectB
> ,SUM(CASE WHEN sProject = 'C' THEN dHours ELSE NULL END) AS ProjectC
> FROM #TEST
> GROUP BY sCallDate
> --2005
> SELECT sCallDate, A AS ProjectA, B AS ProjectB, C AS ProjectC
> FROM #TEST
> PIVOT(MAX(dHours) FOR sProject IN(A, B, C)) AS P
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "ngorbunov via webservertalk.com" <u9125@.uwe> wrote in message news:5e3bc0ad3
1e3a@.uwe...
>|||Hi,
Check out the RAC utility.It will easily do what you want and
will not insult your intelligence:)
www.rac4sql.net
"ngorbunov via webservertalk.com" <u9125@.uwe> wrote in message
news:5e3bec27d6652@.uwe...
> How can I do this without hardcoding the projects? New projects are added
> almost everyday.
> Tibor Karaszi wrote:
> --
> Message posted via webservertalk.com
> http://www.webservertalk.com/Uwe/Forum...amming/200604/1|||How much does it take for your intelligence to be insulted?
Over 5 years in development and an army to do it and this is what
they throw at users':)
"Sreejith G" <SreejithG@.discussions.microsoft.com> wrote in message
news:B53C964A-F511-451D-8597-BF21640130BA@.microsoft.com...
> Thats really informative sql 2005 way of doing cross tab.
> --
> Thanks,
> Sree
> [Please specify the version of Sql Server as we can save one thread and
> time
> asking back if its 2000 or 2005]
>
> "Tibor Karaszi" wrote:
>

Tuesday, February 14, 2012

Cross database integrity

Is it possible to create foreign key between to distinct SQL databases ?
Database A contains table [customers] (primary key : customer_id)
Database B contains table [invoices] (each invoice should be linked to
a customer. Foreign key : customer_id)
I would like to create an integrity constraint between
[invoices].[customer_id] and [customers].[customer_id], despite the fact
that [invoices] et [customers] tables are in SEPARATE databases.
Is it possible to do that ?
Thanks in advance
Tom
The short answer is no. The more complex answer is: Yes, you would have to
enforce cross database constraint integrity using a Trigger. There are
security and other issues that will also have to be addressed.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"Tom McLeesh" <tom.mcleesh@.gmail.com> wrote in message
news:u7%23a7148GHA.4572@.TK2MSFTNGP02.phx.gbl...
> Is it possible to create foreign key between to distinct SQL databases ?
> Database A contains table [customers] (primary key : customer_id)
> Database B contains table [invoices] (each invoice should be linked to a
> customer. Foreign key : customer_id)
> I would like to create an integrity constraint between
> [invoices].[customer_id] and [customers].[customer_id], despite the fact
> that [invoices] et [customers] tables are in SEPARATE databases.
> Is it possible to do that ?
> Thanks in advance
> Tom
|||Often, the quality of the responses received is related to our ability to
'bounce' ideas off of each other. In the future, to make it easier for us to
give you ideas, and to prevent folks from wasting time on already answered
questions, please:
Don't post to multiple newsgroups. Choose the one that best fits your
question and post there. Only post to another newsgroup if you get no answer
in a day or two (or if you accidentally posted to the wrong newsgroup -and
you indicate that you've already posted elsewhere).
If you really think that a question belongs into more than one newsgroup,
then use your newsreader's capability of multi-posting, i.e., posting one
occurrence of a message into several newsgroups at once. If you multi-post
appropriately, answers 'should' appear in all the newsgroups. Folks
responding in different newsgroups will see responses from each other, even
if the responses were posted in a different newsgroup.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"Tom McLeesh" <tom.mcleesh@.gmail.com> wrote in message
news:u7%23a7148GHA.4572@.TK2MSFTNGP02.phx.gbl...
> Is it possible to create foreign key between to distinct SQL databases ?
> Database A contains table [customers] (primary key : customer_id)
> Database B contains table [invoices] (each invoice should be linked to a
> customer. Foreign key : customer_id)
> I would like to create an integrity constraint between
> [invoices].[customer_id] and [customers].[customer_id], despite the fact
> that [invoices] et [customers] tables are in SEPARATE databases.
> Is it possible to do that ?
> Thanks in advance
> Tom

Cross database integrity

Is it possible to create foreign key between to distinct SQL databases ?
Database A contains table [customers] (primary key : customer_id)
Database B contains table [invoices] (each invoice should be linked to
a customer. Foreign key : customer_id)
I would like to create an integrity constraint between
[invoices].[customer_id] and [customers].[customer_id], despite the fact
that [invoices] et [customers] tables are in SEPARATE databases.
Is it possible to do that ?
Thanks in advance
Tom
Tom
> Is it possible to create foreign key between to distinct SQL databases ?
No
"Tom McLeesh" <tom.mcleesh@.gmail.com> wrote in message
news:u2njv248GHA.4572@.TK2MSFTNGP02.phx.gbl...
> Is it possible to create foreign key between to distinct SQL databases ?
> Database A contains table [customers] (primary key : customer_id)
> Database B contains table [invoices] (each invoice should be linked to a
> customer. Foreign key : customer_id)
> I would like to create an integrity constraint between
> [invoices].[customer_id] and [customers].[customer_id], despite the fact
> that [invoices] et [customers] tables are in SEPARATE databases.
> Is it possible to do that ?
> Thanks in advance
> Tom
|||"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:eh1pb548GHA.4288@.TK2MSFTNGP02.phx.gbl...
> Tom
> No
>
And a desire to implement referential integrity between databases usually
indicates that you shouldn't be using different databases.
Perhaps multiple schemas in a single database?
David
|||On Thu, 19 Oct 2006 16:54:00 +0200, "Uri Dimant" <urid@.iscar.co.il>
wrote:

>Tom
>No
But it would be possible to write triggers on the tables in both
databases to enforce the relationship.
Roy Harvey
Beacon Falls, CT
|||>> Is it possible to create foreign key between to distinct SQL databases ?
No. Triggers are the usually suggested workaround.
Anith

Cross database integrity

Is it possible to create foreign key between to distinct SQL databases ?
Database A contains table [customers] (primary key : customer_id)
Database B contains table [invoices] (each invoice should be linked to
a customer. Foreign key : customer_id)
I would like to create an integrity constraint between
[invoices].[customer_id] and [customers].[customer_id], desp
ite the fact
that [invoices] et [customers] tables are in SEPARATE databases.
Is it possible to do that ?
Thanks in advance
TomTom
> Is it possible to create foreign key between to distinct SQL databases ?
No
"Tom McLeesh" <tom.mcleesh@.gmail.com> wrote in message
news:u2njv248GHA.4572@.TK2MSFTNGP02.phx.gbl...
> Is it possible to create foreign key between to distinct SQL databases ?
> Database A contains table [customers] (primary key : customer_id)
> Database B contains table [invoices] (each invoice should be linked t
o a
> customer. Foreign key : customer_id)
> I would like to create an integrity constraint between
> [invoices].[customer_id] and [customers].[customer_id], de
spite the fact
> that [invoices] et [customers] tables are in SEPARATE databases.
> Is it possible to do that ?
> Thanks in advance
> Tom|||"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:eh1pb548GHA.4288@.TK2MSFTNGP02.phx.gbl...
> Tom
> No
>
And a desire to implement referential integrity between databases usually
indicates that you shouldn't be using different databases.
Perhaps multiple schemas in a single database?
David|||On Thu, 19 Oct 2006 16:54:00 +0200, "Uri Dimant" <urid@.iscar.co.il>
wrote:

>Tom
>No
But it would be possible to write triggers on the tables in both
databases to enforce the relationship.
Roy Harvey
Beacon Falls, CT|||>> Is it possible to create foreign key between to distinct SQL databases ?
No. Triggers are the usually suggested workaround.
Anith

Cross database integrity

Is it possible to create foreign key between to distinct SQL databases ?
Database A contains table [customers] (primary key : customer_id)
Database B contains table [invoices] (each invoice should be linked to
a customer. Foreign key : customer_id)
I would like to create an integrity constraint between
[invoices].[customer_id] and [customers].[customer_id], despite the fact
that [invoices] et [customers] tables are in SEPARATE databases.
Is it possible to do that ?
Thanks in advance
TomTom
> Is it possible to create foreign key between to distinct SQL databases ?
No
"Tom McLeesh" <tom.mcleesh@.gmail.com> wrote in message
news:u2njv248GHA.4572@.TK2MSFTNGP02.phx.gbl...
> Is it possible to create foreign key between to distinct SQL databases ?
> Database A contains table [customers] (primary key : customer_id)
> Database B contains table [invoices] (each invoice should be linked to a
> customer. Foreign key : customer_id)
> I would like to create an integrity constraint between
> [invoices].[customer_id] and [customers].[customer_id], despite the fact
> that [invoices] et [customers] tables are in SEPARATE databases.
> Is it possible to do that ?
> Thanks in advance
> Tom|||"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:eh1pb548GHA.4288@.TK2MSFTNGP02.phx.gbl...
> Tom
>> Is it possible to create foreign key between to distinct SQL databases ?
> No
>
And a desire to implement referential integrity between databases usually
indicates that you shouldn't be using different databases.
Perhaps multiple schemas in a single database?
David|||On Thu, 19 Oct 2006 16:54:00 +0200, "Uri Dimant" <urid@.iscar.co.il>
wrote:
>Tom
>> Is it possible to create foreign key between to distinct SQL databases ?
>No
But it would be possible to write triggers on the tables in both
databases to enforce the relationship.
Roy Harvey
Beacon Falls, CT|||>> Is it possible to create foreign key between to distinct SQL databases ?
No. Triggers are the usually suggested workaround.
--
Anith