Showing posts with label text. Show all posts
Showing posts with label text. Show all posts

Friday, March 30, 2012

Is VARCHAR data type same as UTF-8?

Hello
Is data fields of varchar type internally encoded as UTF-8?
How is cyrillic text stored in varchar data fileds, as UTF-8 or not?No. Char, Varchar and Text are a CodePage representation.
If you don't want to have a lot of problems with Cyrillic and other things
like the Euro symbol; you should use nchar, nvarchar and ntext instead.
See:
http://msdn.microsoft.com/library/d...ataencoding.asp
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: http://cerbermail.com/?QugbLEWINF
<s_alexander04@.list.ru> wrote in message
news:1143694534.065217.68140@.i40g2000cwc.googlegroups.com...
> Hello
> Is data fields of varchar type internally encoded as UTF-8?
> How is cyrillic text stored in varchar data fileds, as UTF-8 or not?
>|||You can check windows region ,SQL Server settings and Database,Column
Collation.
To support globalization, you use Unicode data type such as
nchar,nvarchar,ntext.
"s_alexander04@.list.ru"?? ??? ??:

> Hello
> Is data fields of varchar type internally encoded as UTF-8?
> How is cyrillic text stored in varchar data fileds, as UTF-8 or not?
>

is too long. Maximum length is 128. Error

I try to Update a field of a table using this statement

UPDATE Table SET field="Forget......(long text)" WHERE id=1

and I get this error

The identifier that starts with 'Forget your busexcursions. Marta Patiño takes a trip out of this world at LaLaguna's Science Museum.In April 2001, De' is too long. Maximum length is 128.

What is wrong?

Looks like the "field" column in your table is defined to hold a maximum of 128 characters of data. Update your table definition to make the column bigger or reduce the size of your data.

Bill

|||Literal text is enclosed in single quotes. Identifiers (Like column names) may be enclosed in double quotes. Because you've put the text in double quotes, it is saying that your column name (That whole block of text) is too long.|||

If you use a t-sql statement like

Update Models Set LocalDescription = "General Description" Where ModelId = 2

And if you have LocalDescription and "General Description" as the name of the fields you will update one field with orders value.

"" points to an identifier (a field name) is up to 128 characters.

If you are trying to set a field with a value more than it is expecting you will get "string or binary data would be truncated" error message.

Eralper

http://www.kodyaz.com

Wednesday, March 28, 2012

Is this query possible?

Hi folks.

So I have a table which stores the following information:

a recordID (PK)
a regionID
a month (in text; such as "January 2005")
and other fields which probrably aren't important to know for this question.

The table can have more than one record for each region and month in question. The problem is for the report I want to pull up ONLY the last record for each region for the month. I got around this by doing a seperate query for each region (5 total). Now I have to do the totals for all regions combined. I could do this math using the array but I was wondering if I was able to do a query to do it for me.

So, I want to query the database and retreive 1 record. That record would contain aggragate data from each of the regions (the last record for each region and the month in question).

I might not be asking the right question, which aludes that I might not understand the problem or capabilities of SQL (newbie).

Thanks,
Douglas.If I am following you correctly, I'd try something like this:


SELECT
myTable.regionID,
myTable.month
FROM
myTable
INNER JOIN
(
SELECT
regionID,
max(recordID) AS recordID
FROM
myTable
GROUP BY
regionID
) AS SQ ON myTable.recordID = SQ.recordID

Terri|||That was perfect. Thank you.
I forgot to say thanks. Actually, I didn't even know that was an option. I use this sort of stuff a ton now.
Douglas.

Monday, March 26, 2012

Is this possible?

Hello,

Is it possible to have a lable and text boxes right on the top of a parameter? Just like this.

Last: week month 90 days year

So that when a user clicks one of the link, the value in the parameter will be changed accordingly.

Sincerely,

Amde

You should be able to add textboxes with drillthrough actions that re-run the same report with different parameters.|||

hey Bob,

I am clear that I have to add textboxes with drillthrough actions. But here is the thing:

I have given a requirement to design the report layout and create the report.

the report should look like this when previewed:

Last: week month 90 days year

From: 4/25/2006

To: 5/2/2006

So for last week (when I click "week"), if I am running the report today, the From and To parameter should be populated with those values and generate the report for the specified date. Don't worry,I know how to got those values, but my question is as follow:

Assume that From and To are report parameter, how can I add the lable "Last" just on the top of the parameters as it is shown in the above. Please let me know if you have any other approach of implementing this requirement.

