Get One to One relation information from SMO
Hello I have 2 tables.
Business & categories. Both are connected using one to one relation.
In business table I created ForeignKey relation to Category & then I made CategoryId column of Business Table Unique Key in index.
In this way I create One to one relation between them.
So from Business I can get Category by using Following SMO Code:
foreach (Microsoft.SqlServer.Management.Smo.Table table in lstTableName)
var ReferenceData=table.ForeignKeys;
It is fine. But Now from category Table I also want to see Business Object. I know that I can travers EnumForeignKeys() But in that I can get its SetCollection data.
But I want o know the information regarding One to One relationship . that meance I want to see cardinality information from SMO.
Is there any way that I can have that information using SMO?
If ismo is not possible then some kind of SQL query is also ok for me.
Thanking you in advance..
Regards
Vipul Langalia
Hi,
IMO this does not seem possible using SMO or any other method as well.
You cannot create a 1..1 relationship directly in SQL Server.
To implement such a relationship we need to create a FOREIGN KEY and then create a UNIQUE constraint on the foreign key column, this again does not guarantee 1..1 relationship but 0..1 relationship.
So what you can do is check if UNIQUE constraint is defined on the foreign key column in the referencing table.
- Vishal
SqlAndMe.com
Similar Messages
-
Colleting related information from related tables
Hi,
I have a requirement that i have to collected all related information from all related tables and store into text file.
Table_A - Table_B,Table_B - Table_C, Table_B - Table_D
if this is the relation
for each record in Table_A i have to collected the details from Table_B and from all the related tables. The structure is not definded and it can varry.
present approach is
we have designed a table with parent,child,reference and the relation we are mentioning it in the table and using this we are trying to represent in tree structure.
we have also writen recursive procedure to traverse through the nodes and flushing the record to the file.
Is that there is any better way to do?Thanks a lot for your interest
the table structure is like this
case
|----act_entry
|....|--------gbst_elm
|....|--------participant
|....|--------user
|----close_case
.....|------act_entry
.................|----- gbst_elm
.................|----- participant
.................|----- user
so i want to collect the related records of a particular
case ( let it be 100) in all act_entry (let it be 200,300) and then i have to go to gbst_elm and collect all records of gbst_elm(let it be 400,500) related to fetched act_entry based on the case.
so the result in the text file shoule be like this
100, , , , ,
200, , , , ,
300, , , , ,
400, , , , ,
500, , , , ,
then for next case
relation of the table structured in a table
case_table_rel
parent........child............relation
case........act_entry.....case2act_entry
act_entry...gbst_elm......act_entry2gbst_elm
act_entry...participant...act_entry2participant
act_entry...user..........act_entry2user
case........close_case....case2close_case
close_case..act_entry.....close_case2act_entry
act_entry...gbst_elm......act_entry2gbst_elm
act_entry...participant...act_entry2participant
act_entry...user..........act_entry2user
Hope now it would be clear if not kindly reply.
Thanks -
How to get Mobile number and other information from SIM card
Hi,
I like to get mobile number,mobile user name and other information from SIM card using j2me program.Is there is any API for this one.
Any one give guidelines to me how to get this.
with regards,
latchiyaPlease use the search! this topic has come up lots of times already.
-
How to get the user and groups information from http header
Hi All,
In my current scneario, we are using Siteminder for SSO setup.. And in this process, after authentication and authorization, they are going to append the user information and group information of the user into a HTTP header and it will be sent back to our presentation services.. We have to extract the user information and group information from the http header.
My HTTP header will look like as follows..
SM_USER XYZ
SM_USERDN CN=Firstname\, Lastname\, xyz, OU=GPO-Low Level Security,OU=Domain Users,OU=BU FDT,
SM_USERGROUPS CN=GG-CA-SiteminderAdmins, OU=Global,OU=Domain Groups, DC=com^CN=GG-ServiceDeskAdmin-TCCORPCEFS
And also if anyone explain me the overall working of SSO in detail like how presentation services will make a connection to BI server( I guess using Impersonator User), and also how our BI server will read the URL from presentation services and the over all working flow in our OBIEE..
Thanks a lot....Please use the search! this topic has come up lots of times already.
-
Audit Related Information from CUP
Hi,
Is there any way from where we can get the information on modifications done(thru change user request type) long with the request nos(not by clicking on every request and look for roles attached or removed).
I checked in request administration and informer tab,but they are only displaying the request types,user who submitted the request etc.
Thank you.
MukeshThanks a lot for your interest
the table structure is like this
case
|----act_entry
|....|--------gbst_elm
|....|--------participant
|....|--------user
|----close_case
.....|------act_entry
.................|----- gbst_elm
.................|----- participant
.................|----- user
so i want to collect the related records of a particular
case ( let it be 100) in all act_entry (let it be 200,300) and then i have to go to gbst_elm and collect all records of gbst_elm(let it be 400,500) related to fetched act_entry based on the case.
so the result in the text file shoule be like this
100, , , , ,
200, , , , ,
300, , , , ,
400, , , , ,
500, , , , ,
then for next case
relation of the table structured in a table
case_table_rel
parent........child............relation
case........act_entry.....case2act_entry
act_entry...gbst_elm......act_entry2gbst_elm
act_entry...participant...act_entry2participant
act_entry...user..........act_entry2user
case........close_case....case2close_case
close_case..act_entry.....close_case2act_entry
act_entry...gbst_elm......act_entry2gbst_elm
act_entry...participant...act_entry2participant
act_entry...user..........act_entry2user
Hope now it would be clear if not kindly reply.
Thanks -
Is there a way i can get all my pictures and information from my iPod after its been broken?
Is it possible to get my information out of my iPod Touch after its been broken?
Sure.
If you restore the latest backup of your iPhone 5 (from iTunes or iCloud) to your new iPhone 5S, assuming you are using the same telephone number and same cellular carrier and same Apple ID, you will retrieve all the photos and videos that were in the iPhone 5's Camera Roll when it was last backed up. -
Getting the current installed version information from SAP with VBScript
This is probably a question that is buried somewhere in here but so far no luck finding it so i'm throwing it out to everyone.
I am in charge of developing all of the distribution packages for SAP and any and all add-ons our corporate site requires. I'm using radia as a push tool and vbscript and wmi to manage the uninstall, install, patching, updating, and miscellaneous functions needed on each users system.
prior to my taking this position over an older version of SAP was distributed to several users with less than stellar results. due to the massive size of the Frontend GUI i've separated it out as a base stand alone install and packaged each Add-On with only the files it needs to complete the FE install. in order to guarantee my users have the newest version of the FE GUI on their systems i am doing some rudimentary checks based on the existence or no existence of the push directory of the older sap package on the users system. which works for now but is not the most graceful thing.
What i need is to be able to check right from a running vbscript what the current version and patch level the FE GUI is running at and any other components if possible, for now the FE GUI is the most important
Thanks for the help
Cheers,
<b>Ryan Strope
Distributed Services
(Software package development/testing)
Lockheed Martin Systems Integration Owego
(Cyber City Computers)
[email protected]
(607)751-1164
Quid quid latine dictum sit, altum videtur
</b>Ryan,
I hope you find this of use. The only issue you will have is if the user has the SAP GUI running. If so, the getversion call will fail as it requires an exclusive lock on the file. I do not know why.
Anyway, here is the code:
Dim oShell, SAPdestdir, fso, i
Set oShell = WScript.CreateObject("WScript.Shell")
SAPdestdir = oShell.RegRead("HKLMSOFTWARESAPSAP SharedSAPdestdir")
Wscript.Echo SAPdestdir
Set fso = CreateObject("Scripting.FileSystemObject")
SAPGuiVer = fso.GetFileVersion(SAPdestdir & "SAPGuiSAPGui.exe")
WScript.Echo SAPGuiVer
verInfo = Split(SAPGuiVer, ".")
For i = 0 To UBound(verInfo)
WScript.Echo verInfo(i)
Next -
Is there a way to get all of my contacts and calendar information from my palm pilot to my I pad
Is there a way to get my contacts and calendar information from a tungsten E palm pilot to my I pad
It would be more helpful to contact the maker of your palm pilot to get help for that
-
Remove RMAN information from target database control file
Dear Gurus,
Can any one inform me that how I can remove RMAN related information from Target database control file without recreating the control file.
Regards,
asifI want to remove all RMAN related infromation from control file including the destination specification where backup sets were being created becuase that destination is no more available,
configuration information also need to be removed from control file without recreating the control file.
kindly help,
regards,
asif -
Remove RMAN information from target control file
Dear Gurus,
Can any one inform me that how I can remove RMAN related information from Target database control file.
Regards,
asifRecreate the Controlfile.
1. Generate the script with "ALTER DATABASE BACKUP CONTROLFILE TO TRACE;"
2. Shutdown the database
3. Obtain the script from the tracefile in user_dump_dest
4. Run the CREATE CONTROLFILE portion of the script
Note : Oracle generally advices a Cold Backup before doing a CREATE CONTROLFILE. If you edit the script and inadvertently miss one or more datafiles from the CREATE command, those datafiles would no longer belong to the database and you wouldn't be able to "add" them back -- you'd have to RESTORE the controlfiles and database.
Recreating the Controlfile clears all information about recent backups from the controlfile. So this is not a step to be taken lightly. If you do this and, later, need to do a Restore/Recover operation, RMAN wouldn't find information. But that, based on a reading of your question, seems to be what you DO want to do.
Hemant K Chitale
http://hemantoracledba.blogspot.com -
Table for Stock Requirement List related information
Dear Sir,
We have make-to-order scenario , on receiving the Order from Customer we first create a Sale-Order for the Ordered Item . Subsequently in MD04 , we find a requirement getting reflected for the Customer Order .
For example say the Sale-Order number is S-101 and the Line Item is 10 for the FERT material say FERT-101 having the Order quantity as 1 number . In MD04 , we find a requirement getting reflected with the following information :
MRP Element --> CustOrd
MRP element data --> S-101 / 00010 / 0001
Recd/Reqd Qty --> 1-
Available Qty --> 1-
We need to write a Z program for getting the list of the requirements against the Customer Order (as shown in MD04) .
Kindly guide us as which Tables we need to refer for getting the above information pl .
We assure to award full points for the suggested solution .
Rgds
B MittalHi,
Pls use below function module, same as you will get Stock Requirement List related information
MD_STOCK_REQUIREMENTS_LIST_API
For test, goto SE37 and test it
Regards,
Sankaran -
I cant put pdfs or music on my itouch,it wont sync.the message i get when itunes comes up is "iTunes was unable to load data class information from sync services.reconnect or try again later." and its just my itouch i tried another one and was able to put songs and pdfs on it...please help!
Try here:
iTunes for Windows: "Unable to load data class" or "Unable to load provider data" sync services alert
If not successful see the previous discussion on the right side of this page with the green checkmark. -
i was transferring my information from my old iphone to the new one, and i forgot that i had some pictures in the new one. i did the restoring information and the pictures in new one are gone. how can i get them back???? please
Only way to get it back is to restore your phone from a backup, if those pics were included in that backup.
But most likely those pics are gone.
What you should've done was import http://support.apple.com/kb/HT4083 the pics to your computer and after you restored from your old backup, you could sync those new pics to your phone via itunes. -
i have three tables A,B,C. there is one to many relation between A and B. and one to many relation existed between table b and c . how will get data from these three tables
check if this helps:
select * --you can always frame your column set
from tableA a
left join tableB b on a.aid=b.aid
left join tableC c on c.bid=b.bid
This is just a general query. However, we can help you a lot more, if you can post the DDL + sample data and required output.
Thanks,
Jay
<If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'> -
Get information from one PDF to another.
I have two PDF's one is a flat document with text, the other is a form. I would like to extract information from the flat file and fill in the form on the second PDF. I would also like to create a button that saves the document as a new file name with information from the document.
more info:
I would need to do this on an ipad (the actual work not the Programing).
I have Adobe X pro and live cycle.
The text from the first file that I need is always in the same place for example "Job number: Xxxxxxx".
any part of this would be great but if you know a way to do all of this it would be amazing.How about at least using JavaScript to "saveas" to a new name? I have seen people online talking about something similar to this but it always includes a path name which the ipad does not use.
Also, how would I do it on a PC? I could have the person who creates the first document run a script on their computer and send me both files.
Maybe you are looking for
-
Safari will not open/freezes
This is a friend's computer so I am unsure as to what exactly happened but the symptoms now experieenced is that his Safari will not work. I restarted computer, etc... nothing. When one opens Safari it will look as if opened but with now window openi
-
Ipod recognized by computer for only a few seconds?!
My ipod froze up while it was plugged into the computer. I unplugged it and reset it, but now it keeps showing a folder or a battery w/ an exclamation mark when i plug it into the AC adapter. When I plug it into the computer, it'll show the same icon
-
Hi, I'm having a bit of a sorting problem when it comes to an artist with name variations. The example I'm going to use is DJ Tiesto. There are album I have where he is credited as DJ Tiesto, and others where he is simply Tiesto. In the end, I'd like
-
How Do I Open Photoshop CC??
HELP ME I AM GIVING OUT CASH AWARDS ON MY FACEBOOK AT HIKETHEGAMER!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!
-
SB Live! 5.1 Digital Install Probl
I can't get drivers for my Sound Blaster Li've! 5. (SB0060) S/N: IS006035673203056 WindowsXP detects the card because it installs its own drivers... (Creative AudioPCI (E37, E373)(WDM)) And I know I don't have that by physically looking at the card.