|
hi,
tusha wrote: develop import export
if you are familier with .Net
Why dont you develop a .Net Windows application that will recieve excel files to import or export excel files from or to the database,or Develop an app to that will display a table or results from a query in a listview and export it to Excel or let the user input the data so the App will save it in the table.
and if you are not may be we can help.
|
|
|
|
|
Hi experts..im new to sql and i wrote this stored procedure for number to character conversion..
intially i have taken one numeric parameter and i have converted into varchar to display in words..
But i want to do one more modifications to this code..if i entered 500 then it shuld be treated
as 500 dollors and should be multplied with 45 and the result should be = 500 * 45.
But im returning varchar value..how to multiply with '45'. im getting data type conversion error..
Here im sending my code upto ten thousand only.. and return statement..
pls solve the problem..and thanks in advance..
@p_Number numeric(18,2) --> Parameter...
begin
declare @Num varchar(20)
declare @Dec varchar(3)
declare @Return varchar(2000)
set @Return = convert (varchar(2000),@p_Number)
set @Dec = substring(convert(varchar(20),@p_Number),len(convert(varchar(20),@p_Number))-2,3)
set @Num = substring(convert(varchar(20),@p_Number),1,len(convert(varchar(20),@p_Number))-3)
declare @Hundred Char(8)
declare @HundredAnd Char(12)
declare @Thousand Char(9)
declare @Lakh Char(5)
declare @Lakhs Char(6)
declare @Crore Char(6)
declare @Crores Char(7)
set @Hundred = 'Hundred '
set @Thousand = 'Thousand '
set @Lakh = 'Lakh '
set @Lakhs = 'Lakhs '
set @Crore = 'Crore '
set @Crores = 'Crores '
set @HundredAnd = 'Hundred and '
if len(@Num) = 1 -- One
begin
set @Return = testuser.fn_GetTextValue_arif(@Num)
end
else
if len(@Num) = 2 -- Ten
begin
set @Return = testuser.fn_GetTextValue_arif(@Num)
end
else
if len(@Num) = 3 -- Hundred
begin
set @Return = testuser.fn_GetTextValue_arif(substring(@Num,1,1)) + @Hundred
if substring(@Num,2,2) <> '00'
set @Return = @Return + 'And '
set @Return = @Return + testuser.fn_GetTextValue_arif(substring(@Num,2,2))
if substring(@Num,2,2) = '00'
set @Return = testuser.fn_GetTextValue_arif(substring(@Num,1,1)) + @Hundred
end
else
if len(@Num) = 4 -- thousand
begin
set @Return = testuser.fn_GetTextValue_arif(substring(@Num,1,1)) + @Thousand
if substring(@Num,2,1) <> '0'
set @Return = @Return + testuser.fn_GetTextValue_arif(substring(@Num,2,1)) + @Hundred
if substring(@num,3,2) <> '00'
set @Return = @Return + 'And '
set @Return = @Return + testuser.fn_GetTextValue_arif(substring(@Num,3,2))
if substring(@num,2,1) = '0' and substring(@num,3,2) = '00'
set @Return = testuser.fn_GetTextValue_arif(substring(@Num,1,1)) + @Thousand
end
else
if len(@Num) = 5 -- Ten Thousand
begin
set @Return = testuser.fn_GetTextValue_arif(substring(@Num,1,2)) + @Thousand
if substring(@Num,3,1) <> '0'
set @Return = @Return + testuser.fn_GetTextValue_arif(substring(@Num,3,1)) + @Hundred
if substring(@num,4,2) <> '00'
set @Return = @Return + 'And '
set @Return = @Return + testuser.fn_GetTextValue_arif(substring(@Num,4,2))
if substring(@num,3,1) = '0' and substring(@num,4,2) = '00'
set @Return = testuser.fn_GetTextValue_arif(substring(@Num,1,2)) + @Thousand
end
if @Dec <> '.00'
set @Return = @Return + 'And ' + testuser.fn_GetTextValue_arif(substring(@Dec,2,2)) + 'Paise '
select '$' + @Return + 'Only' as 'MoneyInWords' ---> Retrun value...
|
|
|
|
|
GBal wrote: But i want to do one more modifications to this code..if i entered 500 then it shuld be treated
as 500 dollors and should be multplied with 45 and the result should be = 500 * 45.
But im returning varchar value..how to multiply with '45'. im getting data type conversion error..
Have you considered performing the multiplication before you convert the number into words?
ColinMackay.net
Scottish Developers are looking for speakers for user group sessions over the next few months. Do you want to know more?
|
|
|
|
|
Hi,
I need A command in SQL 2000 so that i can retrive data by partitions just like in MySql with the limit cmd.
I've tried TOP or TOP Percent or Set Rowcount but i need a command that will give me just a portion of the data each time i call it just like this
//first call
select *<br />
from any_table<br />
Limit 0,30
//second call
select *<br />
from any_table<br />
Limit 31,60
Thanks in adv
|
|
|
|
|
select top 30 * from any_table where sort_field > whatever_value order by sort_field
----------
There go my people. I must find out where they are going so I can lead them.
- Alexander Ledru-Rollin
|
|
|
|
|
Good day everyone,
need help again. on my database i have 5 different record but they have same Venue field name...
i need to get the first record that was inputed to the database and display on the screen.
next, on how to display the 4 remaining records. using sql 2000
|
|
|
|
|
welbert wrote: on my database i have 5 different record but they have same Venue field name...
Do you mean that in a table you have 5 rows with the same Venue column value? I'm trying to clarify because SQL Server 2000 will not permit you to have the same column name 5 times in one table.
welbert wrote: i need to get the first record that was inputed to the database and display on the screen.
Do you have any columns that indicate the order that the row was inserted into the table? e.g. a column representing an incrementing id, or a datetime column that represents when the data was inserted?
ColinMackay.net
Scottish Developers are looking for speakers for user group sessions over the next few months. Do you want to know more?
|
|
|
|
|
Good day to all,
Need help on how to display one record with same data to the other record but different reference id... using sql 2000
more power and thanks
-- modified at 20:42 Sunday 5th March, 2006
|
|
|
|
|
welbert wrote: Need help on how to display one record with same data to the other record but different reference id... using sql 2000
You are going to have to explain better because I don't know what you mean.
Do you mean you want to know what rows in a table contain duplicate data but where the primary keys are different?
ColinMackay.net
Scottish Developers are looking for speakers for user group sessions over the next few months. Do you want to know more?
|
|
|
|
|
Hai
I've installed SQlServer 2000 and SQLServer 2005 side by side. Instances named as SQL2000 and SQL2005 on installtion time. Now i have to make SQL server 2005 as default instance. So that it will work with connection string
"Server=(local); database=MyDB; uid=sa; pwd="
Now i need to keep my connection string as
"Server=.\SQL2005; database=MyDB; uid=sa; pwd="
How can i solve this problem.
|
|
|
|
|
Hi all,
I hope someone can help with this relatively simple problem.
I am building a timesheet application using ASP.NET C# with Visual
Studio 2003.As it is only a protoype application, my database has been
made in MSDE.
I have a 'View Resources' page, the purpose of which is to show all
employees, taken from that table in the database. This works fine, up
to a point. I have a DataGrid, which is done with a DataSet and a
DataAdapter. I now want the user to be able to 'filter' the DataGrid,
using a text box for input, and a 'search' button. I have tried
different ways of doing this but can't get it to work. I imagine that
it is achieved by running some kind of different SQL statement (with a
% LIKE % operator) in the btnSearch_Click method, and re-binding the
Data Grid after the filter has finished.
So for example the user could enter 'John' in the 'First Name' text box
and click 'search', and the Data Grid would refresh accordingly with
all records LIKE 'John'.
My Page_Load code looks like this currently
-------------------------------------------------------------------------
this.sqlDataAdapter1.Fill(this.dsResources1);
DataGrid1.DataBind();
sqlConnection2.Close();
this.DataGrid1.PageIndexChanged += new
System.Web.UI.WebControls.DataGridPageChangedEventHandler(this.GridPageIndexChanged);
--------------------------------------------------------------------------------------------
Hope someone can help, I'm sure the btnSearch_Click method is where I
need to put the code.
Thanks in advance,
Al
|
|
|
|
|
Hi:
I have a table for employees and i want to write a query that will return the no of the employee that has a duplicate name.
so i need to get each name and run a check if it matches any other.
but how i can do this in SQL
SELECT emp_no from employee where name IN (SELECT name from Employee where !??)
I am trying to figure it out so can any one help.
|
|
|
|
|
Hi,
Try this query ....
<br />
SELECT emp_no,name<br />
FROM Employee<br />
WHERE name IN<br />
(<br />
SELECT name FROM Employee<br />
GROUP BY name Having Count(*)>1<br />
)
I hope this will help u.........
Regards,
Ritesh
|
|
|
|
|
|
Is there a way to append to a column in MySQL, or if you know how to in SQL I might be able to find the way. I am trying to use budders to write to the database slowly.
Thanks for the help!
|
|
|
|
|
I Have Made On Project in VB.Net That Converts Oracle Database to An XML File.I have Had DOne it But what i am doin that I Provide My Database Name In TextBox and Then Click CreateXML button and that database XML is created.
Now I want That Instead Of Writing Manually the Name Of My Database Should be Visible On My Windows Form.Means All The Databases With Their Particular Tables Should Be Visible on my windows Form So that i can Select any and then can create its XML.
The Project is ALready Delayed so pls Reply Fast.Thank you.
Kamran Aslam Bhatti
Engineer Kamran Aslam Bhatti
From Hyderabad-Sindh-Pakistan
|
|
|
|
|
Maybe you can read in all the tables from the database, display them in a listbox, combobox etc. When it comes time to write the XML files only write the data from those tables.
|
|
|
|
|
i load datatable into a grid, the grid is added, edited. Now i put into the grid a new row with the same key as another row. I have used Rowchanged and Columnchanged Events. But after it messaged the error as i gave, it message a error message from System.
I want to turn of it. How can i do that? Please help me!
superdragon
|
|
|
|
|
Don't cross-post. It's considered very rude.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I just want to install the visual studio 2005 in my machine in home and it's working but when i install SQLserver 2005 developer edition i cant get a hold of Enterprise manager nor SQL Server managment Studio .
guys can any one just tell me what is miising or required
I have WindowsXP SP2 and i dont get any errors while installing and i've installed many times with differnt setting but neither of them will give me :start-->all programs-->Microsoft SQL Server 2005-->(only configuration tools and no SQL Server Managment Studio).
Thanks for your Help,(in adv.)
|
|
|
|
|
SQL doesn't fully support Windows XP SP2. Read the installation guide, it is clearly stated.
|
|
|
|
|
ExpertComing wrote: SQL doesn't fully support Windows XP SP2
Well Mr. I have 3 Computers with XP SP2 installed and I can Install it in my Laptop which runns on XP SP2 and also in my old P4 computer it is installed and running perfectly but with this new computer P4 3.4Ghz with Hyper Threading I cant Install it (only client and connectivity tools) So i really have no idea why is this happenning.
Thanks
|
|
|
|
|
XP Home Edition SP2 will work with SQL Server 2005 Developer Edition, only.
XP Pro SP2 will work with SQL Server 2005 Developer, Standard, Workgroup, Express, and Evaluation Editions. It will NOT work with the Enterprise Edition.
For anything further, you'll have to read the RequirementsSQL2005.htm file that comes on the installation disk.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello all,
In our office we are using a single SQL server for database and it is installed on separate system. We are using ASP.Net as the front-end. Almost 10-15 systems are accessing the database server at a time, and very frequently we are getting "Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. " Is there any problem with our ASP.Net code or else is this problem from the database end? We are closong all the Data Readers and data base connections immediately. even the we are getting this kind problem very often.
Please help me out to solve this problem
thanks in advance
Naga Raju Epuri
|
|
|
|
|
Hello,
I am just trying to get some familiartity with ASP.NET website
Administration Tool and set up few users and roles. I launched the tool
and clicked on provider configuration link and it goes to the page that
has the link "Select a single provider for all site management data "
and then I clicke on it and it takes me to the page that has
AspNetSqlProvider radio button checked. I clicked on the link, test to
test the connection but its taking long to connect and finally it
couldn't connect to the database. I am not sure what credentials its
using to connect to the database.
This is the link I just copy and pasted thinking it might give any
inside of it.
http://localhost:1472/asp.netwebadminfiles/providers/ManageConsolidat...
When I used windows authentication to connect to the Managment Studio I
had no problem connecting to it. But I am not sure if the above process
trying to connect to the SQL Express by default. If it was then it
makes it sense. Becauase I have deleted SQL Express on my machine
before installing Sql Server 2005 Developer Edition.
If thats the case how do I can connect to the SQL Server 2005 from
the tool? Do I need to setup any think on my machine to have it
connected to the SQL Server 2005?
Any input is greatly appriciated.
Thanks
-L
|
|
|
|
|