Hello,
I think I'd might have a small collation problem.
Configuration:
Two SQL Srv 2000 SP3 (running on clusters).
Booth servers configured with SQL_Latin1_Gene ral_CP1_CI_AS
collation.
On each server, I have one database, which collation is
Latin1_General_ CI_AS.
I've created a view on Server1.Databas e1, which is reading complete
table from Server2.Databas e2.
Checking the collation, the view has, I was surpriced, the collation
was the same as server collation.
Is it always, that building views between two different servers, the
object created will use default collation of server?
The problem is, this view is intergrated in other join-where query on
server1, where other objects used are from server1 and I get error
message:
select TABLE_FROM_SERV ER1.Col1 from
TABLE_FROM_SERV ER1,
VIEW_ON_SERVER1 _BUT_ACCESSING_ COMPLETE_SERVER 2
where TABLE_FROM_SERV ER1.Col1 = 'bubu_si_lala'
Server: Msg 446, Level 16, State 9, Line 1
Cannot resolve collation conflict for equal to operation.
The sulution, of joining this view will be changed anyway (is not
enought fast) but I would like to know, how is it possible, to solve so
kind of problem.
Is it possible to set the collation for created view, and determine
collation the same the database have?
Greatings
Mateusz 3 2964
[posted and mailed, please reply in news]
Matik (ma****@sauron. xo.pl) writes: Configuration: Two SQL Srv 2000 SP3 (running on clusters). Booth servers configured with SQL_Latin1_Gene ral_CP1_CI_AS collation.
On each server, I have one database, which collation is Latin1_General_ CI_AS.
I've created a view on Server1.Databas e1, which is reading complete table from Server2.Databas e2.
Checking the collation, the view has, I was surpriced, the collation was the same as server collation. Is it always, that building views between two different servers, the object created will use default collation of server?
Since I don't really know which database that have which collation,
I don't really want to go into speculation. But without looking in
Books Online, my guess is that each column in the view retains the
collation the column has in its source table. And the repro below
appears to confirm this. It also demonstrates how you can modify your
view by using the COLLATE clause to resolve the problem.
create database collate_test collate Polish_CS_AS
go
use collate_test
go
create view nisse_view (PolishCustomer ID, CustomerID) as
select CustomerID COLLATE database_defaul t,
CustomerID
from Northwind..Cust omers
go
-- Succeeds, since CustomerID retains the collation from the
-- Northwind database.
select * from nisse_view n
where not exists (select * from
Northwind..Orde rs O
where O.CustomerID = n.CustomerID)
go
-- Fails, as we here use the column with a collation
-- of the database.
select * from nisse_view n
where not exists (select * from
Northwind..Orde rs O
where O.CustomerID = n.PolishCustome rID)
go
use master
go
drop database collate_test
--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se
Books Online for SQL Server SP3 at http://www.microsoft.com/sql/techinf...2000/books.asp
Thank You Erland,
As always helpfull answer!
Greatings
Mateusz This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Temba |
last post by:
Hi there,
I've been searching for about 6 hours to get a problem solved.
I installed MySQL 4.1.7 on the Debian web-server.
Normally this worked:
insert into logbook (userid,count,dof,aircrid,typeaircr,departure,destination,deptime,arrtime,remarks,nrto,nrldg,seland,meland,class1,class2,night,actinstr,siminstr,flinstr,crss,asflinstr,dual,pic,totdur)
VALUES...
|
by: amos |
last post by:
hi
i have a db with hebrew collation.
i now want it to be cyrillic collation.
converting the db collation - wont help.
i tried exporting data to a blank DB created with cyrillic collation -
still, no good.
what is the best way of having a DB with a certain collation so no
matter the destination DB is, the collation of all columns will be
|
by: Tomislav Stilinović |
last post by:
Hi all.
I have a problem with collation in SQLServer database. My table contains few
rows in field of type char(20),
field and server Collation is set to Croatian_CI_AS (Windows collation).
When I execute query SELECT field FROM table ORDER BY field, return set is
ordered as follows
-------
field
-------
+
|
by: Marco |
last post by:
I need to migrate an application from SQL 7.0 to SQL 2000. I know
that they use different collations, and this causes problems when
7.0 applications are moved to 2000. I would like to find a
permanent fix (so I'm not happy with using "COLLATE" in future
stored procedures) and I'd like to keep the default 2000 collation
(Latin1_General_CI_AS) in order to avoid problems if the
application needs to be moved to another 2000 server in the...
|
by: Ryan |
last post by:
I've stumbled across the above error and am a little stuck.
I've just installed SQL2000 (sp3) on my PC and restored a database from
our Live server. On a simple Update statement on a #temp table, it
fails with the above message. I think I understand what it means and
found some old posts suggesting using the following :
select name, databasepropertyex(name, 'collation')
from master..sysdatabases
select serverproperty('collation')
| |
by: David Greenberg |
last post by:
Hi
When we installed SqlServer2000 we left the default collation name
(Sql_Latin1_General_CPI_CI_AS).
The user defined databases we created afterwards were defined with a
different collation name in order to be able to accept the character set
we use, Hebrew.
We are looking into switching DTSs that we use to copy data from our
main system , that uses an Ingres database, into OSQL scripts. Although
the DTSs successfully copy the Hebrew...
|
by: Nasir |
last post by:
Hi there,
Is it posible to set the collation of SQL server 2005 like Oracle, which is
that objects names and column names are case-insensitive, but data is
sensitive;e.g:
In Oracle:
--create lower-case table and column name
create table t1(c1 char(10));
--Mike with upper-case J
|
by: =?utf-8?B?UMSBdmVscyBNaWhhaWxvdnM=?= |
last post by:
Hello,
I have a problem. I've linked MySql server to MsSql, in MySql I have a
table with Latvian data(character set is ucs2, ucs2_general_ci) and
the problem is that when I use openquery to read data from MySQL
server, some characters are not translated correctly! I receive
question symbols instead of Latvian special characters.
Maybe someone had this kind of problem with collation?
|
by: aj |
last post by:
A few collation questions on SQL Server 2005 SP2, which I'll call SQLS.
The default collation for SQLS is apparently SQL_Latin1_General_CP1_CI_AS.
I wish to use a variation of this, SQL_Latin1_General_CP1_CS_AI
collation, but there is no such collation returned from
fn_helpcollations(). Also, if I try to use this collation in
a CREATE DATABASE stmt, SQLS yells about it.
I see that there is a Latin1_General_CS_AI. What effects are...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |