|
declare @sec int
set @sec=130210
select
convert(varchar(5),@sec/3600)+' Hrs : '+convert(varchar(5),@sec%3600/60)+' Min : '+convert(varchar(5),(@sec%60))+' Sec'
OR
--If 130210 is Second :
SELECT CONVERT(varchar(8), DATEADD(second, 130210 , '0:00:00'), 108)
--If 130210 is Minute :
SELECT convert (varchar(8),dateadd(minute,130210 ,'0:00:00'),108)
OR
declare @Diff int
set @Diff=130210
SELECT CONVERT(varchar(6), @Diff/3600)
+ ':' + RIGHT('0' + CONVERT(varchar(2), (@Diff % 3600) / 60), 2)
+ ':' + RIGHT('0' + CONVERT(varchar(2), @Diff % 60), 2)
Never Think That You Have Failed Instead Always Think That u hav Better Chance Next Time...
|
|
|
|
|
I have developed an application in C# and would like to deploy it on a net work.
on one machine the application is working well but other machines on the network cant access it giving this error.
"A connection attempt failed because the connected party did not properly respond after a period of time, or established connection host has failed to respond" .
If have changed the surface area configurations and used the IP address in the connection string .
what could be the problem.
Give the world the best you have, And the best will come your Way
|
|
|
|
|
Dear friends,
I am trying to install the sql server 2008 july ctp and the setup says I still have some sql server 2000 componets installed.
I am not sure what exact components its having trouble at, Heres the list of my some related components.
Microsoft .Net Framework 1.1
Microsoft .Net Framework 1.1 Hotfix (KB928366)
Microsoft .Net Framework 2.0
Microsoft Codename Astoria
Microsoft Interop Forms Toolkit 1.0
Microsoft Silverlight
Microsoft SQL Server 2005
Microsoft SQL Server 2005 Analysis Serivces ADOMD.NET
Microsoft SQL Server 2005 Backward Comaptibility
Microsoft SQL Server 2005 Books Online (English) (May 2007)
Microsoft SQL Server 2005 Performance Dashboard Reports
Microsoft SQL Server 2005 Samples
Microsoft SQL Server 2008 Native Client
Microsoft SQL Server Native Client
Microsoft SQL Server Report Pack for Internet Information Services
Microsoft SQL Server Setup Support Files (English)
Microsoft Visual Basic 2005 Express Edition - ENU
Microsoft C# 2005 Express Edition - ENU
Microsoft J# .NET Redistributable Package 1.1
Microsoft Visual Studio .NET 2003 Hotfix (KB927696)
Microsoft Visual Studio .NET Enterprise Architech 2003 - English
Microsoft Visual Studio 2005 Premier Partner Edition - ENU
Microsoft Visual Studio 2005 Toolbox Controls Installer
Microsoft Visual Web Developer 2005 Express Edition - ENU
MSXML 6.0 Parser (KB933579)
OMCI
PowerGUI 1.0.5 BETA
SQL Server 2000 DTS Designer Components
SQLXML 4
Please help me with finding all trobling components that has to be removed in order to install either SQL Server 2008 CTP CTP or Client componets of it.
Thanks,
|
|
|
|
|
Can somebody please help me with this.. Otherwise I may have to put the question in Longue!
|
|
|
|
|
Hi All,
Iam having a table like
columns
tbid menu_id1 menu_id2 menu_id3
If i inserted any new data to this table one more column say menu_id4 should be added automatically.
If i again inserts a new data to this table new column say menu_id5 should be created.
Please help me on this.
Regard's
Veeresh
|
|
|
|
|
Are you sure your table design is correct? Why do you need to change the table design every time you want to insert data?
What are menu_id1, meanu_id2 and menu_id3? Are they the same type of entity? If so, you should consider a table design composed of tbid and menu_id where the primary key is a composite of the two. Then, if you want to insert data, all you have to do is add new rows of data to the table.
Paul Marfleet
|
|
|
|
|
i was writing the function in sql server
create fucntion dbo.abc (@a int)
returns @mytable table
(
userId INT,
name VARCHAR(50),
state CHAR(2)
)
begin
end
now the question is how i can get the values like userid , name , state in the stored procedure while callig these , in stored procs
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Sonia Gupta wrote: now the question is how i can get the values like userid , name , state in the stored procedure while callig these , in stored procs
Well, you are not inserting any values to your table variable. So I assume it returns a blank table. Read this[^] article to get an idea on this.
|
|
|
|
|
CREATE FUNCTION [dbo].[FLifeId] (@itemid int ,@itemsubid int,@itemssubid int,@typeid int,@subtypeid int)
RETURNS int
AS
BEGIN
declare @lifeid int
declare @combinationid int
set @lifeid = 0
set @combinationid = 0
select @combinationid = CombinationId from tblItemsIdComposition where MCPId = @itemid and MCPSubId = MCPSubId and MCPSSubId = @itemssubid
if (@combinationid = 0)
begin
return @combinationid
end
else
begin
select @lifeid = id1 from a where combid = @combinationid and tyid = @typeid and styid = @subtypeid
end
return @lifeid
END
This is the ,matter i am typing in my funciton.The thing is , i want to pass two parameters back to the stored procedure , whee i am calling this funciton.
i know i can't return two values back to the stored procs.
Then how should i do it ?
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
A function can return either a single scalar value or a table variable. This has been explained to you previously. A stored procedure can return multiple scalar values, so you could consider using one of those instead.
Paul Marfleet
|
|
|
|
|
hi guys, is it possible that i can retrieve records from different database like SQL Server 2000 and MySQL?
example, assuming i have table in SQL Server 2000 and i also have table in MySQL. the table in SQL Server 2000 for example is Table1 and in MySQL is Table2.
if i create a query that will combine or retrieve the fields of the two database, is it possible?
if so anyone who have idea with that and how to do that?
Thank You.
Don't block the drive way of all the newbies in programming.
|
|
|
|
|
I don't know, but guess with the use of LINQ, may be you can get this!
Please someone answer back if more information related to this is found.
thanks,
|
|
|
|
|
Does anybody knows where to find a vb 6 code that can manipulate database.. e.g. add, edit and delete a field... also code that can manipulate existing fields.. thnks..
|
|
|
|
|
Can anyone point me to more resources on Application partitioning using SQL Server? I'm thinking about developing multi-company portal so I'm in research phase for finding something that'll work out best in that case.
Thanks in advance!
|
|
|
|
|
hi , i have build an ASP.net application using Enterprise library 1.1. Curremtly i was using sql server 2000. Now i have to take my DB to sql server 2005. my question is that my current application will work with SQL server 2005??? Is enterprise library 1.1(june 2005) work well with SQL server 2005????? please reply soon...
|
|
|
|
|
Hi,
In sql plus if i type user name and password it showing account is locked.
How to release the locked account
Thanks in advance
Regards
Azeem
|
|
|
|
|
You might have to go in as admin and fix it. If it is the admin account that is locked, then not much can really be done.
"Find it your bloody self - immediately!" - Dave Kreskowiak
|
|
|
|
|
I'm using SQL Server 7 on the LAN network and I would like to block other SQL Servers from detecting or at least from accessing it.
The server still must allow access to users via applications so logins must exist. I just don't want other SQL servers on the network to be able to connect to and import/export, view table and SP, etc.
Any ideas?
|
|
|
|
|
CAn't be done. Best you can do is lock it down so that your applications use a login that has limited permissions, and make sure noone has the details of the admin account.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
It cannot be done. You need to have the particular server just not be accessed by the others.
"Find it your bloody self - immediately!" - Dave Kreskowiak
|
|
|
|
|
May this work.
In sql server's properties, theres one check box as "register in ad server". Try to uncheck it and then see.
thanks,
|
|
|
|
|
CREATE FUNCTION dbo.abc (@a int)
RETURNS @Products TABLE (
CategoryName nvarchar(15)
, ProductID int)
can i , through this function type return more then one value ,I mean , scalar function return one value, or u can say in the programming languages like c# we can use ref keyword for the function parameters to get the updated value.are these parameters , refererence like parameters in c#.
and one more thing , how can i use the these updated parameters in the stored procedure , that are declared in the function under
TABLE( CategoryName nvarchar(15)
, ProductID int)
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Functions can either return a single scalar value or a table variable. Stored procedures can return more than one value if you append the OUTPUT keyword to any of your parameter declarations.
I don't understand the second part of your question. Your function returns a table variable. What do you mean by 'updated parameters'?
Paul Marfleet
|
|
|
|
|
How use of function, cursor, trigger in stored procedure in sql server
|
|
|
|
|
These are three separate areas that I recommend you reading up on by googling or buying a book.
In themselves they are fairly weighty topics so if you could be more specific you may get more specific help.
Do you understand what the these three components do?
Based on SQL Server 2000(and over-simplifying):
A function is used for returning a single value, or a table.
A cursor allows you to process one row at a time in a table, so that you can manipulate the data row by row.
A trigger is a rule that is applied to a table when an insert, update or delete s performed.
Hope this helps...
You always pass failure on the way to success.
|
|
|
|