Showing posts with label own. Show all posts
Showing posts with label own. Show all posts

Tuesday, March 20, 2012

Referencing a PK from another database!

Hi all,

I have a recruitment site which is part of a large portal which has other services, so the whole portal has its own database apart from the recruitment's. and there's a couple of other databases. Now I want to authenticate the user once I mean if this user(JobSeeker) had already been logged in from somewhere on the portal modules, I don't want to ask him again to sign in to search jobs or modify his resume. Now, with that said I was wondering can I create a FK say UserID in the resumes table in the (Recruitment) database whose value is the PK of the Users table of the (portal) database. So, is that possible? I mean referencing a PK from a table in another database? If not, what is the best approach to integrate multiple databases within that portal and to implement the above functionality.

Another question is can I do a cross-database joins? and how?

Thanks


OK, two things:

-Cross-Database joins can done using the three part name Select * From Database.Owner.Objectname. If you enabled crossdatabase ownership chain you won′t have any problem if the query is embedded in a view. If the query is not embedded in a view, or the ownership chains breaks or you disabled cross database ownership chain, you will have to grant the user who tries to access the table in the other database the appropiate rights.

-Referential entegrity across databases can only be ensured using triggers.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

Monday, March 12, 2012

Reference to a second dataset in a second matrix within one report

Hello Everyone,
I am attempting to create a report that contains two matrices. Each matrix will use it's own dataset. My problem is on the second matrix...I am unable to fiture out how to code the Value Property to refer to the field without First or Sum. When I drag and drop the fields into the cells, they appear like this;
=First(Fields!ReportRow.Value, "Claims")
or
=Sum(Fields!ReportRowSeq.Value, "Claims")
Is there any way I can get the field only without an aggregate?
Something like;
=Fields!ReportRowSeq.Value, "Claims"?
Please help, I am new to Reporting Services and appreciate any help you can offer!
Thank You, Tin
From http://www.developmentnow.com/g/115_2007_2_0_0_0/sql-server-reporting-services.ht
Posted via DevelopmentNow.com Group
http://www.developmentnow.comOn Feb 23, 4:43 pm, Tina Wolf<Tina_W...@.countrywide.com> wrote:
> Hello Everyone,
> I am attempting to create a report that contains two matrices. Each matrix will use it's own dataset. My problem is on the second matrix...I am unable to fiture out how to code the Value Property to refer to the field without First or Sum. When I drag and drop the fields into the cells, they appear like this;
> =First(Fields!ReportRow.Value, "Claims")
> or
> =Sum(Fields!ReportRowSeq.Value, "Claims")
> Is there any way I can get the field only without an aggregate?
> Something like;
> =Fields!ReportRowSeq.Value, "Claims"?
> Please help, I am new to Reporting Services and appreciate any help you can offer!
> Thank You, Tina
> Fromhttp://www.developmentnow.com/g/115_2007_2_0_0_0/sql-server-reporting...
> Posted via DevelopmentNow.com Groupshttp://www.developmentnow.com
You should be able to just use: 'Fields!ReportRowSeq.Value' as long as
the dataset 'Claims' is used as the main one in the matrix, it should
work out fine. If you get unexpected results, you will need to re-
evaluate the query you are using for the matrix. Hope this helps.
Regards,
Enrique Martinez
Sr. SQL Server Developer|||In a matrix, the content cells are aggregates, grouped by the row and column
headers. That is why the detail cell contents want to be sum, or first or
max...
I don't think it would work any other way.
--
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.
"Tina Wolf" wrote:
> Hello Everyone,
> I am attempting to create a report that contains two matrices. Each matrix will use it's own dataset. My problem is on the second matrix...I am unable to fiture out how to code the Value Property to refer to the field without First or Sum. When I drag and drop the fields into the cells, they appear like this;
> =First(Fields!ReportRow.Value, "Claims")
> or
> =Sum(Fields!ReportRowSeq.Value, "Claims")
> Is there any way I can get the field only without an aggregate?
> Something like;
> =Fields!ReportRowSeq.Value, "Claims"?
> Please help, I am new to Reporting Services and appreciate any help you can offer!
> Thank You, Tina
> From http://www.developmentnow.com/g/115_2007_2_0_0_0/sql-server-reporting-services.htm
> Posted via DevelopmentNow.com Groups
> http://www.developmentnow.com
>|||Thank you! I have now changed my code to use only one dataset. This has brought up another issue for me. I will ultimately have 5 matrices on this report and will have all the data within one dataset, but each matrix needs to use only it's data. How do I code an expression to pull only specific data from the dataset for each matrix
From http://www.developmentnow.com/groups/viewthread.aspx?newsgroupid=115&threadid=93631
Posted via DevelopmentNow.com Group
http://www.developmentnow.com|||On Feb 26, 4:36 pm, Tina Wolf<tina_w...@.countrywide.com> wrote:
> Thank you! I have now changed my code to use only one dataset. This has brought up another issue for me. I will ultimately have 5 matrices on this report and will have all the data within one dataset, but each matrix needs to use only it's data. How do I code an expression to pull only specific data from the dataset for each matrix?
> Fromhttp://www.developmentnow.com/groups/viewthread.aspx?newsgroupid=115&...
> Posted via DevelopmentNow.com Groupshttp://www.developmentnow.com
If there is a distinguishing factor within the single dataset, you
should be able to use a different filter for each matrix. Of course,
you could always use separate datasets as well, since you can
reference datasets outside of the location that they are used (in the
same report).
Regards,
Enrique Martinez
Sr. SQL Server Developer|||Thank you, Enrique!
The filter works perfectly! I really appreciate your help!
Regards, Tin
From http://www.developmentnow.com/groups/viewthread.aspx?newsgroupid=115&threadid=93631
Posted via DevelopmentNow.com Group
http://www.developmentnow.com