Sincerely,

Amde

|||The current version does not support customization of the parameter interface.

Is this possible with SSRS?

Hi. We currently have about a 100 Crystal Reports with embedded images and text in the *.rpt files. If we were to switch to SSRS 2005,
Can we do a global search-and-replace of images and text within the SSRS reports? We have some letterheads that have names of people who might change every year or two.
Are there any tools to convert Crystal Reports *.rpt files to SSRS reports? These 100 reports would be time-consuming trying to convert to SSRS.
Thank you much
Alex

1. Yes.

2.

I’ve been asked many times if Microsoft provide a tool for converting legacy Crystal Reports to SQL Server Reporting Services. The answer is no. However I do know someone who does.

Hitachi Consulting has an RDL generator that will generate RDL from Crystal Report formats. They’re in the States but I’m sure they’ll be able to help UK customers.

You can find a link to their site from this list of all our Reporting Services consulting partners: http://www.microsoft.com/sql/reporting/partners/consulting.asp[/quote]

http://blogs.technet.com/mat_stephen/archive/2005/02/01/convert-crystal-reports-to-sql-server-reporting-services.aspx

|||

1. Unlike Crystal, SSRS has an open XML-based report definition language. So, you can either use a file utility to search and replace or programaitcally load the report definition, e.g. in XMLDOM, with more involved requirements.

2. To my understanding, Business Objects doesn't currently let third-party vendors to offer migration tools. Instead, most companies do this as a service where you pay the company to convert the reports for you. This is actually a good possibility for outsourcing. Greg provided links to some vendors.

Is this possible with Full Text Indexing?

(SQL Server 2000, SP4)
Hello all!
I am wrestling with a problem that I hope someone can help me with. I have
a series of related tables (fairly normalized), each of which has a textual
column whose data will, for the most part, be unique from the other tables.
We have created a Full Text Catalog over these tables that will index these
text columns.
We are trying to write an interface to search over the entire "suite" of
tables, using an expression like "A and B" or "A or B". The problem arises
when we try and craft the appropriate query using the Full Text CONTAINS
predicate.
For example, lets say that we have Shape, Color, and Size tables. If
someone tries to search for "Circle or Red", I can pretty easily find the
appropriate records from each of the tables. However, if I try and search
for "Circle and Red", I'm having a more difficult time expressing the query
to restrict the results to only those records that match.
It's almost like I need a Full Text Catalog over the *entire* set of tables.
Working with the individual tables is giving me fits.
Any help/advice would be *much* appreciated. Thanks!
John Peterson
In SQL 2005 you can create an indexed view over all tables and the full text
index the view. In SQL 2000 I think you best bet would be to create a table
which would contain the rows from all tables, full-text index it, and then
search it.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"John Peterson" <j0hnp@.comcast.net> wrote in message
news:u26x%23Sy8GHA.4084@.TK2MSFTNGP05.phx.gbl...
> (SQL Server 2000, SP4)
> Hello all!
> I am wrestling with a problem that I hope someone can help me with. I
> have a series of related tables (fairly normalized), each of which has a
> textual column whose data will, for the most part, be unique from the
> other tables. We have created a Full Text Catalog over these tables that
> will index these text columns.
> We are trying to write an interface to search over the entire "suite" of
> tables, using an expression like "A and B" or "A or B". The problem
> arises when we try and craft the appropriate query using the Full Text
> CONTAINS predicate.
> For example, lets say that we have Shape, Color, and Size tables. If
> someone tries to search for "Circle or Red", I can pretty easily find the
> appropriate records from each of the tables. However, if I try and search
> for "Circle and Red", I'm having a more difficult time expressing the
> query to restrict the results to only those records that match.
> It's almost like I need a Full Text Catalog over the *entire* set of
> tables. Working with the individual tables is giving me fits.
> Any help/advice would be *much* appreciated. Thanks!
> John Peterson
>
|||Dear Hilary,
Thank you for the information! I didn't realize that SQL 2005 had that
capability (to full-text an Indexed VIEW) -- that's really neat! I'll have
to look into that a bit more...
Yeah, if we stick with SQL 2000, our thought was to build a side table as
you suggest.
Thanks again!
John Peterson
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:uhkSJm68GHA.3264@.TK2MSFTNGP04.phx.gbl...
> In SQL 2005 you can create an indexed view over all tables and the full
> text index the view. In SQL 2000 I think you best bet would be to create a
> table which would contain the rows from all tables, full-text index it,
> and then search it.
> --
> Hilary Cotter
> Director of Text Mining and Database Strategy
> RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
> This posting is my own and doesn't necessarily represent RelevantNoise's
> positions, strategies or opinions.
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
>
> "John Peterson" <j0hnp@.comcast.net> wrote in message
> news:u26x%23Sy8GHA.4084@.TK2MSFTNGP05.phx.gbl...
>
sql

