Red Gate forums :: View topic - Mapping SQL tables and Shuffle data ?
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Data Generator 1
SQL Data Generator 1 forum

Mapping SQL tables and Shuffle data ?

Search in SQL Data Generator 1 forum
Post new topic   Reply to topic
Jump to:  
Author Message
jay23



Joined: 29 Jul 2008
Posts: 5

PostPosted: Tue Jul 29, 2008 12:45 am    Post subject: Mapping SQL tables and Shuffle data ? Reply with quote

I am using an external data base view to map. This works fine where the records are inserted in the same order as whats on the source db.

Is their a Shuffle option. I need to import 2 columns and each has to match. For example let assume I am trying to do a movie ticket sales table.

Movie Name, Studio Name (so both has to match) are mapped from external source. Right now it works where col1 and and col2 mapes the source table..but in the same order. Their is no shuffle and random way to do it

Jay
_________________
Jay Janarthanan
Back to top
View user's profile Send private message
benhall



Joined: 14 Dec 2007
Posts: 98

PostPosted: Thu Jul 31, 2008 4:59 pm    Post subject: Reply with quote

Hello,

I recommend you to use the SQL Statement generator as this will shuffle the data for you. You should be able to mix and match the SQL Statement Generator with the Map functionality, allowing you to only shuffle the columns you are interested in.

I hope this helps.

Ben
Back to top
View user's profile Send private message
jay23



Joined: 29 Jul 2008
Posts: 5

PostPosted: Thu Jul 31, 2008 5:07 pm    Post subject: Re: Reply with quote

benhall wrote:
Hello,

I recommend you to use the SQL Statement generator as this will shuffle the data for you. You should be able to mix and match the SQL Statement Generator with the Map functionality, allowing you to only shuffle the columns you are interested in.

I hope this helps.

Ben


Ben,

Right now on both columns i am populating values usng SQL Statment Generator...how ever I cant find the MAP function .

It looks like we can refer to the table which we are trying to populate on a WHERE clause. So in what order is the data is generated. If I want 1000 records....do you go row by row or first fill the first column and then go to the second column

jay
_________________
Jay Janarthanan
Back to top
View user's profile Send private message
benhall



Joined: 14 Dec 2007
Posts: 98

PostPosted: Thu Jul 31, 2008 8:46 pm    Post subject: Reply with quote

With the SQL Statement generator, by default we shuffle the data, by unticking shuffle data the data will be inserted in the same order it appears in the database.

Hope this helps.

Ben
Back to top
View user's profile Send private message
jay23



Joined: 29 Jul 2008
Posts: 5

PostPosted: Thu Jul 31, 2008 8:50 pm    Post subject: Re: Reply with quote

benhall wrote:
With the SQL Statement generator, by default we shuffle the data, by unticking shuffle data the data will be inserted in the same order it appears in the database.

Hope this helps.

Ben


Ben

Here is what I am trying to do.

Lets say the first column on the generated table is First Name and this is read from another table. The second field on the generated table is last name, for this I need to make sure the data I generate match the first column.

I tried to do some thing like this but it did not work

Select OrginalTable.SecondCol
From OrginalTable,GeneratedTable
where GeneratedTable.FirstCol = OrginalTable.First Col.
_________________
Jay Janarthanan
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group