Showing posts with label greetings. Show all posts
Showing posts with label greetings. Show all posts

Thursday, March 22, 2012

Collation Confusion

Greetings!
I'm trying to install SQL Server 2000 (Standard edition) on a new server to
mirror the version on an older server. The trouble I'm having is with
identifying the settings I need in order to match collations.
The instance of SQL Server on the old server has a collation described as
'SQL_Latin1_General_CP1_CI_AS'. I realise that 'CI' and 'AS' refer to
case-insensitive and accent-sensitive respectively, but what does 'CP1'
relate to?
I've searched through various resources but they all seem to avoid
describing that one crucial bit of information! Can anyone help?Code page 1
"Mario" <someone.else@.microsoft.com> wrote in message
news:O3bumugWEHA.1368@.TK2MSFTNGP10.phx.gbl...
> Greetings!
> I'm trying to install SQL Server 2000 (Standard edition) on a new server
to
> mirror the version on an older server. The trouble I'm having is with
> identifying the settings I need in order to match collations.
> The instance of SQL Server on the old server has a collation described as
> 'SQL_Latin1_General_CP1_CI_AS'. I realise that 'CI' and 'AS' refer to
> case-insensitive and accent-sensitive respectively, but what does 'CP1'
> relate to?
> I've searched through various resources but they all seem to avoid
> describing that one crucial bit of information! Can anyone help?
>|||In setup you should select "Dictionary order, case-insensitive, for use
with 1252 character set" in the collation selection dialog. This is the
default collation for U.S. English SQL Servers.
--
Bart Duncan
Microsoft SQL Server Support
Please reply to the newsgroup only - thanks.
This posting is provided "AS IS" with no warranties, and confers no
rights.
From: "Adam Machanic" <amachanic@.hotmail._removetoemail_.com>
References: <O3bumugWEHA.1368@.TK2MSFTNGP10.phx.gbl>
Subject: Re: Collation Confusion
Date: Thu, 24 Jun 2004 13:08:24 -0400
Lines: 22
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
Message-ID: <uAyDd3gWEHA.1468@.TK2MSFTNGP10.phx.gbl>
Newsgroups: microsoft.public.sqlserver.server
NNTP-Posting-Host: firewall.getconnected.com 207.31.238.50
Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA06.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGX
A01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.server:347579
X-Tomcat-NG: microsoft.public.sqlserver.server
Code page 1
"Mario" <someone.else@.microsoft.com> wrote in message
news:O3bumugWEHA.1368@.TK2MSFTNGP10.phx.gbl...
> Greetings!
> I'm trying to install SQL Server 2000 (Standard edition) on a new server
to
> mirror the version on an older server. The trouble I'm having is with
> identifying the settings I need in order to match collations.
> The instance of SQL Server on the old server has a collation described
as
> 'SQL_Latin1_General_CP1_CI_AS'. I realise that 'CI' and 'AS' refer to
> case-insensitive and accent-sensitive respectively, but what does 'CP1'
> relate to?
> I've searched through various resources but they all seem to avoid
> describing that one crucial bit of information! Can anyone help?
>

Monday, March 19, 2012

COLLATE Question

Greetings to all. It would thank for much to them if they
could help me with a problem, that is the following one: I
have a data base in a server x with a table with a field
that has the COLLATE in Hungarian_CS_AI, and at the time
of concatenating this field with a field that has the
COLLATE of the SQL_Latin1_General_CP1_CI_AI type and when
executing this marks an error to me and it solved it
adding at the end of the sentence that the COLLATE of a
single type, but that is not what I look for but what I
would like that somebody explains to me in case a type of
COLLATE exists that can support to all the types like a
UNICODE or something similar. It is for this reason that I
need to know if it is possible to do that single collate
accepts all type of characters. Thanks.
Have you tried to bring the data with the different collation types into another table that has only one collation. Do you need the Hungarian collation still? If so I am assuming that the Hungarian collation (due to the need for more special characters) w
ould allow for all Latin1 permissible characters and therefore try to port your Latin collation data to Hungarian collation.
|||So why not use Unicode?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Miramontes" <anonymous@.discussions.microsoft.com> wrote in message
news:1afb001c44f3f$e3dad580$a401280a@.phx.gbl...
> Greetings to all. It would thank for much to them if they
> could help me with a problem, that is the following one: I
> have a data base in a server x with a table with a field
> that has the COLLATE in Hungarian_CS_AI, and at the time
> of concatenating this field with a field that has the
> COLLATE of the SQL_Latin1_General_CP1_CI_AI type and when
> executing this marks an error to me and it solved it
> adding at the end of the sentence that the COLLATE of a
> single type, but that is not what I look for but what I
> would like that somebody explains to me in case a type of
> COLLATE exists that can support to all the types like a
> UNICODE or something similar. It is for this reason that I
> need to know if it is possible to do that single collate
> accepts all type of characters. Thanks.
|||Do you now the name for this type of collate for
unicode ?, because i need that unicode.
Thanks in advanced.

