Remember how I said Data Merge always duplicates objects.Each reach in your database or spreadsheet gets a newobject or a new set of objects on the page.So, that means you cannot Data Merge to fill inrows and columns of a table because a table isall inside a single text frame or inside a singlestory flowing from one thread of text frame to another.But, and there always.
Published by3 years agó
Working with: data merge into a one flowing text body?
Hello all,
I'meters banging my mind with a issue that I'm hoping someone might have got an reply or at least can stage me in the right direction.
So here's the offer:
- l'meters wanting to making use of data merge, nested styles, grep, étc.
- substance into word
I'm functioning with a large excel sheet with several columns, let's state they symbolize: title, title, description.
I Need to convert this spreadsheet into a flowing document where each line of the first spreadsheet has reserved styles in the indesign record (ie. big name, title title, different colour description)
l put on't would like to personally click on the content material and apply styles. I also don't possess the tolerance for making use of shortcuts either.
I'michael aware I can arranged items up via dáta merge, but thát indicates I'll finish up with multiple records living across webpages / text message frames.Will be there a way to use data merge (or something similar) to weight the entire spread bed sheet into a one text framework?
Preferably, I'm looking to have subsequent records adhere to this design in one moving text framework:
lt;lt;line one: namegt;gt; line break
lt;lt;column two: titlegt;gt; paragraph return
lt;lt;explanation: descriptiongt;gt; paragraph return
I've furthermore tried dealing with this problem through excel and term, but those options was unable to varying degrees. Now there, I believed I couId:
grab the tabled data
But l stopped right now there because I failed to discover a way to designate different types of mobile separators per line. You just get the selection to choose one across the entire record: either comma, tab, etc.
Offers anyone actually tried tackling this? I would including to presume this will be a regular operation that I just haven't tried yet. Assist?
Thanks a lot!
édit: fórmatting
Launch
This saved procedure generates a MERGE statement for a provided desk. The created MERGE utilizes a multi-row Ideals clause formulated with all the supply table data, complementing present data in the focus on (ie. destination desk) by like table-join logic based on main key info in the program directory.
It had been adapted for SQL Server 2008 from Vyas' Place generation proc, originally composed for SQL Server 2000 (see acknowledgements below).
How Will it Function?
The generated MERGE declaration populates the target table to complement the supply data. This contains the elimination of any surplus rows that are usually not present in the source.
When the generated MERGE declaration is carried out, the subsequent logic can be applied structured on whether a complement is discovered:
- If the source row will not can be found in the target table, an Put is carried out
- If a given line in the focus on table will not can be found in the supply, a DELETE is usually performed
- If the source row already exists in the target table and provides changed, an Upgrade is performed
- If the resource row currently is present in the target table but the data has not changed, no activity is performed (configurable)
![Indesign data merge images Indesign data merge images](http://i43.tinypic.com/9916vc.jpg)
Use Cases
- Generate statements for stationary data dining tables, shop the.SQL document in supply control/add it to a Visual Studio Database Task and make use of it as part of your Dev/Test/Prod deployments. The generated claims are re-runnable, so you can create modifications to the file and effortlessly migrate those modifications between conditions.
- Generate claims from your Production furniture and after that operate those statements in your Dev/Test environments. Routine this as component of a SQL Job to keep all of your conditions in-sync.
- Enter test data into your Dev environment, and after that generate statements from the Dev tables so that you can continually recreate your check database with legitimate test data.
Acknowledgements
This method was adapted from 'spgenerateinserts', composed by Narayana Vyas Kondreddi (http://vyaskn.tripod.com). I produced a quantity of efforts to obtain in touch with Vyas but unfortunately have not been able to reach him. No copyright violation is intended and I will of training course regard his wishes if asks for this to end up being removed.
I would furthermore like to recognize:
- Expenses Graziano - Blog site blog post that supplied the research for MERGE declaration era
- Bill Gibson - Blog page write-up that detailed the stationary data table use case; the motivation for this proc
Set up
Just run the script below, which will install it in expert database as a system treatment (producing it executable within consumer databases).
Limitations
This procedure has explicit assistance for the right after datatypes: (small)datetime(2), (in)varchar, (n)text, (n)char, int, float, genuine, (small)money, timestamp, rowversion, uniqueidentifier and (var)binary. All others are implicitly transformed to their CHAR representations so YMMV depending on the datatype. In addition, this method has not really been thoroughly examined with UNICODE datatypes.
The Image datatype is certainly not supported and an mistake will be thrown if these are not excluded making use of the @colstoexclude parameter.
If anyone would including to lead towards enhancing datatype assistance it would be great to listen to from you.
Usage
- Ensure that your SQL customer is configured to send outcomes to text message, rather than grid. This can be set up in SQL Administration Facilities by selecting Query. Results To. Results To Text message (CTRL-T).
- Execute the proc, giving the supply table title as a parameter, y.g. Professional Northwind.dbo.spgeneratemerge 'Region'
- After calling the proc, duplicate the outcomes (including the generated SQL) and paste into a fresh query window to carry out.
Good examples
To produce a MERGE statement filled with all data within the AdventureWorks.Individual.AddressType desk, excluding the ModifiedDate and rowguid columns:
Generated SQL:
To produce a MERGE statement for desk Northwind.dbo.Area that will unconditionally UPDATE matching rows (web browser. not execute a 'provides data changed?' check prior to going forward with an Upgrade):
Generated SQL:
Additional examples are integrated in the header of the proc.
-