Showing posts with label hihow. Show all posts
Showing posts with label hihow. Show all posts

Sunday, March 25, 2012

case sensitive sql

Hi
how can i use the sensive case in a select field from table where fild='GhhY' ?



I think you'd have to do character by character comparison using SUBSTRINGs and UPPER/LOWERs unless someone else here has a better solution.|||select * from TABLE where cast(fild as varbinary) = cast('GhhY' as varbinary)

Nicksql

Tuesday, March 20, 2012

case insensitive

Hi
How do I see if my MS-SQL Server is case insensitive
Br
Henning
Check out sp_helpdb in the BOL.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"H.Gjerde" <hg@.norspace.no> wrote in message
news:ua6aVELuHHA.3544@.TK2MSFTNGP03.phx.gbl...
Hi
How do I see if my MS-SQL Server is case insensitive
Br
Henning
|||> How do I see if my MS-SQL Server is case insensitive
One method:
IF 'A' = 'a'
PRINT 'case insensitive'
ELSE
PRINT 'case sensitive'
Hope this helps.
Dan Guzman
SQL Server MVP
"H.Gjerde" <hg@.norspace.no> wrote in message
news:ua6aVELuHHA.3544@.TK2MSFTNGP03.phx.gbl...
> Hi
> How do I see if my MS-SQL Server is case insensitive
> Br
> Henning
>
|||Thank You, simple as that
"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
news:64F599D2-AEC8-44D6-949F-F06B3EB5CEF4@.microsoft.com...
> One method:
> IF 'A' = 'a'
> PRINT 'case insensitive'
> ELSE
> PRINT 'case sensitive'
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "H.Gjerde" <hg@.norspace.no> wrote in message
> news:ua6aVELuHHA.3544@.TK2MSFTNGP03.phx.gbl...
>
|||My SQL is then case sensitive
How do I do-it case INsensitive? Is it simple?
One base I must install, must have it case insenitive
br
Henning
"H.Gjerde" <hg@.norspace.no> wrote in message
news:%23Ryjz0LuHHA.3688@.TK2MSFTNGP03.phx.gbl...
> Thank You, simple as that
>
>
> "Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
> news:64F599D2-AEC8-44D6-949F-F06B3EB5CEF4@.microsoft.com...
>
|||"H.Gjerde" <hg@.norspace.no> wrote in message
news:ub1Np9LuHHA.484@.TK2MSFTNGP06.phx.gbl...
> My SQL is then case sensitive
> How do I do-it case INsensitive? Is it simple?
> One base I must install, must have it case insenitive
> br
> Henning
You can specify the collation for a database when you create it.
create database newdb ... collate <collation name> ...
You'll also have to watch out for joining between different collations if
change some but not others.
If you intend to create objects in your new database based on objects in
your old database, be sure to remove any collation clauses from your scripts
so that the newdb's default collation will be used instead of being
overridden by something in the scrip.

> "H.Gjerde" <hg@.norspace.no> wrote in message
> news:%23Ryjz0LuHHA.3688@.TK2MSFTNGP03.phx.gbl...
>
Posted via a free Usenet account from http://www.teranews.com
|||again, thank you
henning
"DH" <dh@.stargate.com> wrote in message
news:4682615b$0$7122$88260bb3@.free.teranews.com...
> "H.Gjerde" <hg@.norspace.no> wrote in message
> news:ub1Np9LuHHA.484@.TK2MSFTNGP06.phx.gbl...
> You can specify the collation for a database when you create it.
> create database newdb ... collate <collation name> ...
> You'll also have to watch out for joining between different collations if
> change some but not others.
> If you intend to create objects in your new database based on objects in
> your old database, be sure to remove any collation clauses from your
> scripts so that the newdb's default collation will be used instead of
> being overridden by something in the scrip.
>
>
>
> --
> Posted via a free Usenet account from http://www.teranews.com
>

case insensitive

