Showing posts with label words. Show all posts
Showing posts with label words. Show all posts

Monday, March 12, 2012

Function to Convert Amount to Words for Check Printing

I am thinking someone out there must have already developed this....

I am using Report Services to generate checks and need to convert the $ amount into words on the "Pay To" line.

I searched Google and found a couple of VB/ASP routines that do this, but I would need to do it via a SQL Proc since the reporter does not provide the capability to reference and/or call custom VB functions from within.

Does anyone have / know of SQL function that may be publicly available or are willing to share that does this or perhaps can suggest a better way to handle?

Thanks.

If you use SQL Server Reporting Services, then you could add VB Code functions and then use it in your Expressions.

Also you could create .NET Stored procedures/user defined functions and use it in you Transact-SQL code.

|||

It is absolutely amazing. Just by typing in 'sql function amount to words' into the Google? search bar, I got back dozens of hits, these look like good possibilities.


http://www.novicksoftware.com/udfofweek/Vol1/T-SQL-UDF-Volume-1-Number-46-NumberToWords.htm
http://www.devx.com/vb2themax/Tip/19053
http://code.filehungry.com/product/languages/sql/miscellaneous/123_tsql_functions

Google? is your friend...|||

Thanks. I figured out that even though the project explorer didn't list class as a new type of item which could be added, I could add a class to the reports project via the menu.

Appreciate your help,

Annette

|||

Funny how I did exactly the same Google search and didn't get the same results (or perhaps they were not listed on the first few pages I checked (there were 10 pages of results).

Google is definitely our friend and so are people like yourself who take the time to answer these posts.


Thank you,

Annette

Friday, March 9, 2012

function or formula that convert numbers into words

Hello
I am using crystal report 9. i get total of all item purchsed by customer. what is need a any function or formula that convert numbers into words. i.e 32125 should be converted to thirty two thousand one hundred twenty five only.
With regardsCreate a formula and in forumula section (module) there were so many options like functions conversions etc and in that section look for numbers to text option and using that you can achieve what you are looking for.|||I'm not sure about CR9, but in CR10 you can use the ToWords function.

Wednesday, March 7, 2012

function for absolute day value

In other words, from whenever the calendar begins, a serial number
representing the day.
if 1/1/1904 is 1, then 1/1/1905 is 366, and so on.
is there a function in tsql to get this number from a datetime field value?billdebug wrote:
> In other words, from whenever the calendar begins, a serial number
> representing the day.
> if 1/1/1904 is 1, then 1/1/1905 is 366, and so on.
> is there a function in tsql to get this number from a datetime field value?[/color
]
SELECT DATETDIFF(DAY, /* your base date */, /* some other date */);
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--

Friday, February 24, 2012