>--Original Message--
>So why not use Unicode?
>--
>Tibor Karaszi, SQL Server MVP
>http://www.karaszi.com/sqlserver/default.asp
>http://www.solidqualitylearning.com/
>
>"Miramontes" <anonymous@.discussions.microsoft.com> wrote
in message[vbcol=seagreen]
>news:1afb001c44f3f$e3dad580$a401280a@.phx.gbl...
they[vbcol=seagreen]
one: I[vbcol=seagreen]
when[vbcol=seagreen]
of[vbcol=seagreen]
that I
>
>.
>
|||Unicode is the datatype (actually nvarchar, nchar and ntext). You then pick a collation to go with it. Seems
like Hungarian_CS_AI should be the one to use, as the other is "general", hence shouldn't care how the
"extended" characters are sorted etc.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Miramontes" <anonymous@.discussions.microsoft.com> wrote in message
news:1b69901c44fba$dffe8fd0$a001280a@.phx.gbl...[vbcol=seagreen]
> Do you now the name for this type of collate for
> unicode ?, because i need that unicode.
> Thanks in advanced.
> in message
> they
> one: I
> when
> of
> that I

COLLATE Question

Greetings to all. It would thank for much to them if they
could help me with a problem, that is the following one: I
have a data base in a server x with a table with a field
that has the COLLATE in Hungarian_CS_AI, and at the time
of concatenating this field with a field that has the
COLLATE of the SQL_Latin1_General_CP1_CI_AI type and when
executing this marks an error to me and it solved it
adding at the end of the sentence that the COLLATE of a
single type, but that is not what I look for but what I
would like that somebody explains to me in case a type of
COLLATE exists that can support to all the types like a
UNICODE or something similar. It is for this reason that I
need to know if it is possible to do that single collate
accepts all type of characters. Thanks.Have you tried to bring the data with the different collation types into ano
ther table that has only one collation. Do you need the Hungarian collation
still? If so I am assuming that the Hungarian collation (due to the need for
more special characters) w
ould allow for all Latin1 permissible characters and therefore try to port y
our Latin collation data to Hungarian collation.|||So why not use Unicode?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Miramontes" <anonymous@.discussions.microsoft.com> wrote in message
news:1afb001c44f3f$e3dad580$a401280a@.phx
.gbl...
> Greetings to all. It would thank for much to them if they
> could help me with a problem, that is the following one: I
> have a data base in a server x with a table with a field
> that has the COLLATE in Hungarian_CS_AI, and at the time
> of concatenating this field with a field that has the
> COLLATE of the SQL_Latin1_General_CP1_CI_AI type and when
> executing this marks an error to me and it solved it
> adding at the end of the sentence that the COLLATE of a
> single type, but that is not what I look for but what I
> would like that somebody explains to me in case a type of
> COLLATE exists that can support to all the types like a
> UNICODE or something similar. It is for this reason that I
> need to know if it is possible to do that single collate
> accepts all type of characters. Thanks.|||Do you now the name for this type of collate for
unicode ?, because i need that unicode.
Thanks in advanced.

>--Original Message--
>So why not use Unicode?
>--
>Tibor Karaszi, SQL Server MVP
>http://www.karaszi.com/sqlserver/default.asp
>http://www.solidqualitylearning.com/
>
>"Miramontes" <anonymous@.discussions.microsoft.com> wrote
in message
> news:1afb001c44f3f$e3dad580$a401280a@.phx
.gbl...
they[vbcol=seagreen]
one: I[vbcol=seagreen]
when[vbcol=seagreen]
of[vbcol=seagreen]
that I[vbcol=seagreen]
>
>.
>|||Unicode is the datatype (actually nvarchar, nchar and ntext). You then pick
a collation to go with it. Seems
like Hungarian_CS_AI should be the one to use, as the other is "general", he
nce shouldn't care how the
"extended" characters are sorted etc.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Miramontes" <anonymous@.discussions.microsoft.com> wrote in message
news:1b69901c44fba$dffe8fd0$a001280a@.phx
.gbl...[vbcol=seagreen]
> Do you now the name for this type of collate for
> unicode ?, because i need that unicode.
> Thanks in advanced.
>
> in message
> they
> one: I
> when
> of
> that I

