I am using sql server 2008 R2 to store my data. I have a datatable named postMaster where I save all the posts in my organization. All posts have to be described in english and arabic. My problem is with the arabic description of the post
My data table structure as follows:
and a sample record will look as follows:
As you can see from the picture, the Arabic description mixes up the brackets and when I display data in datagridview it would look the save way it is saved!
Is there away to make these brackets be properly saved as in english way?
It's because the postDescAr is not displaying texts in a RTL format. The data is saved correctly, but not displayed correctly. It depends on from where you query the data.
Related
This is my logic app workflow,
To get EDI 850 message as input for http trigger
Decode x12 message.
Transform xml
SQL server to insert data into the on-prem SQL database. while inserting data it doesn't shows POLineNumber field as suggestion it shows like GS01,SE01 as input suggestion. i'm using transform xml output for inserting the data into the table.
And my transform xml sample single field output as 1.
I would like to insert data into sql table. when i select table i want to get that particular field as suggestion in insert row of sql server but it shows the segment of EDI 850 message like GS01, SE01, etc. i need as POLineNumber.
for an example when i use parse json in another logic app workflow for other business scenario it shows suggestion as account. for more clarification as shown in the below image
[enter image description here][1]
So for xml output i get suggestion as
[enter image description here][1]
But i need as shown in the example flow image.
What component or how to get particular field in insert row of sql server. please fix the issue.
Thanks in advance
The suggested fields are informed by the decode component and are headers of full EDI 850 Interchange (GS, ST, ...). Also the component suggested you the "GoodMessages" and "BadMessages" collection to iterate.
Those fields (POLineNumber, ...) are of each item of GoodMessages, not from decode component.
You can validate the XML of each item and then you will get the suggested fields.
I have looked and found some instances there something similar is being done for websites etc....
I have a SQL table that I am accessing in FileMaker Pro (Through ESS) via an ODBC connection to the SQL database and I have everything I need except there is one field(LNL_BLOB) in one table (duo.MMOBJS) which is an image "(image, null)" which cannot be accessed via the ODBC connection.
What I am hopping to accomplish is find a way that when an image is placed in the field, it is ALSO converted to Base64 in another field in the same table. Also, the database creator has a "View" (Foreign Concept to us Filemaker Developers) with this same data called "dbo.VW_BLOB_IMAGES" if that is helpful.
If there is a field with Base64 text, within FileMaker I can decode it to get the image.
What thoughts do you all have? Is there and even better way?
NOTE: I am using many tables and lots of the data in the app that I have made, this image is not the only reason I have created the ODBC connection.
Table
View
Well, one way to get base64 out of SQL would be to trick the XML engine in SQL to convert your column to base64, then strip out the XML:
SELECT SUBSTRING(Q.Base64Data, 7, LEN(Q.Base64Data)-9)
FROM (SELECT
(
SELECT LNL_BLOB AS B
FROM duo.MMOBJS
FOR XML raw('r'), BINARY BASE64
) AS [Base64Data]) AS [Q]
You'd probably want to add that to your select statement or a view, rather than add it to the table; but, you could write a trigger that would maintain the field using that definition.
In T-SQL (SQL Server 2008 and higher), what is the datatype to use for a column which stores text data keeping formatting like breaklines / enters, bullets, tabs etc. in the text? The length of the text can vary substantially.
I have tried NVarchar(max), but a select result set removes all the formatting. Or is this caused by SSMS like on this post here and this post?
Is it also possible to store the text data including the html code?
Sorry for the newbie question, but I saw a few posts on Stackoverflow that confuse me somewhat about this subject in respect which datatype is best to use: Ntext vs Nvarchar; and how to get the data out of the DB but still keep the formatting.
Thanks!
When you save information into SQL Server the information is stored at text, so when you try to insert HTML it is stored as raw HTML code.
From my knowledge there is no way to allow HTML formatting in a SQL Server result set.
I have done an MS SQL Query in excel.
I have added extra colums in the excel sheet which I want to enter manual
data in.
When I refresh the data, these manually inputted columns become misaligned
to the imported data they refer to.
Is there any around this happening.
I have tried to link the imported data sheet to a manual data sheet via
vlookup but this isn't working as there are no unique fields to link together.
Please help!
Thanks
Excel version is 2010.
MS SQL version is 2005.
There is no unique data.
Because excel firstly looks like this.
when we entered a new order in to database Excel looks like this
Try this: in the External Data Range Properties, select "Insert entire rows for new data".
Not sure, but worth a try. And keep us updated of the result !
edit: And make sure you provide a consistent sort order.
There is no relationship to the spreadsheets external data and the columns you are entering. When refreshing typically the data is cleared and updated though there are other options in the external data refresh menu you could play with. You could play around with the External data options in the menu to see if changing the settings on what happens with the new data would help.
If you want your manually entered data to link to the data in the embedded dataset, you have to establish the lookup with a vlookup or some formula to find the rows info and show it.
Basically you are thinking the SQL data on the spreadsheet is static, but it isn't unless you never refresh it or disconnect it from the database
note that Marcel Beug has given a full solution to this problem in a more recent post in this forum # Inserting text manually in a custom column and should be visible on refresh of the report
he has even taken the time to record an example in a video # https://www.youtube.com/watch?v=duNYHfvP_8U&feature=youtu.be
I have a database in SQL Server containing a column which needs to contain Unicode data (it contains user's addresses from all over the world e.g. القاهرة for Cairo)
This column is an nvarchar column with a collation of database default (Latin1_General_CI_AS), but I've noticed data inserted into it via SQL statements containing non English characters and displays as ?????.
The solution seems to be that I wasn't using the n prefix e.g.
INSERT INTO table (address) VALUES ('القاهرة')
Instead of:
INSERT INTO table (address) VALUES (n'القاهرة')
I was under the impression that Unicode would automatically be converted for nvarchar columns and I didn't need this prefix, but this appears to be incorrect.
The problem is I still have some data in this column which appears as ????? in SQL Server Management Studio and I don't know what it is!
Is the data still there but in an incorrect character encoding preventing it from displaying but still salvageable (and if so how can I recover it?), or is it gone for good?
Thanks,
Tom
To find out what SQL Server really stores, use
SELECT CONVERT(VARBINARY(MAX), 'some text')
I just tried this with umlauted characters and Arabic (copied from Wikipedia, I have no idea) both as plain strings and as N'' Unicode strings.
The results are that Arabic non-Unicode strings really end up as question marks (0x3F) in the conversion to VARCHAR.
SSMS sometimes won't display all characters, I just tried what you had and it worked for me, copy and paste it into Word and it might display it corectly
Usually if SSMS can't display it it should be boxes not ?
Try to write a small client that will retrieve these data to a file or web page. Check ALL your code if there are no other inserts or updates that might convertthe data to varchar before storing them in tables.