full-text search failed with one million of key words (Sqlserver20

Hello,
I have to make big tests with sql server 2005 express (i'm waiting credits
to buy a full license).
I detected a big problem with my full-text search, and i don't know if it's
a bad use of Sql Server or if it's impossible to do it!
Here's my use case :
a table like this :
primary-key | data
1 | toto value1
2 | toto value2
3 | toto value3
...
1000001 | toto value1000001
So my table contains one millions of rows. Also, my index contains one
million+one key words : "toto" and all the "valueXXXX".
if i make those requests :
select count(primary-key) from table where contains(data,'"toto"') -> ok,
1000001
select count(primary-key) from table where contains(data,'"value5321"') ->
ok, 1
select count(primary-key) from table where contains(data,'"t*"') -> ok,
1000001
select count(primary-key) from table where contains(data,'"v"') -> KO, error
message "too complex request ect". I was expected 1000001.
Can someone help me ? I'm sure sql server 2005 can do it, but i'm also sure
i forgot an option...
Note : i work on a database who contains several millions rows, and
sometimes, users need to make some insert/update of several thousands of
rows. So they need to make very big requests to check the insert/update.
And i'm not english, so sorry for the mistakes ;-)
Thanks to all !
Hi Europa_Lili,
I assume the query you're submitting (the one that fails) actually looks like
select count(primary-key) from table where contains(data,'"v*"')
(i.e. with a * after v, meaning it's a prefix query)
SQL 2005 FTS will throw this error when the prefix identifies too many
distinct keywords that match it. What are the semantics of the query you're
trying to accomplish?
Another advice: if every row of your table contains "toto", then there's no
point in indexing it since querying for it provides no value. It will just
unnecessarily increase the size of your index. You may consider adding it to
the list of noise words. See SQL Books Online for information on noise word
files and how to change them (you'll need to re-index your data).
"Europa_Lili" wrote:

> Hello,
> I have to make big tests with sql server 2005 express (i'm waiting credits
> to buy a full license).
> I detected a big problem with my full-text search, and i don't know if it's
> a bad use of Sql Server or if it's impossible to do it!
> Here's my use case :
> a table like this :
> primary-key | data
> --
> 1 | toto value1
> 2 | toto value2
> 3 | toto value3
> ...
> 1000001 | toto value1000001
> So my table contains one millions of rows. Also, my index contains one
> million+one key words : "toto" and all the "valueXXXX".
> if i make those requests :
> select count(primary-key) from table where contains(data,'"toto"') -> ok,
> 1000001
> select count(primary-key) from table where contains(data,'"value5321"') ->
> ok, 1
> select count(primary-key) from table where contains(data,'"t*"') -> ok,
> 1000001
> select count(primary-key) from table where contains(data,'"v"') -> KO, error
> message "too complex request ect". I was expected 1000001.
> Can someone help me ? I'm sure sql server 2005 can do it, but i'm also sure
> i forgot an option...
> Note : i work on a database who contains several millions rows, and
> sometimes, users need to make some insert/update of several thousands of
> rows. So they need to make very big requests to check the insert/update.
> And i'm not english, so sorry for the mistakes ;-)
> Thanks to all !
>
|||Hello,
thanks a lot for your answer.
Research with "toto" was just a test. In real life, my database contains
some informations (text, colours, ect) about picture files . Pictures come
from big old books numerisation. (Sometimes, we've got 500 to 1000 pictures
for only one book) And the table i want to query looks like this :
primary-key | data-text | file name
| localization
1 | page 1 of a book toto | new_york_library_522 |
C:/newyork
2 | page 2 of a document | paris_library_81
| D:/library_paris 3 | image from a old
book | new_york_library_523 | C:/newyork
......
Here is a exemple of what i have to do :
we receive 500 000 files (all the old books of one library). All the files
have a name like this "NAME_LIBRARY_XXXXXXXXX" where X is a number.
And i need to select all these files to make some update actions in the
database.
I can't use the date.
so i need a query like "select * from mytable where
contains(file-name,'"NAME_LIBRARY_*"')".
And it don't work, because there's 500 000 results.
Another idea to help me ?
Have a good day and thanks for all
"denistc" wrote:
[vbcol=seagreen]
> Hi Europa_Lili,
> I assume the query you're submitting (the one that fails) actually looks like
> select count(primary-key) from table where contains(data,'"v*"')
> (i.e. with a * after v, meaning it's a prefix query)
> SQL 2005 FTS will throw this error when the prefix identifies too many
> distinct keywords that match it. What are the semantics of the query you're
> trying to accomplish?
> Another advice: if every row of your table contains "toto", then there's no
> point in indexing it since querying for it provides no value. It will just
> unnecessarily increase the size of your index. You may consider adding it to
> the list of noise words. See SQL Books Online for information on noise word
> files and how to change them (you'll need to re-index your data).
> "Europa_Lili" wrote:

Sunday, February 19, 2012

Fulltext Search

Dear Aall,
How can we search for all the key words? Is it possible to write a single
query with Freetext or Contains?
Example: if I search for 'Microsoft has released a new Operating System' I
should get the result which contains all the Key words in the phrase we
search.
Here in this example I should get the result set which contains all the key
words 'Microsoft', 'Released', 'Operating', 'System' in any order by
ignoring the noise words automatically.
Please give us your valid suggetions on this regards..
Thanks in advance
SathianHi Sathian,
Try:
http://www.experts-exchange.com/Dat...members/jtkane/
"Sathian" <sathian.t@.in.bosch.com> wrote in message
news:dg8b86$cbn$1@.ns2.fe.internet.bosch.com...
> Dear Aall,
> How can we search for all the key words? Is it possible to write a single
> query with Freetext or Contains?
> Example: if I search for 'Microsoft has released a new Operating System'
> I
> should get the result which contains all the Key words in the phrase we
> search.
> Here in this example I should get the result set which contains all the
> key
> words 'Microsoft', 'Released', 'Operating', 'System' in any order by
> ignoring the noise words automatically.
> Please give us your valid suggetions on this regards..
>
> Thanks in advance
> Sathian
>

Fulltext Search

Dear Aall,
How can we search for all the key words? Is it possible to write a single
query with Freetext or Contains?
Example: if I search for 'Microsoft has released a new Operating System' I
should get the result which contains all the Key words in the phrase we
search.
Here in this example I should get the result set which contains all the key
words 'Microsoft', 'Released', 'Operating', 'System' in any order by
ignoring the noise words automatically.
Please give us your valid suggetions on this regards..
Thanks in advance
Sathian
Hi Sathian,
Try:
http://www.experts-exchange.com/Data..._20705253.html
The code may not be perfect, but with a bit of modification, you should be
able to get it to work for you to search for all the key words.
Regards,
John
SQL Full Text Search Blog
http://spaces.msn.com/members/jtkane/
"Sathian" <sathian.t@.in.bosch.com> wrote in message
news:dg8b86$cbn$1@.ns2.fe.internet.bosch.com...
> Dear Aall,
> How can we search for all the key words? Is it possible to write a single
> query with Freetext or Contains?
> Example: if I search for 'Microsoft has released a new Operating System'
> I
> should get the result which contains all the Key words in the phrase we
> search.
> Here in this example I should get the result set which contains all the
> key
> words 'Microsoft', 'Released', 'Operating', 'System' in any order by
> ignoring the noise words automatically.
> Please give us your valid suggetions on this regards..
>
> Thanks in advance
> Sathian
>