|
Guys is there any way that i make an Float Column output into Currency Format.. withoug rounding
e.g.
Float data is:
Name Price
Ambie 505.5560
James 44.240
Nicolas .5275
Moyano 20
OUTPUT
Ambie 505.55
James 44.24
Nicolas .52
Moyano 20.00
|
|
|
|
|
Whatcha using?
Anyway, always use integers for currency, floating point just doesn't cut it.
|
|
|
|
|
Guys is there any way that i make an Float Column output into Currency Format.. withoug rounding
e.g.
Float data is:
Name Price
Ambie 505.5560
James 44.240
Nicolas .5275
Moyano 20
OUTPUT
Ambie 505.55
James 44.24
Nicolas .52
Moyano 20.00
if you trying to display in textbox or something, I think you can set the formatting display on that textbox for just only 2 decimals.
question :
do you want retrieve float data and display in currency?
OR
do you want to insert the float data with only 2 decimals?
CMIIW
Mail me at erwin@holyknight.us
|
|
|
|
|
i want to retreive float data and display in currency? but with this format #,###,##0.00... can it be?
|
|
|
|
|
I am using below sql
SELECT CategoryId,CategoryDesc
FROM TB_CategoryMaster AS Category
WHERE CategoryActive=0
ORDER BY CategoryDisplayOrder
FOR XML AUTO, ELEMENTS, TYPE
and output comes like ...
Buy * Sell instead of Buy and Sell... where * stands for amp
How i can handle the same at sql end before sending to client end,,,,
Thanks!!
|
|
|
|
|
Hi All,
How or where would i get a database script?
thansk
|
|
|
|
|
kibromg wrote: How or where would i get a database script?
Normally you would write one.
Tools like Enterprise Manager (SQL Server 2000) or the SQL Server Management Studio (SQL Server 2005) can generate scripts for you by right clicking the thing you want to script and selecting the appropriate option from the menu.
Since this question seems to come in at all the wrong angles, why do you want to know? What are you trying to achieve?
|
|
|
|
|
Hi All,
Can you please give me the steps in replication a database accessed through an IP address (forinstance Server :222.222.22.22 and login:Dat Password :***)
in to a local PC?
Thank you very much for your time.
|
|
|
|
|
I think its the fdisk command from command prompt..
naw just kidding your question doesn't make any sense.
|
|
|
|
|
I am asking how to replicate database together with the data strored in it.
Thanks
|
|
|
|
|
The best method is to have your dba give you a copy of a backup that you can restore to your SQL Express edition. Replication has to be configured on the server.
|
|
|
|
|
can anybody help me of how to take the back up of the database in linux server...
i am new to linux and mysql...Can anybody help me out in this..
Thanks in advance
|
|
|
|
|
This[^] article might help.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Thanks a lots... i will try
with regards
Philip
|
|
|
|
|
Hi, Simple code to take backup
backup database sample_1 to disk='C:\Documents and Settings\admin\Desktop\backup\full.bak'
prabumj@gmail.com
|
|
|
|
|
Hai, I have question about SQL database. I'm using C#2005
let's assume I have a database table 'TEST' with field 'myField'
TEST
----------------
Recno | myField
----------------
1 | axcel
2 | áxcel
3 | axcël
4 | axÇel
5 | áxÇèl
----------------
If I fire the command
"SELECT * FROM TEST WHERE TEST.myField LIKE '%axce%'" The query result would be
TEST
----------------
Recno | myField
----------------
1 | axcel
----------------
my Question is :
1. Is there anyway so the query result would contain all of the record instead of first record only?? I assume this has something to do with Localization class in C#. Am I right?
2. If not possible, any suggestion how to make it possible? maybe using Function in SQL Server? I'm barely new to SQL server..
thankz for the information,
if this question goes in wrong forum, please forgive me 1st..
regards
~erwin~
Mail me at erwin@holyknight.us
|
|
|
|
|
The query is returning the expected results. Only one of your five records contains the string pattern 'axce'. The other records contain different characters. You would need to modify your LIKE clause to account for accented characters.
Paul
|
|
|
|
|
wienzzz wrote: 1. Is there anyway so the query result would contain all of the record instead of first record only??
Yes.
wienzzz wrote: I assume this has something to do with Localization class in C#. Am I right?
No.
It is to do with the collation sequence set up in the database. the column is AS (Accent Sensitive)
wienzzz wrote: 2. If not possible, any suggestion how to make it possible? maybe using Function in SQL Server? I'm barely new to SQL server..
When you create the database the collation sequence should be defined as Accent Insensitive (AI). It causes more problems that it is worth to individually define columns as a specific collation.
|
|
|
|
|
further question,
When you create the database the collation sequence should be defined as Accent Insensitive (AI). It causes more problems that it is worth to individually define columns as a specific collation
can I just modify the properties after the database created?
I try to look for those properties and I couldn't find any properties related to that. Or should it be the SQL Server properties? (like in VFP to turn safety on or something like that?)
second, let's assume that I couldn't change it (because I worked on existing database which I'm not able to change the structure), can I called a function to show the field in the view definition?
well, maybe here's simple example (I'm not doing it yet)
SELECT test.myField, myFunct(test.myField) as newfield
FROM test
assume that myFunct is the function to convert all the accented character to normal character.
can it be the solution?
CMIIW
thankz for the information
regards
~erwin~
Mail me at erwin@holyknight.us
|
|
|
|
|
wienzzz wrote: can I just modify the properties after the database created?
You can modify each individual column. But it is best that it is done at database creation time - or server install time - because it can get in a complete mess if collation sequences are mixed between various columns.
|
|
|
|
|
i create new table and have feild from type image and allow null
in my program i want to ck if this field is fill or empity ??
i use c# ,,,
Palestine
|
|
|
|
|
i try this in my code and its working fine,
ex :
<br />
byte[] img = (searchContact["Photo"] == DBNull.Value) ? null : (byte[])searchContact["Photo"];<br />
searchContact is my SqlDataReader, Hope this can solve u'r problems
Best Regards,
Tomi
|
|
|
|
|
I've used variants of the following
public static T GetData<T>(IDataReader rdr, string column)
{
if (string.IsNullOrEmpty(column))
throw new ArgumentNullException("column");
if (rdr == null)
throw new ArgumentNullException("rdr");
int pos = rdr.GetOrdinal(column);
T returnValue = (rdr[pos] == DBNull.Value) ? default(T) : (T)rdr[pos];
return returnValue;
}
byte[]img = GetData<byte[]>(reader, "Photo");
string contact = GetData<string>(reader, "Contact"); My apologies if the syntax isn't 100% exact, but I'm typing this out from memory.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi everyone, I am developing one web application using C#.Net. I want to add facility for up loading the video file. When user upload video at that time I WANT TO CONVERT IT INTO WMV FORMAT for that I am using WMcmd.vbs command line WMV converter my complete line is
EXEC master..xp_cmdshell 'CScript.exe D:\setup\WMCmd_20070322\WMCmd.vbs D:\Tarun\project\1.avi D:\Tarun\project\144.wmv -v_mode 1 -v_bitrate 500000 -v_keydist 30 -v_buffer 10000 -v_quality 100 -v_preproc 5 -v_width 320 -v_height 240'
I am trying to run it into sql server and it gives message that Query executed successfully. but on system tray it will display one message like "Microsoft (R) Console Based Script Host stopped working and was closed".
So how can I execute this procedure to convert any format's file to another format's file. from command line only. or suggest me the another WMV converter which can convert movie clip to wmv format from command line. It's very urgent pls if u can then help me.
Thanks.
TarDuk - A Memory Beyond The Life.
|
|
|
|
|
Has anything been written to the event log to indicate what the error might be? Also, have you tried running the command directly to ensure that the format is 100% correct?
Deja View - the feeling that you've seen this post before.
|
|
|
|