COLLATE Question

Greetings to all. It would thank for much to them if they
could help me with a problem, that is the following one: I
have a data base in a server x with a table with a field
that has the COLLATE in Hungarian_CS_AI, and at the time
of concatenating this field with a field that has the
COLLATE of the SQL_Latin1_General_CP1_CI_AI type and when
executing this marks an error to me and it solved it
adding at the end of the sentence that the COLLATE of a
single type, but that is not what I look for but what I
would like that somebody explains to me in case a type of
COLLATE exists that can support to all the types like a
UNICODE or something similar. It is for this reason that I
need to know if it is possible to do that single collate
accepts all type of characters. Thanks.Have you tried to bring the data with the different collation types into another table that has only one collation. Do you need the Hungarian collation still? If so I am assuming that the Hungarian collation (due to the need for more special characters) would allow for all Latin1 permissible characters and therefore try to port your Latin collation data to Hungarian collation.|||So why not use Unicode?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Miramontes" <anonymous@.discussions.microsoft.com> wrote in message
news:1afb001c44f3f$e3dad580$a401280a@.phx.gbl...
> Greetings to all. It would thank for much to them if they
> could help me with a problem, that is the following one: I
> have a data base in a server x with a table with a field
> that has the COLLATE in Hungarian_CS_AI, and at the time
> of concatenating this field with a field that has the
> COLLATE of the SQL_Latin1_General_CP1_CI_AI type and when
> executing this marks an error to me and it solved it
> adding at the end of the sentence that the COLLATE of a
> single type, but that is not what I look for but what I
> would like that somebody explains to me in case a type of
> COLLATE exists that can support to all the types like a
> UNICODE or something similar. It is for this reason that I
> need to know if it is possible to do that single collate
> accepts all type of characters. Thanks.|||Do you now the name for this type of collate for
unicode ?, because i need that unicode.
Thanks in advanced.
>--Original Message--
>So why not use Unicode?
>--
>Tibor Karaszi, SQL Server MVP
>http://www.karaszi.com/sqlserver/default.asp
>http://www.solidqualitylearning.com/
>
>"Miramontes" <anonymous@.discussions.microsoft.com> wrote
in message
>news:1afb001c44f3f$e3dad580$a401280a@.phx.gbl...
>> Greetings to all. It would thank for much to them if
they
>> could help me with a problem, that is the following
one: I
>> have a data base in a server x with a table with a field
>> that has the COLLATE in Hungarian_CS_AI, and at the time
>> of concatenating this field with a field that has the
>> COLLATE of the SQL_Latin1_General_CP1_CI_AI type and
when
>> executing this marks an error to me and it solved it
>> adding at the end of the sentence that the COLLATE of a
>> single type, but that is not what I look for but what I
>> would like that somebody explains to me in case a type
of
>> COLLATE exists that can support to all the types like a
>> UNICODE or something similar. It is for this reason
that I
>> need to know if it is possible to do that single collate
>> accepts all type of characters. Thanks.
>
>.
>|||Unicode is the datatype (actually nvarchar, nchar and ntext). You then pick a collation to go with it. Seems
like Hungarian_CS_AI should be the one to use, as the other is "general", hence shouldn't care how the
"extended" characters are sorted etc.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Miramontes" <anonymous@.discussions.microsoft.com> wrote in message
news:1b69901c44fba$dffe8fd0$a001280a@.phx.gbl...
> Do you now the name for this type of collate for
> unicode ?, because i need that unicode.
> Thanks in advanced.
> >--Original Message--
> >So why not use Unicode?
> >
> >--
> >Tibor Karaszi, SQL Server MVP
> >http://www.karaszi.com/sqlserver/default.asp
> >http://www.solidqualitylearning.com/
> >
> >
> >"Miramontes" <anonymous@.discussions.microsoft.com> wrote
> in message
> >news:1afb001c44f3f$e3dad580$a401280a@.phx.gbl...
> >> Greetings to all. It would thank for much to them if
> they
> >> could help me with a problem, that is the following
> one: I
> >> have a data base in a server x with a table with a field
> >> that has the COLLATE in Hungarian_CS_AI, and at the time
> >> of concatenating this field with a field that has the
> >> COLLATE of the SQL_Latin1_General_CP1_CI_AI type and
> when
> >> executing this marks an error to me and it solved it
> >> adding at the end of the sentence that the COLLATE of a
> >> single type, but that is not what I look for but what I
> >> would like that somebody explains to me in case a type
> of
> >> COLLATE exists that can support to all the types like a
> >> UNICODE or something similar. It is for this reason
> that I
> >> need to know if it is possible to do that single collate
> >> accepts all type of characters. Thanks.
> >
> >
> >.
> >