Is this possible with Full Text Indexing?

(SQL Server 2000, SP4)
Hello all!
I am wrestling with a problem that I hope someone can help me with. I have
a series of related tables (fairly normalized), each of which has a textual
column whose data will, for the most part, be unique from the other tables.
We have created a Full Text Catalog over these tables that will index these
text columns.
We are trying to write an interface to search over the entire "suite" of
tables, using an expression like "A and B" or "A or B". The problem arises
when we try and craft the appropriate query using the Full Text CONTAINS
predicate.
For example, lets say that we have Shape, Color, and Size tables. If
someone tries to search for "Circle or Red", I can pretty easily find the
appropriate records from each of the tables. However, if I try and search
for "Circle and Red", I'm having a more difficult time expressing the query
to restrict the results to only those records that match.
It's almost like I need a Full Text Catalog over the *entire* set of tables.
Working with the individual tables is giving me fits.
Any help/advice would be *much* appreciated. Thanks!
John Peterson
In SQL 2005 you can create an indexed view over all tables and the full text
index the view. In SQL 2000 I think you best bet would be to create a table
which would contain the rows from all tables, full-text index it, and then
search it.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"John Peterson" <j0hnp@.comcast.net> wrote in message
news:u26x%23Sy8GHA.4084@.TK2MSFTNGP05.phx.gbl...
> (SQL Server 2000, SP4)
> Hello all!
> I am wrestling with a problem that I hope someone can help me with. I
> have a series of related tables (fairly normalized), each of which has a
> textual column whose data will, for the most part, be unique from the
> other tables. We have created a Full Text Catalog over these tables that
> will index these text columns.
> We are trying to write an interface to search over the entire "suite" of
> tables, using an expression like "A and B" or "A or B". The problem
> arises when we try and craft the appropriate query using the Full Text
> CONTAINS predicate.
> For example, lets say that we have Shape, Color, and Size tables. If
> someone tries to search for "Circle or Red", I can pretty easily find the
> appropriate records from each of the tables. However, if I try and search
> for "Circle and Red", I'm having a more difficult time expressing the
> query to restrict the results to only those records that match.
> It's almost like I need a Full Text Catalog over the *entire* set of
> tables. Working with the individual tables is giving me fits.
> Any help/advice would be *much* appreciated. Thanks!
> John Peterson
>
|||Dear Hilary,
Thank you for the information! I didn't realize that SQL 2005 had that
capability (to full-text an Indexed VIEW) -- that's really neat! I'll have
to look into that a bit more...
Yeah, if we stick with SQL 2000, our thought was to build a side table as
you suggest.
Thanks again!
John Peterson
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:uhkSJm68GHA.3264@.TK2MSFTNGP04.phx.gbl...
> In SQL 2005 you can create an indexed view over all tables and the full
> text index the view. In SQL 2000 I think you best bet would be to create a
> table which would contain the rows from all tables, full-text index it,
> and then search it.
> --
> Hilary Cotter
> Director of Text Mining and Database Strategy
> RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
> This posting is my own and doesn't necessarily represent RelevantNoise's
> positions, strategies or opinions.
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
>
> "John Peterson" <j0hnp@.comcast.net> wrote in message
> news:u26x%23Sy8GHA.4084@.TK2MSFTNGP05.phx.gbl...
>

Is this possible with Full Text Indexing?

