|
I have to store hindi,chinese ... etc language words in my db using oracle 10g ... how can i do that..
can any one help me please..??
or atleast .. how can i do the language conversion from HINDI to english ... any sourcecode?
so that i can store english strings directly....
plzz help
regards,
Vineeth Koganti
|
|
|
|
|
n3ophyt3 wrote: I have to store hindi,chinese ... etc language words in my db
What is the problem? A string of characters has no meaning to the database, it is just characters, so you can store any language you like. It is only when you extract those characters from the database and display them that they have any meaning, e.g. a message read by a human operator.
|
|
|
|
|
Hi,
You can create a Unicode database that enables you to store UTF-8 encoded characters as SQL CHAR datatypes (CHAR, VARCHAR2, CLOB, and LONG).
For more info. please look into
http://download.oracle.com/docs/cd/B19306_01/server.102/b14225/ch6unicode.htm[^]
n3ophyt3 wrote: how can i do the language conversion from HINDI to english ... any sourcecode?
Some pseudo code
function OtherLanguage2English(value,offset)
{
var ctrlValue=value;
var english="";
for (var idx=0; idx<ctrlValue.length; idx++)
{
individualChar = ctrlValue.substring(idx,idx+1);
var code =individualChar.charCodeAt(0);
english=english+ String.fromCharCode(code-offset);
switch(offset)
{
case 2358:document.getElementById('txtEnglish').value=english;break;
}
}
}
Though it is in javascript but this function also converts Hindi to English.. So I thought that you may get some idea.
Sorry for not getting an appropriate code for your help. I will update as and when I will get the code for oracle for serving the same purpose.
Niladri Biswas
|
|
|
|
|
Gentleman:
I recently put MSSQL Server 2005 on my server running Windows 2003...it went off perfectly. I decided to replace the MSSQL 2000 that I was running on my desktop (Win XP) as well. Unfortunately, although it said that there were no errors, the Server Management Studio does not appear in the program files (or anyplace else) that I can find. The only links that appear are for the Server Configuration and the Surface Area Configuration. I tried to do a new install (on top), but the application said that all components were already installed. Before I remove the installed app and start all over, I want to know if I am missing something? Somewhere? All assistance is greatly appreciated. Pat
|
|
|
|
|
Probably you installed from a package that had only server components and no client tools. See if you can get a package that can install Management Studio.
|
|
|
|
|
Shameel,
Thank you for taking the time to respond. My install was a full Enterprise edition. I did figure out the problem and wish to share it with you (and others) because it is especially important to anyone that has installed a version of SQL 2005 Express or MS Visual Studio 2008, which automatically installs the express version. When installing over a previously installed version, any new install must be done from a DOS prompt using an update command on the command line. If this is not done, it will see the previous version as being successfully installed and will skip the install of the Database server. I have done this and it is now working perfectly. Of course, it took me the better part of a day to figure it out. Hopefully, this might save someone else that trouble. Thank you again and happy coding....Pat
|
|
|
|
|
Sir,
In my ASP.NET application I have the dashboard.
Number of records needs to be fetched from database into it. Hence,I want to write stored procedure which gives me these records using multiple Select statements. Is it possible to fetch it? If yes how it can be done.
Thanx
|
|
|
|
|
Try googling for "ado.net multiple result sets".
|
|
|
|
|
If you are trying to get multiple records from the same table them multiple selects are not required.
If you have multiple records sets coming from different table then you will need multiple selects.
WARNING multiple recordset returned from the same can destroy your system, it can be dramatically slower to get multiple recordsets.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi, coming to ur question
deepseeindeepsy wrote: Is it possible to fetch it?
Ans : Yes
I am giving a small example
Step 1: Create the Stored Proc
Alter Procedure GetMultipleRecords
As
Begin
-- First select
Select * from test1
-- Second select
Select * from test2
End
So this will give u two record sets
Step 2: Use Data Adapter & DataSet
From Asp.net application, by using DataAdapter get the records set into the DataSet
Step 3: Use respective datatable(s) from DataSet
Get the record sets from the DataSet into DataTable(some pseudo code in c#)
e.g.
DataSet ds = getDataRecords();->You will get the records from database
if(ds!=null && ds.tables.count > 0)
{
DataTable firstDt = ds.tables[0];
DataTable secondDt = ds.tables[1];
}
Hope you get the idea.
Now try by urself and I am sure you will reach the point.
Have a nice day.
Niladri Biswas
|
|
|
|
|
Hello Friends,
I've a table as shown below
ID RefID
1 0
2 1
3 2
4 1
5 1
and i want to display it's output as shown below but i'm not getting the way
please suggest a way
ID RefID Total
1 0 3
2 1 1
3 2 0
4 1 0
5 1 0
|
|
|
|
|
This is one solution if the table is small, it requires a seperate sub select for each record
Select A.ID, A.RefID, (Select count(*) from Table where RefID = ID) Total
From Table
For a more efficient method on a large table I would use a LEFT join to itself on TableA.ID = TableB.RefID then use Isnull, a case statement and count to get the same result from a large table.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Try this
declare @tbl table(id int identity, refid int)
insert into @tbl
select 0 union all select 1 union all
select 2 union all select 1 union all
select 1
select t.id,t.refid,case when x.cnt is null then 0 else x.cnt end as total
from @tbl t
left join
(
select refid,count(refid) as cnt
from @tbl
where refid <> 0
group by refid
having (count(refid)>0)) x
on t.id = x.refid
Output :
id refid total
1 0 3
2 1 1
3 2 0
4 1 0
5 1 0
Niladri Biswas
|
|
|
|
|
I have some RDL that was written using the Business Intelligence Design Studio (BIDS) in Visual Studio 2005. This report has a subreport that is visible depending upon a value in the dataset that is the source for the reports data. I have an expression in the hidden property for the subreport that returns true or false depending upon the value. The expression is like =iif(Fields!ShowSubreport.Value = 0, False, True). Anyway everything works fine in Visual Studio 2005. However, I am trying to get this report to work with VS 2008. It is my understanding that when I open this report using BIDS in VS 2008 that it will automatically convert the RDL from 2005 to 2008. It does this this changing my Lists to Tablix and other things. However, when I view the report now, I cannot see the data in the main body of the report. But if I get rid of the expression if the hidden property of the subreport, I can see everything just fine. For example, if I change the hidden property from the expression above to ‘False’ it works just fine. I have tried several different ways of writing the expression, but nothing seems to work. Does anyone know what could be causing this?
|
|
|
|
|
Hi,
i want to copy the database from one system to pen drive and then add that database to another system.
How can i achieve this ?
Thank you
|
|
|
|
|
right click on database->tasks->restore->database.
you wil get a window select the radio button From device and then click on .. you wil get another window then click on add and choose your database from the pen drive.
|
|
|
|
|
sarang_k wrote: you wil get another window then click on add and choose your database from the pen drive.
No it doesn't let me store in pen drive.
what is backup option under task if restore does this job as you said ??
|
|
|
|
|
Yes.. Removable devices will not be listed in Backup folder browser. So backup in anyfolder and then copy it to your pen drive.
Backup option means you make a compressed file that could produce the exact same database instance.
If you have a backup file you can restore it to any sql server instance easily.
Are you clear now ?
|
|
|
|
|
As sarang said, you can also create a new database on your target system from a backup, IE restore to an new database
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
1. Right click the source database, select Tasks --> Backup.
2. Specify a backup location on your hard disk.
3. After the backup process is complete, copy the backup file to your pen drive.
4. On the destination server, copy the backup file to your server's hard disk.
5. From SSMS, right click 'Databases' folder and select Tasks --> Restore. Follow the instructions from there.
|
|
|
|
|
Hi all,
I am using a SQL Server 2008 and created a procedure,but can any one tell me how to use Case in it.
Thanks in advance.
|
|
|
|
|
Case is used to implement IF - Else construct in a query. Use like this
Case <expression>
when 0 then <expression>
when 1 then <expression>
ELSE <expression>
END
Or use
CASE WHEN <expression> = 0 THEN <expression> WHEN <expression> = 1 THEN <expression> ELSE <expression> END
Therefore you can easily incorporate your logic around the select query using CASE structure.
For instance :
Select CASE WHEN AGE > 50 THEN 'AGED' ELSE 'YOUNG' END FROM RECORDS
This will produce AGED if age is greater than 50 otherwise YOUNG.
For detail see this :
http://msdn.microsoft.com/en-us/library/aa258235(SQL.80).aspx[^]
Cheers
|
|
|
|
|
If you dont want this in Select query.. inside your stored procedure.. rather you want to place a logic use
If - Else instead.
|
|
|
|
|
Am I the only person in the world that uses Google when I'm trying to find information? 2 seconds on Google will give you approximately 14 million search results about this including some very good explanations of what CASE is and what it does and how to use it. Just type "sql server case" and away you go.
|
|
|
|
|
Some people seem to find it easier to type in a question rather than trawl through 14 million results! Ah I crack me up. Just because they can find excellent examples in the first 2-3 results is no reson not to be spoon fed. Send me the codz.
Never underestimate the power of human stupidity
RAH
|
|
|
|