Comments
Sort by recent activity
Hassan, That is correct. This way, if I need to generate data for a different database, I only have to change the default database for the project and not go into every column that uses a SQL Statement. Jeff / comments
Hassan,That is correct. This way, if I need to generate data for a different database, I only have to change the default database for the project and not go into every column that uses a SQL State...
This did not work. The foreign key for FacilityId references the Facilities table while the ContactId references the Contacts table. I tried using Foreign Key (manual) for FacilityId and selecting the Contacts table, but could not get that to work. I was able to make it work using a SQL Statement. One other question: When using a SQL Statement for a column, is there a way to have it use the same connection as the project? / comments
This did not work. The foreign key for FacilityId references the Facilities table while the ContactId references the Contacts table. I tried using Foreign Key (manual) for FacilityId and selectin...
I am not trying to set the Id column in the Jobs table. What I am trying to do is set the ContactId based on the FacilityId in the Contacts table. Is it possible to use a generated value in a table in a SQL Query for another column in the same table. / comments
I am not trying to set the Id column in the Jobs table. What I am trying to do is set the ContactId based on the FacilityId in the Contacts table. Is it possible to use a generated value in a tab...
I just realized there has been a change to the Jobs table since I got the error and it now causes a different problem. The FacilityId has been changed to allow NULL values. Now, I get only NULLs for the FacilityId when using the below query for FacilityId and the automatic Foreign Key generator for ContactId. SELECT Contacts.FacilityId FROM Contacts join Jobs on Contacts.Id = Jobs.ContactId Sorry I didn't realize this sooner. The DDL I sent is correct. / comments
I just realized there has been a change to the Jobs table since I got the error and it now causes a different problem. The FacilityId has been changed to allow NULL values. Now, I get only NULLs ...
As I said before, the automatic Foreign Key generator will not work in this instance. What I need is to have the Facility ID based on the Contact ID. Using the SQL Statement generator makes sense, but I got an error when I tried the statement you provided. / comments
As I said before, the automatic Foreign Key generator will not work in this instance. What I need is to have the Facility ID based on the Contact ID. Using the SQL Statement generator makes sense...
Any other ideas on how to accomplish this? / comments
Any other ideas on how to accomplish this?
I tried your SQL Statement and got the error: An error occurred. The multi-part identifier "Jobs.ContactId" could not be bound. I also tried the following: SELECT Contacts.FacilityId FROM Contacts join Jobs on Contacts.Id = Jobs.ContactId This gives the message "Not enough rows for column 'FacilityId' in the preview. / comments
I tried your SQL Statement and got the error: An error occurred. The multi-part identifier "Jobs.ContactId" could not be bound.I also tried the following:SELECT Contacts.FacilityId FROM Contacts j...
I did use the automatic Foreign Key generator for the Contact. The Facility ID uses the generator as it has a foreign key tying it to the Facilities table. When the Jobs table is populated, it has a valid Contact and Facility, but the Facility ID might not be the facility that is assigned to the contact in the Contacts table. / comments
I did use the automatic Foreign Key generator for the Contact. The Facility ID uses the generator as it has a foreign key tying it to the Facilities table. When the Jobs table is populated, it ha...