(SQL Server 2000, SP4)
Hello all!
I am wrestling with a problem that I hope someone can help me with. I have
a series of related tables (fairly normalized), each of which has a textual
column whose data will, for the most part, be unique from the other tables.
We have created a Full Text Catalog over these tables that will index these
text columns.
We are trying to write an interface to search over the entire "suite" of
tables, using an expression like "A and B" or "A or B". The problem arises
when we try and craft the appropriate query using the Full Text CONTAINS
predicate.
For example, lets say that we have Shape, Color, and Size tables. If
someone tries to search for "Circle or Red", I can pretty easily find the
appropriate records from each of the tables. However, if I try and search
for "Circle and Red", I'm having a more difficult time expressing the query
to restrict the results to only those records that match.
It's almost like I need a Full Text Catalog over the *entire* set of tables.
Working with the individual tables is giving me fits.
Any help/advice would be *much* appreciated. Thanks!
John PetersonIn SQL 2005 you can create an indexed view over all tables and the full text
index the view. In SQL 2000 I think you best bet would be to create a table
which would contain the rows from all tables, full-text index it, and then
search it.
--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"John Peterson" <j0hnp@.comcast.net> wrote in message
news:u26x%23Sy8GHA.4084@.TK2MSFTNGP05.phx.gbl...
> (SQL Server 2000, SP4)
> Hello all!
> I am wrestling with a problem that I hope someone can help me with. I
> have a series of related tables (fairly normalized), each of which has a
> textual column whose data will, for the most part, be unique from the
> other tables. We have created a Full Text Catalog over these tables that
> will index these text columns.
> We are trying to write an interface to search over the entire "suite" of
> tables, using an expression like "A and B" or "A or B". The problem
> arises when we try and craft the appropriate query using the Full Text
> CONTAINS predicate.
> For example, lets say that we have Shape, Color, and Size tables. If
> someone tries to search for "Circle or Red", I can pretty easily find the
> appropriate records from each of the tables. However, if I try and search
> for "Circle and Red", I'm having a more difficult time expressing the
> query to restrict the results to only those records that match.
> It's almost like I need a Full Text Catalog over the *entire* set of
> tables. Working with the individual tables is giving me fits.
> Any help/advice would be *much* appreciated. Thanks!
> John Peterson
>|||Dear Hilary,
Thank you for the information! I didn't realize that SQL 2005 had that
capability (to full-text an Indexed VIEW) -- that's really neat! I'll have
to look into that a bit more...
Yeah, if we stick with SQL 2000, our thought was to build a side table as
you suggest.
Thanks again!
John Peterson
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:uhkSJm68GHA.3264@.TK2MSFTNGP04.phx.gbl...
> In SQL 2005 you can create an indexed view over all tables and the full
> text index the view. In SQL 2000 I think you best bet would be to create a
> table which would contain the rows from all tables, full-text index it,
> and then search it.
> --
> Hilary Cotter
> Director of Text Mining and Database Strategy
> RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
> This posting is my own and doesn't necessarily represent RelevantNoise's
> positions, strategies or opinions.
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
>
> "John Peterson" <j0hnp@.comcast.net> wrote in message
> news:u26x%23Sy8GHA.4084@.TK2MSFTNGP05.phx.gbl...
>> (SQL Server 2000, SP4)
>> Hello all!
>> I am wrestling with a problem that I hope someone can help me with. I
>> have a series of related tables (fairly normalized), each of which has a
>> textual column whose data will, for the most part, be unique from the
>> other tables. We have created a Full Text Catalog over these tables that
>> will index these text columns.
>> We are trying to write an interface to search over the entire "suite" of
>> tables, using an expression like "A and B" or "A or B". The problem
>> arises when we try and craft the appropriate query using the Full Text
>> CONTAINS predicate.
>> For example, lets say that we have Shape, Color, and Size tables. If
>> someone tries to search for "Circle or Red", I can pretty easily find the
>> appropriate records from each of the tables. However, if I try and
>> search for "Circle and Red", I'm having a more difficult time expressing
>> the query to restrict the results to only those records that match.
>> It's almost like I need a Full Text Catalog over the *entire* set of
>> tables. Working with the individual tables is giving me fits.
>> Any help/advice would be *much* appreciated. Thanks!
>> John Peterson
>>
>

Is this possible with Full Text Indexing?