Sunday, March 11, 2012

Code Sample for SSIS Script Component

Greetings,

I have been developing VBA apps in Access and Excel for sometime and am fairly proficient in VBA. Now we are moving all of our data to SQL Server 2005. I am in need of learning how to write code for the Script Component of a data flow task. And so I have a couple of questions.

First, are there any books you recommend for learning ? (I'm not even sure what I need to learn: .NET? ADO.NET?)

And as a follow-up, any good websites that provide good reference documentation?

And my second question is more specific to my current problem. If I had a bit of code to get me started, I'm sure I could scream all the way to the bottom of the hill.

    Data source is coming from a sort task where the data is sorted by STATUS and then MOD_DATE and the AUDIT_ID. I need to read each row and compare it to the next row. If STATUS is the same, discard the second row. When STATUS is different, send the first row to the output (to be used by the next task in the data flow). Using the "different" row from step 3, go to step 2.

I know how to write if statements, case statements, for/next statements. I'm just not understanding how to read the rows in and then send them back out. I've been searching for some sample code but everything I find tends to be solving much bigger issues.

Any help you can provide would be much appreciated.

Rob

1.
Which kind of book do you need ? T-SQL or SQL-CLR integration ?
For T-SQL I suggest you to buy a good basic book from amazon (that ha a good rating) just to learn the basics and then the buy the following two monuments by Itzik Ben-gan (MS Press)
INSIDE SQL SERVER 2005: T-SQL QUERYING
INSIDE SQL SERVER 2005: T-SQL PROGRAMMING
They are really hard... I don't know anything better.
For the second I suggest PRO SQL SERVER 2005 ASSEMBLY by Dewson (Apress)

2.
http://www.sql-server-performance.com
http://www.sqlservercentral.com
Google...

3.
can you explain better ? are you trying to code it in T-SQL or are you trying with a CLR stored procedure ? In the second case to send back a row you may use Pipe.Send or Pipe.ExecuteAndSend methods.

__

? www.carlop.com × carlop-dev.blogspot.com

|||

carlop wrote:


3.
can you explain better ? are you trying to code it in T-SQL or are you trying with a CLR stored procedure ? In the second case to send back a row you may use Pipe.Send or Pipe.ExecuteAndSend methods.

carlop - thank you for the book suggestions. I'll check them out.

Here is a sample of data. I am after capturing each row when the STATUS changes (highlighted in yellow). A total of six rows: one each of Not Ready, Hold and Complete and three of Active. All of the other rows will be discarded.

I'm thinking this is best done with a CLR procedure, however, I'm open to suggestions.

Rob

AUDIT_ID OBJECTID MODIFIED_DATE STATUS 2753029 124248079 4/26/2007 11:30 Active 2753035 124248079 4/26/2007 11:30 Active 2753076 124248079 4/26/2007 11:33 Active 2754823 124248079 4/26/2007 14:31 Not Ready 2794102 124248079 4/27/2007 7:29 Not Ready 2817836 124248079 4/27/2007 17:06 Active 2817859 124248079 4/27/2007 17:09 Active 2818286 124248079 4/27/2007 18:00 Hold 2818473 124248079 4/27/2007 18:38 Active 2818483 124248079 4/27/2007 18:44 Active 2989403 124248079 5/1/2007 7:14 Active 3022521 124248079 5/1/2007 7:19 Active 3042121 124248079 5/1/2007 10:45 Complete 3082880 124248079 5/2/2007 7:07 Complete