Export CA data specific to a particular site

Hi All,
  Can someone help me with ideas on how to export a specific site assets from one environment to other. Situation is that we have a multisite environment in development/QA and want to move the new site and its assets to production. Any light on this situation will be of great help.
Thanks,
Mathew.

Quoting from ATG Docs:
Exporting all repositories
To export the data from all SQL repositories registered in the /atg/registry/ContentRepositories component, use the following syntax:
bin/startSQLRepository -m module -exportRepositories all output-file
The location of the resulting file is relative to the <ATG10dir>/home directory.
Refer http://docs.oracle.com/cd/E24152_01/Platform.10-1/ATGRepositoryGuide/html/s1207exportingrepositorydata01.html
For detailed usage: http://world-of-atg.blogspot.in/2012/07/using-startsqlrepository-beginners-iv.html
Regards,
Nitin.

Similar Messages

  • Very specific AE problem, particular site won't load!

    Please bear with me, this isn't another dummy post. I can't access a single website - www.gallatinriverhideaway.com - in ANY web browser on my mac. (I've tried Safari 5, Firefox, NetNewsWire) I know the site is functional because I can access it on other ISPs and other computers. Here's the weird clincher: I run my internet through an Airport Express. If I unplug the airport express and plug the ethernet directly into my computer, it works!
    All avenues I know of exhausted:
    - different browsers
    - disabled firewall, popup blocking, etc.
    - emptied Safari cache
    - reset safari
    Any ideas?

    This problem was solved over in the Safari forum:
    http://discussions.apple.com/message.jspa?messageID=12139075#12139075

  • When I tried to Mail Merge for Data is is not exporting any data.

    HI,
    EBS-12.1.3
    DB-11gR1
    OS - RHEL 5.6
    [With my Login User and SysAdmin Login User] When I enter into to the "People -> Enter and Maintain" Form and then I press the "Export Button", there is error Alert
    Function is not available to this responsibility. Change Responsibilities or Connect to the System Administrator
    I Added the Function "HR ADI Seeded Integrator Form Functions" into the "AE HRMS Manager" Responsiblity. It is also working and Export Data icon is enable.
    Problem:
    But Problem is when I tried to Mail Merge for Data is is not exporting any data.
    ====================================================================
    Steps
    1.Move to the "People -> Recruirment" and then "Request Recruitment Letter" .
    2. Enter the New Request. as
    Letter Name "App. Letter Contract Site",
    Automatic or Manual = Manual.
    Select the Name from the LOVs for the Request for Detail Block.
    3. Press the "Export Data" icon.
    4. Integrator Page Appear with my Custom Integrator Name as "Appointment Letter - Contact Site".
    5. Select the "Word 2003" from the View List. and Reporting is Checked.
    6. Review the Folowing Enteries as:
    Integrator Appointment Letter - Contact Site
    Viewer Word 2003
    Reporting Yes
    Layout App. Letter Contract Site
    Content XXHR_MBE_APP_LET_CONT_SITE_V
    Session Date 2011/08/02
    Mapping XXHR_MBE_APP_LET_CONT_SITE_V Mapping
    7. Press "Create Document" Button.
    8. It will open the Excel 2003 and then Word 2003. But no data down download from the Form.
    9. It open the Mail Merge Letter but no Data is Display.
    ===========================================================
    Note:
    a. I am following the Steps from the Link:"http://apps2fusion.com/at/38-ss/351-generate-recruitment-letters-web-adi".
    b. From the "Desktop Integrator Manager", "Oracle Web ADI", "HRMS Web ADI", it is working fine and Dowload the Data.
    ===========================================================
    Thanks
    Vishwa

    Please try the solution in ("Function not available to this responsibility" Error While Cliclking On Forms Personalisation [ID 1263970.1]) and see if it helps.
    Thanks,
    Hussein

  • Error "Encountered an error while exporting the data. View the lof file (DPR-10126)

    Hello,
    I would like to have sugestions and help to solve a problem in IS 4.2.
    I've created a view from two tables, joined together with the key from each one.
    Then i've binded the rule with the view (mentioned above) created and calculated score for it.
    The calculation is successful, however when i try to export all failed data i have the following error:
    "Encountered an error while exporting the data. View the lof file (DPR-10126)"
    When exporting failed data from calculations made directly to the datasources i do not encounter any problem, but when i try to export all data to CSV file (not only the 500 results limit) i have this kind of error.
    However, when i visualize the data from the view created, it is also possible to export to csv file.
    Resuming, the error occurs only when exporting all failed data from the view.
    Can anyone help with this issue?
    Thx
    Best Regards,

    Hello,
    Your information is correct.
    I've just confirmed it in the 4.2 SP3 Release Notes and they specifically refer to this issue.
    A user who has 'View objects' rights for the project and a failed rule connection cannot export the failed data. This issue has been fixed in this release.
    Thank you very much for your input.
    Best Regards,

  • How to export the data from Mainframe to Oracle? Except Powermart

    Hi,
    I am exporting a data from Mainframe(VSAM) to Oracle 10g using PowerMart.Is there any other chance to exporting data from Mainframe to Oracle10g except Power Mart?
    Please help me out.

    nihar,
    This is the wrong forum for posting this kind of question. This forum is specific to Oracle Forms development. You should post your question in one of the Database Related forums.
    Craig...

  • Export BLOB data to a Word Document.

    Dear All,
    I am facing a problem during reading a blob data to a word file. My procedure work fine fine. But when I am about to open the Word Document. It gives me a message that "the document name or path is not valid. 1. Check the file permission for the document or drive. 2. Use the file open dialog box to locate the document."
    I am using 9i for this.
    Best Regards
    Umer Minhas

    Basically this happens when I write the blob data in Word File.
    I investigate this problem on MS sites and come to know that it was basically "328100 - WD2002: The Document Name or Path Is Not Valid".
    But after installation of hotfix, I again saw the same message. But when I use the utility of TOAD to export the data. It done all very well. This what basically estonished me.
    Best Regards
    Umer Minhas.

  • Maxl Import - Export L0 data crashes

    Hi to all,We have an automation Maxl script, for a mission critical application where we export 6 times a day all L0 data, then import them back again, .It has been running for sometime smoothly, but suddenly it startet to crash, meaning it doesnt export the data or import it back in.We write on a file specific directory other than app\db (we tried this one but didnt work).We use MS W2000 server Essbase 6.5.We heard from Hyp that maybe there is a bug on v6.5Does anyone had similar problems?Thanksyannis

    The SQL run via the load rule understands my subvars.  The load rule SQL looks like this:
    select...
    WHERE
      AND (('1' = '&IncSpanYr' --IF THE PERIODS SPAN YEARS
      AND (('12' = '&CurMoNm' --IN JUNE LOOK INTO NEXT YEAR PERIOD 1
      AND ((A.FISCAL_YEAR = '&CurYrNm' AND A.ACCOUNTING_PERIOD IN ('&PriMoNm', '&CurMoNm'))
    This turns into:
    WHERE
      AND (('1' = '1' --IF THE PERIODS SPAN YEARS
      AND (('12' = '12' --IN JUNE LOOK INTO NEXT YEAR PERIOD 1
      AND ((A.FISCAL_YEAR = '2014' AND A.ACCOUNTING_PERIOD IN ('2', '3'))
    My issue is getting a dump of all that data that the SQL is pulling.  I don't see a way to do that in the import database command.  A separate job on the SQL side (like SSIS) could pull the data, but can't access the subvars easily.  Does that make sense?  Or did I misunderstand your suggestion?
    Thanks-
    Cameron

  • Exporting CLOB data w/Oracle 8i

    Is there a way to export CLOB data from a table to an external
    file in a directory of our choice??? Our application
    specification is asking us to build this capability but I am
    unable to find any way to do this. Any assistance would be
    useful. Thanks a million!!
    null

    OCI really seems like the right way to do this. You know you have to use something like C to interact with the port. And the only Oracle stuff you are doing is an insert. You could even write the insert in a stored proc and call it from OCI. Below is an example of that. You should really give OCI a shot at this. I'm certain you can learn enough of it for this project.
    http://download-east.oracle.com/docs/cd/B10501_01/appdev.920/a96584/oci05bnd.htm#433702
    Tom Best

  • Export table data from production to quality system - Oracle 10.2

    Hi,
    I am trying to export a few table's data from our production system to the quality system.
    Reason: To synchronize the table data between Production and Quality system
    System info: SAP ECC 6.0 on Oracle 10.2 ; OS: Solaris
    Description:
    There are few standard SAP tables which hold the data of the various institutions of our client. Our requirement is to export the master data relevant for a particular institution from the production system to the quality system. We intend to use the Oracle Export and Import utility (Suggestions on the usage of which tool are welcome).
    Constraints:
    Lets say, there is a table NXXX in production system. This table contains the data for the institutions AA, BB, CC. I intend to export the data relevant to the institution AA from the table NXXX and import the data to the table NXXX in the Quality system.
    Now I understand that the schema of these tables are different. In the production system, the schema would be SAP<Prod SID>.NXXX and in the quality system, the schema is SAP<Qas SID>.NXXX. I need your suggestions to overcome this constraint.
    Regards,

    Hi,
    I do not think you can just export data in your scenario using the oracle imp/exp tool it's all or nothing...
    as for the scema naming between QA/PROD you just need to use :
    imp <dump file> fromuser=<PROD schema>  touser=<QA schema>  only thing you have to look out for is the mandt as it will not change.
    I had something similar recently where I had to copy 14+ million rows from Prod to a Dev client without impacting on other clients data for this table in Dev.
    So for data consistancy 
    1) I restored a copy of prod on a new LPAR and exported the table.
    2) Created a dummy prod client using client '000' as a base.
    3) imported the table  using the syntax above enabling the change of schema
    We have now a 14 + million rows in the dummy prod client on the new LPAR
    Now on the Dev server
    4) Created new client on dev as per point 2
    5) SCC9 Remote client copy from the new LPAR using SAP_ALL
    6) As I had 9+ million rows in the target client to get rid of I used delete_commit procedure as in metalink note 3777.1
        This enable  me to delete rows fast without caning the roll back segs.
    7) using R3trans and a command file from the command line copied the single table into the target client.
    I do not know if this is useful for you because your scenario is slighley different, but this is what I did for a whole table for a particular mandt.
    Regards
    Mark
    Edited by: Mark Norman on Oct 22, 2009 11:16 AM
    Edited by: Mark Norman on Oct 22, 2009 11:17 AM

  • Export As Data Feed

    Hello,
    I am trying to find a way to add the export as data feed button to my SharePoint list - connection (subcategory).  From my research this is normally done with procedures using "SharePoint Central Administration".  However, I am using
    the Office 365 Trial of E3.
    I want this feature so that I can start to sync feeds to Pivot Point and get a sample dash going.
    Any advice?
    Thanks in advance,
    Kent

    Hi Kent,
    Office  365 Enterprise 3 have PowerPiovt feature, if you activate the PowerPiovt feature, ‘Export as Data Feed’ will be available.
    I am not a SharePoint Online expert, and in general, you can activate the feature in Site Collection Administration.
     1.Open your site
     2.Click Settings on the top-right of the page, and click Site settings
     3.Click Site collection feature under Site Collection Administration
     4.Scroll  to PowerPiovt feature, and check if the status is Active. If not, Activate it.
    If you use Excel 2013 client to read data feed, I recommend you use Power Query to read the data, or more easily, you can use excel to read the data directly.
    Here is an article for you to take a look at :
    http://office.microsoft.com/client/15/serverhelp/preview?AssetId=HA104103589&lcid=1033&products=WSSENDUSER&CTT=5&origin=HA102835634
    I hope this helps.
    Thanks,
    Wendy
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • VBA Project Export Resource data vith TimeScaleData ON FILTERED TASK

    Hello,
    I have been using the common code you can find at the following website to export resources data using the TimeScaleData function :
    http://zo-d.com/blog/archives/programming/analyze-microsoft-project-resource-usage-data-in-excel.html
    It works fine. Now, I need to do the same export but at the same time, I need to filter some tasks by a specific value in the Text1 column for example. Thus, I would like to extract the resources data, not on the all tasks, but only on filtered tasks.
    How is it possible ?
    I tried to setup a filter by VBA, but the filter is not take in account. The TimeScaleData retrieved the value of the all tasks and not only of the filtered tasks.
    FilterEdit Name:="Filtre 3", TaskFilter:=True, Create:=True, OverwriteExisting:=True, FieldName:="Texte1", Test:="Égal à", Value:="TITI", ShowInMenu:=True, ShowSummaryTasks:=False
    FilterApply Name:="Filtre 3"
    Can you help me ?
    So sorry for bad English.
    Thank you.
    Emmanuel

    Emmanuel,
    Jack's macro loops through all the resources but your filter is a task filter, so even though you may see the filtered Gantt Chart view, the macro still exports all resource data. What exactly do you want to do?
    John

  • Export Topology Data with an API

    I want to export Topology Data stored in Oracle to GML 3 or another specific data format.
    I want to do this with an API? Is this possible and does it make sence to do this with an API? Is there an other way to do this? (The export2gml fuction in Oracle 10g does not provide an export von topoloy elements)

    You could certainly use export2gml to export the nodes and edges from the topology model (via their respective tables). Once you have the GML representations of these just about any other topology model that can read GML should know what to do with these. What exactly are you looking for that you are not finding?
    -Justin

  • Powershell script for removing some users from a particular Site Collection

    Hi,
    I am looking for a PowerShell script to delete a few users from a particular Site Collection. I am unable to delete them from/_catalogs/Users/simple.aspx page therefore need some other medium to
    delete users from the site collection.
    My ultimate aim is to have no user profile with "tp_deleted" field's value as 0 in the USERINFO table. Currently there are about 40 odd users with this field's value as 0 and this is affecting my crawling of this content database.

    Thanks for the reply Alex & eHaze,
    I have a content source of root site which crawls all the site collections under it. Out of the 9 site collections, only 8 are getting crawled and 1 doesn't get crawled at all. The error in the crawl logs is 
    The SharePoint item being crawled returned an error when requesting data from the web service. ( Error from SharePoint site: Value does not fall within the expected range. )
    I tried a lot of things, searched over the net and finally found
    this which helped me solve the same issue in my development environment. I deleted these users from userInfo table and ran a full crawl. And the issue was fixed.
    Now since I cannot delete the users from userInfo table directly from PROD environment, I used .../_catalogs/Users/simple.aspx list
    to delete users from this site collection. While some of the users I could delete, quite a few I could not. Clicking on the profile redirected me to the home page rather than the info page of the profile. 
    This
    is why I have to delete these users from the site collection.
    Alex - the link you shared, I guess it is for a web application level.
    eHaze - the script you shared throws this error:
    Get-SPSite : Cannot find an SPSite object with Id or Url: http://dev-apps/divisions/BT. At C:\PowerShell Scripts\DeleteUserFromSiteCollection1.ps1:4 char:19
    + $site = get-spsite <<<< $siteURL
    + CategoryInfo : InvalidData: (Microsoft.Share...SPCmdletGetSite:
    SPCmdletGetSite) [Get-SPSite], SPCmdletPipeBindException
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletGetSite
    You cannot call a method on a null-valued expression.
    At C:\PowerShell Scripts\DeleteUserFromSiteCollection1.ps1:9 char:27
    + $site.SiteUsers.Remove <<<< ($LoginName)
    + CategoryInfo : InvalidOperation: (Remove:String) [], RuntimeExc
    eption
    + FullyQualifiedErrorId : InvokeMethodOnNull
    hope this info helps.

  • How can I export the data that consultant have configured?

    I have installed the same systems at two server machine. The consultant have configured something in one server and the developers have developed some projects at the same server, after that, I want to export the data that the consultants configured without the developed projects and import it to another server. How?

    Certain objects can be put into an application designer project, and then exported to file or migrated to another environment. Examples include process scheduler server definitions, integration broken setup, security, and trees. Basically anything you can add through application designer using the Insert > Definitions into Project list. This is the better way but doesn't work for everything.
    Do you know specifically what was configured and what you need to export? There's a DMS script that lives under PS_HOME/script called mvprdexp.dms that lists the core PeopleTools tables, which might be useful if you do have write your own DMS.

  • Exporting table data into text files

    I got a request to export the data from about 85 tables into 85 text files. I assume that they will want a header row and some delimiter character. This is a process that must run every night by a sql job.
    Obviously I want it to be flexible. Tables could be addede and removed and columns could be added and removed. There will probably be a control table that has the list of tables to export.
    Looked at bcp - but seems that it is command line only?
    SSIS package?
    What other options are there?

    Wanted to post my solution. Ended up using bcp in a PowerShell Script. I was unable to use bcp in SQL because it requires xp_cmdshell and that is not allowed at many of our client sites. So wrote a Powershell script that executes bcp. The ps script
    loops through a table that contains a row for each table/view to export along with many values and switches for the table/view export: export path, include column headers, enclose each field in double quotes, double up embedded double quotes, how to format
    dates, what to return for NULL integers - basically the stuff that is not flexible in bcp. To get this flexibility I created a SQL proc that takes these values as input and creates a view. Then the PS bcp does a SELECT on the view. Many of my tables are
    very wide and bcp has a limit of 4000/8000. Some of my SELECT statements ended up being GT 35k in length. So using a view got around this size limitation.
    Anyway, the view creation and bcp download is really fast. It can download about 4 gb of data in 20 minutes. It can download it faster the 7z can zip it.
    Below is the SQL proc to format the SELECT statement to create the view for bcp (or some other utility like SQLCMD, Invoke-SQLCMD) or SQL query by "SELECT * from v_ExportData". the proc can be used from SQL or PS, or anything that can call a SQL
    Proc and then read a SQL view.
    IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ExportTablesCreateView]') AND type in (N'P', N'PC'))
    DROP PROCEDURE [dbo].[ExportTablesCreateView]
    GO
    CREATE PROCEDURE [dbo].[ExportTablesCreateView]
    ExportTablesCreateView
    Description:
    Read in a tablename or viewname with parameters and create a view v_ExportTable of the
    data. The view will typically be read by bcp to download SQL table data to flat files.
    bcp does not have the options to include column headers, include fields in double quotes,
    format dates or use '0' for integer NULLS. Also, bcp has a limit of varhar 4000 and
    wider tables could not be directly called by bcp. So create the v_ExportTable and have
    bcp SELECT v_ExportTable instead of the original table or view.
    Parameters:
    @pTableName VARCHAR(128) - table or view to create v_ExportTable from
    @pColumnHeader INT =1 - include column headers in the first row
    @pDoubleQuoteFields INT = 1 - put double quotes " around all column values including column headers
    @pDouble_EmbeddedDoubleQuotes INT = 1 - This is usually used with @pDoubleQuoteFields INT = 1. 'ab"c"d would be 'ab""c""d.
    @pNumNULLValue VARCHAR(1) = '0' - NULL number data types will export this value instead of bcp default of ''
    @pDateTimeFormat INT = 121 - DateTime data types will use this format value
    Example:
    EXEC ExportTablesCreateView 'custname', 1, 1, 1, '0', 121
    @pTableName VARCHAR(128),
    @pColumnHeader INT = 1,
    @pDoubleQuoteFields INT = 1,
    @pDouble_EmbeddedDoubleQuotes INT = 1,
    @pNumNULLValue VARCHAR(1) = '0',
    @pDateTimeFormat INT = 121
    AS
    BEGIN
    DECLARE @columnname varchar(128)
    DECLARE @columnsize int
    DECLARE @data_type varchar(128)
    DECLARE @HeaderRow nvarchar(max)
    DECLARE @ColumnSelect nvarchar(max)
    DECLARE @SQLSelect nvarchar(max)
    DECLARE @SQLCommand nvarchar(max)
    DECLARE @ReturnCode INT
    DECLARE @Note VARCHAR(500)
    DECLARE db_cursor CURSOR FOR
    SELECT COLUMN_NAME, ISNULL(Character_maximum_length,0), Data_type
    FROM [INFORMATION_SCHEMA].[COLUMNS]
    WHERE TABLE_NAME = @pTableName AND TABLE_SCHEMA='dbo'
    OPEN db_cursor
    FETCH NEXT FROM db_cursor INTO @ColumnName, @ColumnSize, @Data_type
    SET @HeaderRow = ''
    SET @ColumnSelect = ''
    -- Loop through each of the @pTableColumns to build the SELECT Statement
    WHILE @@FETCH_STATUS = 0
    BEGIN
    BEGIN TRY
    -- Put double quotes around each field - example "MARIA","SHARAPOVA"
    IF @pDoubleQuoteFields = 1
    BEGIN
    -- Include column headers in the first row - example "FirstName","LastName"
    IF @pColumnHeader = 1
    SET @HeaderRow = @HeaderRow + '''"' + @ColumnName + '"'' as ''' + @columnname + ''','
    -- Unsupported Export data type returns "" - example "",
    IF @Data_Type in ('image', 'varbinary', 'binary', 'timestamp', 'cursor', 'hierarchyid', 'sql_variant', 'xml', 'table', 'spatial Types')
    SET @ColumnSelect = @ColumnSelect + '''""'' as [' + @ColumnName + '],'
    -- Format DateTime data types according to input parameter
    ELSE IF @Data_Type in ('datetime', 'smalldatetime', 'datetime2', 'date', 'datetimeoffset')
    -- example - CASE when [aaa] IS NULL THEN '""' ELSE QUOTENAME(CONVERT(VARCHAR,[aaa], 121), CHAR(34)) END AS [aaa],
    SET @ColumnSelect = @ColumnSelect + 'CASE WHEN [' + @columnname + '] IS NULL THEN ''""'' ELSE QUOTENAME(CONVERT(VARCHAR,[' + @columnname + '],' + CONVERT(VARCHAR,@pDateTimeFormat) + '), CHAR(34)) END AS [' + @ColumnName + '],'
    -- SET Numeric data types with NULL value according to input parameter
    ELSE IF @Data_Type in ('bigint', 'numeric', 'bit', 'smallint', 'decimal', 'smallmoney', 'int', 'tinyint', 'money', 'float', 'real')
    -- example - CASE when [aaa] IS NULL THEN '"0"' ELSE QUOTENAME([aaa], CHAR(34)) END AS [aaa],
    SET @ColumnSelect = @ColumnSelect + 'CASE WHEN [' + @columnname + '] IS NULL THEN ''"' + @pNumNULLValue + '"'' ELSE QUOTENAME([' + @columnname + '], CHAR(34)) END AS [' + @ColumnName + '],'
    ELSE
    -- Double embedded double quotes - example "abc"d"ed" to "abc""d""ed". Only applicible for character data types.
    IF @pDouble_EmbeddedDoubleQuotes = 1
    BEGIN
    -- example - CASE when [aaa] IS NULL THEN '""' ELSE '"' + REPLACE([aaa],'"','""') + '"' END AS [aaa],
    SET @ColumnSelect = @ColumnSelect + 'CASE WHEN [' + @ColumnName + '] IS NULL THEN ''""'' ELSE ''"'' + REPLACE([' + @ColumnName + '],''"'',''""'') + ''"'' END AS [' + @ColumnName + '],'
    END
    -- DO NOT PUT Double embedded double quotes - example "abc"d"ed" unchanged to "abc"d"ed"
    ELSE
    BEGIN
    -- example - CASE when [aaa] IS NULL THEN '""' ELSE '"' + [aaa] + '"' END AS [aaa],
    SET @ColumnSelect = @ColumnSelect + 'CASE WHEN [' + @ColumnName + '] IS NULL THEN ''""'' ELSE ''"'' + [' + @ColumnName + '] + ''"'' END AS [' + @ColumnName + '],'
    END
    END
    -- DO NOT PUT double quotes around each field - example MARIA,SHARAPOVA
    ELSE
    BEGIN
    -- Include column headers in the first row - example "FirstName","LastName"
    IF @pColumnHeader = 1
    SET @HeaderRow = @HeaderRow + '''' + @ColumnName + ''' as ''' + @columnname + ''','
    -- Unsupported Export data type returns '' - example '',
    IF @Data_Type in ('image', 'varbinary', 'binary', 'timestamp', 'cursor', 'hierarchyid', 'sql_variant', 'xml', 'table', 'spatial Types')
    SET @ColumnSelect = @ColumnSelect + ''''' as [' + @ColumnName + '],'
    -- Format DateTime data types according to input parameter
    ELSE IF @Data_Type in ('datetime', 'smalldatetime', 'datetime2','date', 'datetimeoffset')
    -- example - CASE when [aaa] IS NULL THEN '''' ELSE CONVERT(VARCHAR,[aaa], 121) END AS [aaa],
    SET @ColumnSelect = @ColumnSelect + 'CASE WHEN [' + @columnname + '] IS NULL THEN '''' ELSE CONVERT(VARCHAR,[' + @columnname + '],' + CONVERT(VARCHAR,@pDateTimeFormat) + ') END AS [' + @ColumnName + '],'
    -- SET Numeric data types with NULL value according to input parameter
    ELSE IF @Data_Type in ('bigint', 'numeric', 'bit', 'smallint', 'decimal', 'smallmoney', 'int', 'tinyint', 'money', 'float', 'real')
    -- example - CASE when [aaa] IS NULL THEN '"0"' ELSE CONVERT(VARCHAR, [aaa]) END AS [aaa],
    SET @ColumnSelect = @ColumnSelect + 'CASE WHEN [' + @columnname + '] IS NULL THEN ''' + @pNumNULLValue + ''' ELSE CONVERT(VARCHAR,[' + @columnname + ']) END AS [' + @ColumnName + '],'
    ELSE
    BEGIN
    -- Double embedded double quotes - example "abc"d"ed" to "abc""d""ed". Only applicible for character data types.
    IF @pDouble_EmbeddedDoubleQuotes = 1
    -- example - CASE when [aaa] IS NULL THEN '' ELSE CONVERT(VARCHAR,REPLACE([aaa],'"','""')) END AS [aaa],
    SET @ColumnSelect = @ColumnSelect + 'CASE WHEN [' + @columnname + '] IS NULL THEN '''' ELSE CONVERT(VARCHAR,REPLACE([' + @columnname + '],''"'',''""'')) END AS [' + @ColumnName + '],'
    ELSE
    -- example - CASE when [aaa] IS NULL THEN '' ELSE CONVERT(VARCHAR,[aaa]) END AS [aaa],
    SET @ColumnSelect = @ColumnSelect + 'CASE WHEN [' + @columnname + '] IS NULL THEN '''' ELSE CONVERT(VARCHAR,[' + @columnname + ']) END AS [' + @ColumnName + '],'
    END
    END
    FETCH NEXT FROM db_cursor INTO @ColumnName, @ColumnSize, @Data_Type
    END TRY
    BEGIN CATCH
    RETURN (1)
    END CATCH
    END
    CLOSE db_cursor
    DEALLOCATE db_cursor
    BEGIN TRY
    -- remove last comma
    IF @pColumnHeader = 1
    SET @HeaderRow = SUBSTRING(@HeaderRow , 1, LEN(@HeaderRow ) - 1)
    SET @ColumnSelect = SUBSTRING(@ColumnSelect, 1, LEN(@ColumnSelect) - 1)
    -- Put on the finishing touches on the SELECT
    IF @pColumnHeader = 1
    SET @SQLSelect = 'SELECT ' + @HeaderRow + ' UNION ALL ' +
    'SELECT ' + @ColumnSelect + ' FROM [' + @pTableName + ']'
    ELSE
    SET @SQLSelect = 'SELECT ' + @ColumnSelect + ' FROM [' + @pTableName + ']'
    ---- diagnostics
    ---- PRINT truncates at 4k or 8k, not sure, my tables have many colummns
    --PRINT @SQLSelect
    --DECLARE @END varchar(max) = RIGHT(@SQLSelect, 3000)
    --PRINT @end
    --EXECUTE sp_executesql @SQLSelect
    -- drop view if exists -- using view because some tables are very wide. one of my tables had a 33k select statement
    SET @SQLCommand = '
    IF EXISTS (SELECT * FROM SYS.views WHERE name = ''v_ExportTable'')
    BEGIN
    DROP VIEW v_ExportTable
    END'
    EXECUTE @ReturnCode = sp_executesql @SQLCommand
    IF @returncode = 1
    BEGIN
    RETURN (1)
    END
    -- create the view
    SET @SQLCommand = '
    CREATE VIEW v_ExportTable AS ' + @SQLSelect
    -- diagnostics
    --print @sqlcommand
    EXECUTE @ReturnCode = sp_executesql @SQLCommand
    IF @returncode = 1
    BEGIN
    RETURN (1)
    END
    END TRY
    BEGIN CATCH
    RETURN (1)
    END CATCH
    RETURN (0)
    END -- CREATE PROCEDURE [dbo].[ExportTablesCreateView]
    GO

Maybe you are looking for

  • Function module to convert value to caps ie capital

    hi please let me knwo function module to convert small lettter to upper case lettter regards arora

  • New user need help stopping a stuck/ running program

    I was trying to read/ edit a .pdf file when it became stuck. I cant close it. There is a spinning color wheel that continues to spin. the computer works fine otherwise but I have no idea how to perform the Mac version of the PC's "CNTL-ALT-DLT". Does

  • Broken ipad 3 screen

    I got an ipad 3 for my birthday from my parents 11 days ago and today whilst revising my phone slipped out my hand hitting the screen and causing it to crack underneath (pressure crack or whatever you call it) im absolutely distraught as the phone wa

  • Report /sapapo/cdps_rept  does not considers the capacity ustilisation

    Hello Experts The sap standard report /sapapo/cdps_rept  is not considering the capacity utilisation from the process orders. Any master data missing ? Regards Deven

  • Jerky Graphics with "triangles"

    Just recently, I began to see triangles appear on my screen when using my laptop (ATI Radeon Mobility 9700 card). These triangles stretch the images on the screen and only disappear when I scroll up and down a few times, or highlight the area with th