(SQL Server 2000, SP4)
Hello all!
I am wrestling with a problem that I hope someone can help me with. I have
a series of related tables (fairly normalized), each of which has a textual
column whose data will, for the most part, be unique from the other tables.
We have created a Full Text Catalog over these tables that will index these
text columns.
We are trying to write an interface to search over the entire "suite" of
tables, using an expression like "A and B" or "A or B". The problem arises
when we try and craft the appropriate query using the Full Text CONTAINS
predicate.
For example, lets say that we have Shape, Color, and Size tables. If
someone tries to search for "Circle or Red", I can pretty easily find the
appropriate records from each of the tables. However, if I try and search
for "Circle and Red", I'm having a more difficult time expressing the query
to restrict the results to only those records that match.
It's almost like I need a Full Text Catalog over the *entire* set of tables.
Working with the individual tables is giving me fits.
Any help/advice would be *much* appreciated. Thanks!
John PetersonIn SQL 2005 you can create an indexed view over all tables and the full text
index the view. In SQL 2000 I think you best bet would be to create a table
which would contain the rows from all tables, full-text index it, and then
search it.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"John Peterson" <j0hnp@.comcast.net> wrote in message
news:u26x%23Sy8GHA.4084@.TK2MSFTNGP05.phx.gbl...
> (SQL Server 2000, SP4)
> Hello all!
> I am wrestling with a problem that I hope someone can help me with. I
> have a series of related tables (fairly normalized), each of which has a
> textual column whose data will, for the most part, be unique from the
> other tables. We have created a Full Text Catalog over these tables that
> will index these text columns.
> We are trying to write an interface to search over the entire "suite" of
> tables, using an expression like "A and B" or "A or B". The problem
> arises when we try and craft the appropriate query using the Full Text
> CONTAINS predicate.
> For example, lets say that we have Shape, Color, and Size tables. If
> someone tries to search for "Circle or Red", I can pretty easily find the
> appropriate records from each of the tables. However, if I try and search
> for "Circle and Red", I'm having a more difficult time expressing the
> query to restrict the results to only those records that match.
> It's almost like I need a Full Text Catalog over the *entire* set of
> tables. Working with the individual tables is giving me fits.
> Any help/advice would be *much* appreciated. Thanks!
> John Peterson
>|||Dear Hilary,
Thank you for the information! I didn't realize that SQL 2005 had that
capability (to full-text an Indexed VIEW) -- that's really neat! I'll have
to look into that a bit more...
Yeah, if we stick with SQL 2000, our thought was to build a side table as
you suggest.
Thanks again!
John Peterson
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:uhkSJm68GHA.3264@.TK2MSFTNGP04.phx.gbl...
> In SQL 2005 you can create an indexed view over all tables and the full
> text index the view. In SQL 2000 I think you best bet would be to create a
> table which would contain the rows from all tables, full-text index it,
> and then search it.
> --
> Hilary Cotter
> Director of Text Mining and Database Strategy
> RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
> This posting is my own and doesn't necessarily represent RelevantNoise's
> positions, strategies or opinions.
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
>
> "John Peterson" <j0hnp@.comcast.net> wrote in message
> news:u26x%23Sy8GHA.4084@.TK2MSFTNGP05.phx.gbl...
>

Wednesday, March 21, 2012

Is this an SQL problem?

Hi,

I've got a FormView to enter data into a MS SQL Server DB.But when I'm entering text like this (which gets saved into a textfield in the DB):

I'm just a guy.

And I'm standing here.

and then later try to display it again, I get:

I?m just a guy. And I?m standing here.

The apostrophe gets turned into a question mark. And the line feeds vanish or get ignored.

What's wrong and how do I prevent this?

Thanks a lot,

Jerome

hi, i am not sure if its work

but please give a try

try use Server.HtmlDecode, and Server.HtmlEncode

so from formview to database --> Server.HtmlEncode

from database to aspx --> Server.HtmlDecode

hope it does help

|||Thanks for answering! But where exactly would I have to put this?|||

its depending in your code.

let said you are trying to insert TextBox1.Text into database,

then the string insert into database will be Server.HtmlDecode(TextBox1.Text)

when you get string out from database and ready to show in the aspx page

you use Sever.HtmlEncode(stringFromDatabase)

|||Hm, ok, but I'm using a FormView ... It saves the text automatically. I didn't need to write code. And I supposed that the FormView would automatically handle the text correctly. Hm.|||

Hi,

Unforturnately, it will not handle the HTML encode. The only way to do this is call HTML encode manually using code.

Monday, March 12, 2012

Is there no longer the need to refresh in SP1

I use RS on and off and I have noticed that when I move a text field in a
report and preview it the report doesn't automatically refresh data anymore.
I'm I seeing things or is this the case, if it is then good on you MSYes, Preview caches data in SP1 (you can turn it off if needed).
See also:
http://download.microsoft.com/download/7/f/b/7fb1a251-13ad-404c-a034-10d79ddaa510/SP1Readme_EN.htm#_report_designer_preview
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"John" <John@.discussions.microsoft.com> wrote in message
news:BEA4051E-D622-4448-8D54-891F37C333C4@.microsoft.com...
> I use RS on and off and I have noticed that when I move a text field in a
> report and preview it the report doesn't automatically refresh data
anymore.
> I'm I seeing things or is this the case, if it is then good on you MS
>