Hi
How do I see if my MS-SQL Server is case insensitive
Br
HenningCheck out sp_helpdb in the BOL.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"H.Gjerde" <hg@.norspace.no> wrote in message
news:ua6aVELuHHA.3544@.TK2MSFTNGP03.phx.gbl...
Hi
How do I see if my MS-SQL Server is case insensitive
Br
Henning|||> How do I see if my MS-SQL Server is case insensitive
One method:
IF 'A' = 'a'
PRINT 'case insensitive'
ELSE
PRINT 'case sensitive'
Hope this helps.
Dan Guzman
SQL Server MVP
"H.Gjerde" <hg@.norspace.no> wrote in message
news:ua6aVELuHHA.3544@.TK2MSFTNGP03.phx.gbl...
> Hi
> How do I see if my MS-SQL Server is case insensitive
> Br
> Henning
>|||Hi
Run sp_helpdb
in the result of sp_helpdb's status column if Collation says XX_CI_xx then
its case insensitive
Regards
VT
Knowledge is power, share it...
http://oneplace4sql.blogspot.com/
"H.Gjerde" <hg@.norspace.no> wrote in message
news:ua6aVELuHHA.3544@.TK2MSFTNGP03.phx.gbl...
> Hi
> How do I see if my MS-SQL Server is case insensitive
> Br
> Henning
>|||Thank You, simple as that
"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
news:64F599D2-AEC8-44D6-949F-F06B3EB5CEF4@.microsoft.com...
> One method:
> IF 'A' = 'a'
> PRINT 'case insensitive'
> ELSE
> PRINT 'case sensitive'
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "H.Gjerde" <hg@.norspace.no> wrote in message
> news:ua6aVELuHHA.3544@.TK2MSFTNGP03.phx.gbl...
>|||My SQL is then case sensitive
How do I do-it case INsensitive? Is it simple?
One base I must install, must have it case insenitive
br
Henning
"H.Gjerde" <hg@.norspace.no> wrote in message
news:%23Ryjz0LuHHA.3688@.TK2MSFTNGP03.phx.gbl...
> Thank You, simple as that
>
>
> "Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
> news:64F599D2-AEC8-44D6-949F-F06B3EB5CEF4@.microsoft.com...
>|||"H.Gjerde" <hg@.norspace.no> wrote in message
news:ub1Np9LuHHA.484@.TK2MSFTNGP06.phx.gbl...
> My SQL is then case sensitive
> How do I do-it case INsensitive? Is it simple?
> One base I must install, must have it case insenitive
> br
> Henning
You can specify the collation for a database when you create it.
create database newdb ... collate <collation name> ...
You'll also have to watch out for joining between different collations if
change some but not others.
If you intend to create objects in your new database based on objects in
your old database, be sure to remove any collation clauses from your scripts
so that the newdb's default collation will be used instead of being
overridden by something in the scrip.

> "H.Gjerde" <hg@.norspace.no> wrote in message
> news:%23Ryjz0LuHHA.3688@.TK2MSFTNGP03.phx.gbl...
>
Posted via a free Usenet account from http://www.teranews.com|||again, thank you
henning
"DH" <dh@.stargate.com> wrote in message
news:4682615b$0$7122$88260bb3@.free.teranews.com...
> "H.Gjerde" <hg@.norspace.no> wrote in message
> news:ub1Np9LuHHA.484@.TK2MSFTNGP06.phx.gbl...
> You can specify the collation for a database when you create it.
> create database newdb ... collate <collation name> ...
> You'll also have to watch out for joining between different collations if
> change some but not others.
> If you intend to create objects in your new database based on objects in
> your old database, be sure to remove any collation clauses from your
> scripts so that the newdb's default collation will be used instead of
> being overridden by something in the scrip.
>
>
>
> --
> Posted via a free Usenet account from http://www.teranews.com
>sql

Wednesday, March 7, 2012

carrier return + line feed in a varchar

Hi

how can I split a line into 2 lines in t-sql. etc
Set @.text1 = 'here's line one' + (carriere return + line feed) + 'here's line two'

I will be using it to send a mail from sql server (2000 sp4), so i can build a nice looking mail

> Set @.text1 = 'here's line one' + (carriere return + line feed) + 'here's

> line two'

Set @.text1 = 'here''s one line' + CHAR(13) + CHAR(10) + 'here''s line two';

|||thanks a lot