Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
create multiple records or rows in a single table
Opeth
I am working on a dbschema.cfg file for data deploy. By using that dbschema file i have to deploy multiple records to one table.
On my DCT i have several images , images_alt and description for GUEST_ROOM, SUITE,EXECUTIVE_ROOM,ACCESSIBLE_ROOM,DELUXE_ROOM AND VIP_GUEST_ROOM .now from my dbschema file i have to deploy each of them as a new record on the same table.i have attached a sample table on attached excel file.
Any help will be appreciated.
Find more posts tagged with
Comments
Migrateduser
I see the spreadsheet you attached but have you even tried this yet? Are you having trouble or are you just looking for an approach? Either way, please post your DCT.
What do columns A, B, and C describe on your spreadsheet? You mentioned this is all going in to one table?
Opeth
Thanks for the quick reply. Before i code the dbschema i need to know how to push multiple records into a single table.
That's just a samle table for my dbschema enhancement. Ignore A,B and C instead think of image , image_alt and description as column of the table "ROOM".
Opeth
here is the sample DCT.
Migrateduser
I'm missing some context (i.e. your DCT) but yes, you can insert multiple records into one table. At least, if you need to insert 3 rows, for instance, set up the 3 groups but don't declare any as the root-group (I don't think I've ever tried this but I THINK you can get away with not declaring a root-group). You can have the same schema represented in each group and just pass different values to each.
It could be far simpler than this, too, but again -- I'm missing the context of your DCT.
Dave
Migrateduser
Whoops -- just saw your DCT... hold on, then.
Migrateduser
Okay, I think the way I mentioned might be the way to go. I see you have more than a few containers in this DCT and my impression is that you want to deploy one container as ROW 1, another container as ROW 2, etc.? If that's the case, then I think the approach I mentioned before would work just fine.
Is there anything else distinctive about the table? For instance, is the primary key an IDENTITY and if so, do you need to know that value before passing in the DCR?
Dave
Opeth
Their will be a primary key to each record which i will set as a hidden item.
Migrateduser
Their will be a primary key to each record which i will set as a hidden item.
If you're already setting that and plan to deploy it as the primary key, this seems to be straight-forward. Try setting it up as 3 (or however many, I think you mentioned 3 before) groups without declaring one of them as a root group. Theoretically, it may not matter if you declare one as the root group or not but I'd try leaving them all as "no" at first.
Dave
Opeth
group is the key to create multiple records in a single table. Thanks Dave.
But my table's name in the dbschema which is "test_accommodations" where all the letters are in lower case, turns into upper case table name "TEST_ACCOMMODATIONS" in the database.
any clue?
Migrateduser
The driver you're using might be doing that automatically, I'm not sure. But is that a problem? I don't know of any database platform that's case sensitive. If your records are not getting in, you may want to attach your DD definition to your next post.
Opeth
I am using Mysql in UNIX where their Database and table names are case-sensitive but insensitive under Windows. My records are getting into table without any problem but it is not going into "test_accomodations" instead it creats a new table "TEST_ACCOMMODATIONS" where all the data are feed.
I am attaching my dbschema and datacapture file.
Opeth
Any advise will be appreciated.
Migrateduser
I can't speak to the case-switching problem -- maybe Sunil might see this post. But I can direct you to the following link:
http://dev.mysql.com/doc/refman/5.0/en/name-case-sensitivity.html
... but it sounds like you pretty much know this information. At the very least, it might serve as a work-around if you don't get any response to this issue.
Dave