Showing posts with label french. Show all posts
Showing posts with label french. Show all posts

Friday, March 30, 2012

query...

Hi all,

I have a table with columns:
Name, english, french, spanish, german
values (eg)
John, 20, 20, 30, 30
I want to diplay the data as:
john, 20 john, 20 john, 30 john, 30
how do i do this?

Thanx in advance..You can concatenate character compatible column values using the + operator.
In this case you will have to convert the numeric columns to VARCHAR or CHAR
do the concatenation like:

SELECT Name,
CAST( English AS VARCHAR(3) ) + SPACE( 1 ) + Name,
CAST( french AS VARCHAR(3) ) + SPACE( 1 ) + Name,
...
FROM tbl ;

As a side note, depending on your business model, it might be better to
represent language identifiers in a single column. It is more logical,
allows easier enforcement of constraints, offers better flexibility in
general querying and allows you to add more language identifiers in the
table without altering the schema.

--
Anith|||Select Name, english from table
union all
Select Name, french from table
union all
..
..
..

Madhivanan|||hey thanx :)
just what i need..|||rj wrote:
>> Hi all,
>>
>> I have a table with columns:
>> Name, english, french, spanish, german
>> values (eg)
>> John, 20, 20, 30, 30
>> I want to diplay the data as:
>> john, 20 john, 20 john, 30 john, 30
>> how do i do this?
>>
>> Thanx in advance..
>Madhivanan wrote:
> Select Name, english from table
> union all
> Select Name, french from table
> union all

Assuming english, french, spanish, and german are all in the same table,
as you stated above, it seems a simple select query can accomplish
what you want without the overhead of UNION (not sure if that's an issue):

SELECT Name, english, Name, french, Name, spanish, Name, german
FROM table

will display:
john, 20, john, 20, john 30, john, 30

Monday, February 20, 2012

query synonyms

I'm using a full text index to search organization names. My language word
breaker is French (France).
My situation is that if I search for example for a organization with the word
"meilleur" in the name ("meilleur" means "greatest" in english), the answer
that the search will give me (using freetext or formsof(inflectional))is all
the organizations with "meilleur", "bon" and "bonne" in there name. But the
thing is that my client don't want the organizations with "bon" and "bonne"
(who means "good" in english) for there answer.
I made a little search and the answer that I found is that these are synonyms
and they should be listed in my tsfra.xml file. This file looks like this :
- <XML ID="Tahoe Thesaurus">
- <!--
Commented out
<thesaurus xmlns="x-schema:tsSchema.xml">
<expansion>
<sub weight="0.8">Internet Explorer</sub>
<sub weight="0.2">IE</sub>
<sub weight="0.9">IE5</sub>
</expansion>
<replacement>
<pat>NT5</pat>
<pat>W2K</pat>
<sub weight="1.0">Windows 2000</sub>
</replacement>
<expansion>
<sub weight="0.5">run**</sub>
<sub weight="0.5">jog**</sub>
</expansion>
</thesaurus>
-->
</XML>
there's nothing that indicate that meilleur is synonyms of good.
Know I wonder is there another files somewhere who can have these synonyms?
Could it be in the Microsoft search engine?
Thanks in advance,
Nik
P.S. Sorry for my english
Message posted via http://www.droptable.com
This is hard coded in the stemmer. Unfortunately there is nothing you can do
other than to write your own stemmer.
Hilary Cotter
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
"nick via droptable.com" <forum@.droptable.com> wrote in message
news:52A31264BED2E@.droptable.com...
> I'm using a full text index to search organization names. My language
> word
> breaker is French (France).
> My situation is that if I search for example for a organization with the
> word
> "meilleur" in the name ("meilleur" means "greatest" in english), the
> answer
> that the search will give me (using freetext or formsof(inflectional))is
> all
> the organizations with "meilleur", "bon" and "bonne" in there name. But
> the
> thing is that my client don't want the organizations with "bon" and
> "bonne"
> (who means "good" in english) for there answer.
> I made a little search and the answer that I found is that these are
> synonyms
> and they should be listed in my tsfra.xml file. This file looks like this
> :
> - <XML ID="Tahoe Thesaurus">
> - <!--
> Commented out
> <thesaurus xmlns="x-schema:tsSchema.xml">
> <expansion>
> <sub weight="0.8">Internet Explorer</sub>
> <sub weight="0.2">IE</sub>
> <sub weight="0.9">IE5</sub>
> </expansion>
> <replacement>
> <pat>NT5</pat>
> <pat>W2K</pat>
> <sub weight="1.0">Windows 2000</sub>
> </replacement>
> <expansion>
> <sub weight="0.5">run**</sub>
> <sub weight="0.5">jog**</sub>
> </expansion>
> </thesaurus>
>
> -->
> </XML>
>
> there's nothing that indicate that meilleur is synonyms of good.
> Know I wonder is there another files somewhere who can have these
> synonyms?
> Could it be in the Microsoft search engine?
> Thanks in advance,
> Nik
> P.S. Sorry for my english
>
> --
> Message posted via http://www.droptable.com