International Data Not Being Returned Correctly ???
Jan 24, 2004
HI all.
I have a web service that does an SQL select against a database that contains international data, however when this is displayed from the web service the text such as "Rue Emile Féron 168" is not shown correctly and the 'é' is shown as a comma. Can someone advise what changes I need to make to the coding. Also our own tables have varchar fields and I'm assuming the "é" data will be saved correctly ???
I have a strange problem. I have some code that executes a sql query. If I run the query in SQL server query analyzer, I get a set of data returned for me as expected. This is the query listed on lines 3 and 4. I just manually type it into query analyzer. Yet when I run the same query in my code, the result set is slightly different because it is missing some data. I am confused as to what is going on here. Basically to examine the sql result set returned, I write it out to an XML file. (See line 16). Why the data returned is different, I have no idea. Also writing it out to an XML file is the only way I can look at the data. Otherwise looking at it in the debugger is impossible, with the hundreds of tree nodes returned. If someone is able to help me figure this out, I would appreciate it. 1. public DataSet GetMarketList(string region, string marketRegion)2. {3. string sql = @"SELECT a.RealEstMarket FROM MarketMap a, RegionMap b " + 4."WHERE a.RegionCode = b.RegionCode"; 5. DataSet dsMarketList = new DataSet();6. SqlConnection sqlConn = new SqlConnection(intranetConnStr); 7. SqlCommand cmd = new SqlCommand(sql,sqlConn);8. sqlConn.Open();9. SqlDataAdapter adapter = new SqlDataAdapter(cmd); 10. try11. {12. adapter.Fill(dsMarketList); 13. String bling = adapter.SelectCommand.CommandText;//BRG 14. dsMarketList.DataSetName="RegionMarket"; 15. dsMarketList.Tables[0].TableName = "MarketList"; 16. dsMarketList.WriteXml(Server.MapPath ("myXMLFile.xml" )); // The data written to 17. myXMLFile.xml is not the same data that is returned when I run the query on line 3&4 18. // from the SQL query 19. } 20. catch(Exception e) 21. { 22. // Handle the exception (Code not shown)
Insert Into Table2 Select * From Table1 Where Column1Val = '4'
As you can see, I don't need any parameters so I havent configured any. Also, there should not be any result set so I shouldnt need to configure a resultset parameter.
Why is the above query failing with
Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly
I am using SQL Server 2012 and to me a part of data captured by CDC is not making sense.
I have a table called 'Schema.Table1', and I enabled CDC on it by running 'sys.sp_cdc_enable_table'. I see that a table called 'cdc.Schema_Table1_CT' got created which now gets an entry when ever I Insert, Update or delete a record in the original table.
Till this point every thing works fine.
My original Table has a NOT NULL INT column called 'AuditTrackerUserID' with a default value of 1996. My application does not provides a value for this column, but because the column itself has a default value, records get inserted without error.
When I try to execute the following Query I see multiple records with __$operation of 3 and 1.
SELECT * from cdc.Schema_Table1_CT where AuditTrackerUserID IS NULL
My expectation is that I should not ever see any record returned by this query because AuditTrackerUserID is a not null column, but I do.
Hello, I am really dripping wet behind the ears on this and would really appreciate some help. I am setting up my first SQL table and am lost at trying to choose data types for my fields. Basically, all I am doing is setting up a contact form. It is going to ask for phone number, name, address, city, state, zip, etc. I will also have two fields which if I were using an Access db, would be "memo" with say, 500 characters. So in researching SQL data types, I came across the following:
char Fixed-length non-Unicode character data with a maximum length of 8,000 characters.
varchar variable-length non-Unicode data with a maximum of 8,000 characters.
text Variable-length non-Unicode data with a maximum length of 2^31 - 1 (2,147,483,647) characters.
nchar Fixed-length Unicode data with a maximum length of 4,000 characters.
Can someone shed some light on what I need for simple fields like street, name, city, and more importantly, description? I will also have a "premium" field which should be a "yes" or "no". I am thinking a data type of bit, which is set to 1 or 0? Thanks for any help, I appreciate it so much. TOm
Ok I wrote a SSIS package that will pull down data from my AS/400 and populate a SQL Server table with the data.
1)The data is being pulled from my China configured AS/400. It is configured to handle DBCS 2)The SQL Server tables are configured to handle DBCS by using the nvarchar datatype. 3)When I run this package on my machine against the production server, it works perfectly. 4)When I run this package on my test SQL Server against the production server,it works perfectly. 5)When I run this package on my production SQL Server it brings down all the records, but does not bring down all the fields. Most of the character fields are left blank.(not all)
I do not understand why this is doing this. Can anyone shed any light on this problem? Thank you.
Ok I wrote a SSIS package that will pull down data from my AS/400 and populate a SQL Server table with the data.
1)The data is being pulled from my China configured AS/400. It is configured to handle DBCS 2)The SQL Server tables are configured to handle DBCS by using the nvarchar datatype. 3)When I run this package on my machine against the production server, it works perfectly. 4)When I run this package on my test SQL Server against the production server,it works perfectly. 5)When I run this package on my production SQL Server it brings down all the records, but does not bring down all the fields. Most of the character fields are left blank.(not all)
I do not understand why this is doing this. Can anyone shed any light on this problem? Thank you.
Ok I wrote a SSIS package that will pull down data from my AS/400 and populate a SQL Server table with the data.
1)The data is being pulled from my China configured AS/400. It is configured to handle DBCS 2)The SQL Server tables are configured to handle DBCS by using the nvarchar datatype. 3)When I run this package on my machine against the production server, it works perfectly. 4)When I run this package on my test SQL Server against the production server,it works perfectly. 5)When I run this package on my production SQL Server it brings down all the records, but does not bring down all the fields. Most of the character fields are left blank.(not all)
I do not understand why this is doing this. Can anyone shed any light on this problem? Thank you.
I have the following code but do not know the best way to return the updatedDataTable back to the database. I believe I can use the Update method of theData Adapter, BUT if true, I also believe I have to 'long-hand' write codefor each individual column data that's being added......this seems a bitdaft considering that the data is already in the disconnected data table.Have I lost the plot?? Based on the code below, what is the correctapproach?Note: sqlcnn is defined at module level.Public Sub AddRequest(ByVal Eng As String, ByVal Bran As String, ByVal ReqAs String) Implements IHelpSC.AddRequestDim dtNew As New DataTable("dtNew")Dim drNew As DataRowsqlda = New SqlDataAdapter("SELECT * FROM ActiveCalls", sqlcnn)sqlda.Fill(dtNew)'Add and populate the new datarow with'data passed into this subroutinedrNew = dtNew.NewRowdrNew("CallTime") = Format(Date.Now, "dd MMM yyyy").ToStringdrNew("Engineer") = EngdrNew("Branch") = BrandrNew("Request") = ReqdtNew.Rows.Add(drNew)End SubHope one of you wizards can help.Rgds.....and Merry Christmas.Phil
I have a report that has ten pages (essentially ten different reports). Each page has one, large main chart and then three smaller charts stacked on top of each other off to the right. The layout is in landscape. When I render the report in Reporting Services, the layout looks fine. If I export it to Adobe, it is also fine. However, when the report is emailed as a PDF attachment, the main chart on each page is completely missing. Has anybody experienced something simliar? I was having issues with the layout, and decreasing the height of each page fixed everything, but created this new problem. I am using Adobe 7.0. Thank you.
Quick background.... I have a file that is currently in Bulgarian (not unicode) that we want to import into a development environment for testing. However, the only way I can view the file as "non-gibberish" is for me to switch my local settings (on the OS) to Bulgarian. Then of course the file is readable in Bulgarian.
Now they have sent the following snipet of code asking if I can somehow add this to the DTS package? The purpose of this code is to...
They're sending me a C# routine to transpose the 10 or so Bulgarian-specific characters in the text fields.
They hope we can include this routine in the DTS package.
Here is the code....
private string StrFix( string InStr ) { string Result = InStr; Result = Result.Replace( 'x2591', 'ð' ); Result = Result.Replace( 'x2592', 'ñ' ); Result = Result.Replace( 'x2593', 'ò' ); Result = Result.Replace( 'x2502', 'ó' ); Result = Result.Replace( 'x2524', 'ô' ); Result = Result.Replace( 'x2561', 'õ' ); Result = Result.Replace( 'x2562', 'ö' ); Result = Result.Replace( 'x2556', '÷' ); Result = Result.Replace( 'x2555', 'ø' ); Result = Result.Replace( 'x2563', 'ù' ); Result = Result.Replace( 'x2551', 'ú' ); Result = Result.Replace( 'x255d', 'ü' ); Result = Result.Replace( 'x255b', 'þ' ); Result = Result.Replace( 'x2510', 'ÿ' ); Result = Result.Replace( 'x2552', '¹' ); return Result; }
My questions... (as I'm not familiar with C#)
1. Do you guys see anything I'm not? 2. Is it possible to add this code to DTS package and have it change the 10 characters? 3. Wouldn't this be easier if their sample was in unicode?
This is a new problem to me being a junior, and I'm quite sure this is a problem that will occur for more and more people as time goes on.
My company has offices from around the world, and naturally there are databases all over the place. We have a main one which the sites run off here in the UK, otherwise we use SAP (like so many others) and Viper. There are also apparently Marketing databases which I have never even seen...
There is a nightly import into the main databases, but its choking fairly regularly and the data we are getting out is outright filthy.
Anyway, the boss wants a "data firewall" with a rules engine sitting on top controlling what is clean and what is not. Sounds great, but I don't really know where to start. Does anyone have any advice on a design for this? We are currently using SQL Server 2000 but should be moving to 2005 very shortly (not 2008 it seems :-( ).
Is this something I can develop in a .net language or can it be done purely on a SQL Server basis? Keep in mind the rules engine which should have a useable interface for a techie who is not heavily trained in SQL Server (like a .net developer).
Apologies for the long post and thank you very much for any inspiring (or not) ideas. :-)
Dear Madam/Sir,You are invited to participate in an international research study. Thisresearch project is headed and led by Cambridge student Nico Baumgarten.What is it all about?It is a well-known fact that there exist many differences between cultures.However, how these differences effect motivation if there are effects atall is not yet clear. This survey is set out to change this. With yourhelp, it will be possible to achieve this.Therefore, we kindly ask you to spare only 10 minutes of your time andvisit the survey home page.Go to the survey http://crosscultural.research.yi.orgor if this does not work the direct link http://82.4.146.32Who participates?All over the world, people are chosen to participate in the survey.Although the survey is completely anonymous, each person is arepresentative of his/her country. Hence, it does not matter, which job aperson has, whether he/she is male or female, old or young. The more peoplechoose to participate the more accurate this survey is going to representand show cultural influences as well as similarities.So if you want to tell your friends about this survey - Please Do So! Justforward this email to your friends or use the feature on the survey homepage.What is in it for you?With your help your country will be represented in the survey.Of course, you can opt-in to receive the results of the study at the end ofthe survey.Any information you provide will be kept strictly confidential andanonymous.Thanking you in advance for you support I remain withKind regardsNico Baumgartenhttp://crosscultural.research.yi.orghttp://82.4.146.32
I will doing an installation of MS SQL 2000 that will be used by multilanguage web sites.The languages are Japanese, German and of course English.Currently I'm planning to install MS SQL 2000 standard version butafter reading some articles I'm considering the Enterprise version.Can someone shed some light on the advantages of using Enterprise vsStandard strictly from a language support perspective?Also, is there any caveats or other considerations that I should keepin mind to make sure that the developers have all they need to developthese multi language sites?Thanks in advance.
I have to create a database (SQL2005) for multinational usage (Western, Eastern and asian langages included).
This database will be used by an international application.
Here are my questions :
* All the "wording" of the application will come from NVARCHAR database fields. However, for database fields which will not store any possibilities of special characters (and will not be shown on the application), should I also use NVARCHAR fields ?
(Then, the database will mix unicode and non unicode strings)
* The database must be replicated (transactional or Merge) with an "old" non international database on SQL 2000. Schemas are near the same, only datatype are different (varchar --> nvarchar). Then, should I use a SQL collation instead of Windows Collation as advised on MSDN ? http://msdn2.microsoft.com/en-us/library/ms175194.aspx
(MS tells to use Windows collation if the database has unicode and and non-unicode strings, but It also tells to use SQL collation to maintain compatibility with earlier versions of SQL)
I use datetime condition in sql-query. For example:select something from sometablewhere date between '06/15/04 00:00:00' and '06/15/04 23:59:59'and result on two synchronized servers is different.In USA server result contains where date equal '06/14/04' only,but Russian server gives where date equal '06/15/04'.I read mysql online book article 'Writing International Transact-SQL Statements'and not found any recommendations how solve this problem.Thanks for any help.
i've worked with SQL Databases for years now, but never needed to deal with international characters. Â I am trying to search strings like surname in a column that might have international letters/characters, such as:
select * from [dbo].[User] where LastName like '%HekimoÄŸlu%'
It doesn't retrieves anything. Â I've googled for while in a hope to find some solution quickly, but to my surprise I couldn't. how to query string columns that include international characters such as above.I am using SQL Server 2012, Nvarchar(100) for column.
Is there an easy way to loop through all rows and remove allinternational alphabet characters from a column in a table, for exampleremove German umlauts "ü" and convert them to a simple "u".Thanks,lq
Y'all:I am needing some way, in the SQL Server dialect of SQL, to escape unicodecode points that are embedded within an nvarchar string in a SQL script,e.g. in Java I can do:String str = "This is au1245 test.";in Oracle's SQL dialect, it appears that I can accomplish the same thing:INSERT INTO TEST_TABLE (TEST_COLUMN) VALUES ('This is a1245 test.");I've googled and researched through the MSDN, and haven't discovered asimilar construct in SQL Server. I am already aware of the UNISTR()function, and the NCHAR() function, but those aren't going to work well ifthere are more than a few international characters embedded within astring.Does anyone have a better suggestion?Thanks muchly!GRB-----------------------------------------------------------------------Greg R. Broderick Join Bytes!A. Top posters.Q. What is the most annoying thing on Usenet?---------------------------------------------------------------------
Could anyone provide me an example of the effective way of design a database support multiple languages. Currently I working to design a database for travel website which support 3 different languages, and more languages will be added in in the future. One of my friend advice me to put different languages into the same table for example Table Hotel ID Description_EN Description_ES Description_FR Location_EN Location_ES Location_FR .... But I don't thing it's a good idea to do so since in the future if I would like to add more languages I have to modify the table and I have to replace all of the sql statements. I am seeking for the best solution , could anyone help. Thank you very much
I am working on a personal project and am drawing a complete blank(too much celebrating last night?) on the SQL term that is used toeliminate multiples of like data when it is returned from thedatabase.ie, instead of ....redblueredgreenit would return ...redbluegreenSorry for the trouble and thanks.
In the following procedure i write the results to a temp table called #temp1I now want to count the results of #temp1, if the count of #temp1 = 0 I want to insert 'No Records Found' into #temp.ERRORMSG else return what is in the table
any idea on how to do this?
ALTER PROC [dbo].[SPU_RPT_Savings_AnomalyDispatches] 40,'04/01/07|06/30/07' @PropertyID varchar(4000), @DropDown varchar(50)
AS SELECT Client.CLIENT, Client.CLIENTID, ErrorEmailLog.ID, ErrorEmailLog.SITEID, ErrorEmailLog.PROPID, ErrorEmailLog.DISTINCTERRORS, ErrorEmailLog.ERRORMSG, ErrorEmailLog.ERRORDATETIME, ErrorEmailLog.EMAILRECIPIENTS, Property.PROPERTY, Property.STREET, Property.CITY, Property.STATE, Property.ZIP, Property.PHONE INTO #TEMP1 FROM ErrorEmailLog INNER JOIN Property ON ErrorEmailLog.PROPID = Property.PROPID INNER JOIN Client ON Property.CLIENTID = Client.CLIENTID WHERE (ErrorEmailLog.ERRORDATETIME BETWEEN SUBSTRING(CONVERT(VARCHAR(12), @DropDown), 0, 9)
I have a subreport within the details section of my main report. This is enclosed by a single group. When I preview the subreport alone, it diplays the subreport correctly with no data (meaning it still displays the header and footer without a detail section). When the subreport is run within the main report and no subreport data is returned the subreport does not show.
Based on other threads I understand that the default functionality is to display headers and footers when no data is returned. This appears accurate except on a subreport.
In my SSIS package, I connect to an external SQL server database. This external database supports a stored procedure that I need to execute to "retrieve data". So in my package, I set the DataAccess Mode property of my OLEDB datasource to "SQL Command" and I provide the command EXEC <proc_name> <Param>,<output_param>. (The proc has an output parameter). The preview shows all the columns and data, but somehow no columns are returned....so when I try to link this data source to a copy column task, I get an error saying the source does not have any columns...any idea why this could be happening. Thanks - Manmeet
Is there a way to hide a column if there is no data for that column? Suppose that I have a SP (lets call it wrapper) which will call multiple SP's. But for any one run, there'll be only one SP which is called. But the columns returned by these SP's is obviously different. So, in order to accomodate the output, can I create a table, add all the possible columns to it, and set the properties of the individual columns such that they will be hidden if there is no data in them? Example, SP 1 returns - ServerName, Location, OS ; SP 2 returns ServerName and location only. Now if the wrapper SP calls only the second SP (SP 2) can I configure in such a way that the third column (OS) is not displayed at all? (In normal cases, it would appear but without any data in it)...
How can i group the data returned by statement below by "Dept" field. I have already tried to group it like shown below but that doesn't seem to work for me. Any help. cmd_select = New SqlCommand("SELECT Incident_id,Dept From Report_Incident Group By Dept,Incident_id", myconnection_string)
I need help in sorting data return from database. For example, I have the following data:ID field1 1 Computer 2 Cell Phone 3 iPod 4 Car I know that a select statement will look something like this: SELECT field1 FROM table ORDER BY field1. However, I want the data to be display this way in the gridview: ID field1
3 iPod
1 Computer
2 Cell Phone
4 Car Any idea of how I can make this happen. Any idea is appreciated.
I am working with extracting data from a SAP database, and I would like to perform some 'visual formatting' on the returned data. Because the SQL code that I am writing will be used in a custom Report it is not possible for me to use '3rd Party' formatting tools. Furthermore because the database is hosted on an MS SQL 2008 R2 RDBMS it is not possible to use the IIF() function.
Here is a sample of the data that I am getting back at the moment. URL...Here is how I would like the data to be returned (with the exception that the blue lines will ideally be blank cells). URL...
I have come to believe that I should be using the ROW_NUMBER() function, along with the OVER() function and possibly the 'partition by' keywords.Here is my original code -
Code: select td.ItemCode as 'Item Code' , td.Dscription as 'Item Description', td.Quantity as 'Order Qty' , titm.OnOrder as 'PO Qty' , th.CardCode as 'BP Code', th.CardName as 'BP Name' , th.DocNum as 'Sales Order Number' , tsp.SlpName as 'Sales Person' , twhs.WhsCode as 'Whs Code' , isnull(tbloc.BINLABEL, '') as 'BIN Label', isnull(cast(tbloc.QUANTITY as nvarchar(20)), '') as 'BIN Qty'
code]...
Notice above that I only see the 'Seq' and no other data. How can I go about modifying this code so that I see all of the data columns I desire? If I further 'refine' the above, by adding case statements and the individual columns that I want to see (as opposed to using the * wildcard) I get a long list of error messages.
I need to return a single column (Name.company) but I want the data returned to be viewed in multiple columns.
First is that possible? Second if so how?
My data looks like this:
University X University X - 1 University X - 2 University X - 3 College X College X - 1 College X - 2 College X - 3 Cmty College X Cmty College X - 1 Cmty College X - 2 etc.