remove data before and after a special characters in SSRS - reporting-services

In SSTS I want to remove data before "\" and after "\". Please see the image here. We want to do it from SSRS not from SQL SP. Is it possible.

This link can be a good start - converting RTF to TXT

Related

ADF: Is it possible to gracefully handle issues with a csv to Azure SQL import?

I have a comma separated csv file with double quotes as text identifier. Sometimes the source system export is incorrect, e.g.:
A text field includes a double quote causing ADF to think there is one extra column and fail
A text field includes the escape character causing ADF to concatenate 2 columns and failing with the error that there is one column less than expected.
The source system vendor is unable to fix this, so these errors will happen every now and then. Is it possible for ADF to just save the whole row into an logfile/logtable and just skip this line?
I am aware of this question, but I can't change the escape character in this case.
Thanks in advance for your answer!
Johan
In ADF, if you are using the Copy Activity, you will use the Fault Tolerance and Enable Logging features to achieve this. When transforming data with a data flow, you will use the "Error row handling" feature to achieve it.

SQL Server Export Unicode & Import via SSIS

(SQL Server 2008)
So here's my task ..
I need to export query results to file, and then import that file using SSIS to another DB.
Specific to the task, the data contains every awkward unicode character you can think of, so delimiting with commas, pipes etc is out of the question.
Here are the options SSMS gives me for export format:
Column Aligned
Comma/Tab/Space delimited
Custom delimiter
And here are the options SSIS gives me for a flat file data source:
Delimited (custom)
Fixed Width
Ragged Right
So given that a delimiter character is out of the question ... I cannot see another method that both SSMS & SSIS agree on.
Such as fixed width ?
Seems strange that the 2 closely related MS products have such different options.
Or have I missed something here ?
Any advice appreciated !!
It seems you need to try out different combination of options while creating delimited flat file(for your exported query result).
Try setting Code page to UTF-8 with and without Unicode. Also use Text qualifier as " or any of your choice which you thought might work. Also try using different option for column delimiter.
Once you are able to create delimited file then you have to apply same setting on file while importing to another DB.

How to handle upside down question mark in ssis

I am trying to import table from Oracle db to sql server 2008 through SSIS. I am getting upside down special character in one columns. Please let me know if we could handle with variable or data conversion tool.
Within the derived column transformation you can utilize the Replace Function in an expression to remove this character with a "" (0 value blank). You may need to use a text editor like notepad ++ with the "Show All Characters" option turned on to see the offending character so that you can place this in your SSIS expression.

Wrong number of values when importing csv in Weka

I want to open a csv file (saved from openoffice calc) in weka.
I keep getting an error: "wrong number of values. 140 read, 139 expected on line 3."
The csv was already fixed with quotes around the labels. And I count 140 values on the first lines.
What is wrong here?
Link to the file.
Turns out there was an value somewhere for beyond sight in the excel file I was exporting.
I noticed it because all the rows ended with a comma instead of nothing.
Carefully selected only the right reach, copied in a document and works.
Hope this helps somebody else as well.
I had the same error.!!!! I found the solution.
Just remove all the double-quote, single-quote from the .csv, .xls file.
i,e for eg. under the Name column if the value is "john" it throws an error. Make it to john by removing the quotes.
To remove all the quotes, go to the excel file FInd and replace box.
Find what - "
Replace with - (empty space)
I also went through the same problem when I was using Weka and importing a csv file.
The problem is with the wrong formatting of the file
In my file there was a word in one of the columns GOV'T what I just did was removed the "'" and wrote a whole word GOVERNMENT and it worked.
Hope this helps !!
I had the same error. Problem was a sigle quote character in a string value. Solution for me was to eclose the whole string value in double quotes.
So I have to convert
this: ...,Uncharted 3: Drake's Deception,...
to this: ...,"Uncharted 3: Drake's Deception",...
using weka v. 3.8.0
This is because of addition of extra column. So to get rid of that error, select whole of that column and delete that column.
That should work fine. :)
I also encountered with that error. My csv file contains floating numbers. I have solved that problem by replacing "," with "." .
For me all of the above worked. I replaced " ' , with space.
I had the same error before. I changed my .xls files without any blank ranks. Sometimes the Weka loaded too many "," . But if I clear the blank ranks than the Weka could be work.
If you have copied data from another file using Conrol+A, Control+C and control+V, you copied extra columns. if you open csv file in Nodepad you will see comma in the end of each row. you got this error because of the comma in the end of each row.
To avoid this error, press Control and select columns one by one then Control+C now copy it to new File which you will use in weka.
or you can use another method to avoid comma in the end of each row.
I encountered the same problem.
Replacing/ erasing all " and ' with space worked for me!

How to assign a text qualifier in a flat file destination?

We have an SSIS package which reads from a DB, creates a flat file from that info, and drops it to a file server.
I recently made an update to the package's query which is used against the DB, adjusted the column mappings, and placed it under the SQL Job which ran the SSIS package before.
The problem is that the text qualifier in the flat file should be a quotation mark: ". But when I checked the flat file it produced, the text qualifier showing is: _x0022_
I investigated the Text Qualifier property for the DestinationConnectionFlatFile, and it is set to a quotation mark: "
How can I ensure the flat file will have a text qualifier of quotation mark?
Here is a previous answer I found when this happened to me:
SSIS exporting data to flat file renders double quotes as hexadecimal characters
Additionally ,
This issue occures because of installation issue. So if you see this sort of Issue, It mean if you are loading from file Database table and file contains 100 records , then instead of 100 records only 99 records would get loaded to database , last records would get skipped.
I had same issue, to fix that I had re-instalation of
1) MS Visual Studio
2) MS BI Studio
in the sequence mentioned above.
Given below are the two solutions :
Solution 1: Open the Package in Notepad and Edit the Value present in the "TextQualifier" of particular object to """.
object Name
"
Solution 2: open the Package and Replace the Value in the "TextQualifier" of the Flat File Connection Managers (FFD,SRC,SOURCE) to "\"".
Solution 1: Open the Package in Notepad and Edit the Value present in the "TextQualifier" of particular object to (") &quot follow semicolon
object Name
"
Thanks,
Prakash.A