Viewing 6 posts - 1 through 6 (of 6 total)
select right(Convert(varchar(20),getdate()),7) will give the timepart of a datetime variable.
September 26, 2008 at 6:42 am
U need to give necessary spaces between quotation marks and SQL keywords so that the SQL server can interpret them.
If you dont give them properly especially in ASP. it is...
September 26, 2008 at 6:38 am
U can write a simple .NET windows application and call urs stored procedure and send the result set to excel
This is very simple.
September 26, 2008 at 6:27 am
Use the below script to find whether the database is there or not in a server
if exists
(select name from master..sysdatabases where name like '%abc%')
Begin
...
September 26, 2008 at 6:13 am
Let us take an example
Create the table with the below structure (having an identity column)
Create table Tbl_UserAddresses(
Sno int identity(1,1),User int,UserAddress Varchar(50),ChangedDate datetime)
Insert into Tbl_UserAddresses(User,UserAddress,ChangedDate)
select 20,'abc','09/01/08' union
select 21,'def','09/02/08' union
select 20,'ghi','09/01/08' union
select...
September 26, 2008 at 6:03 am
select datepart(dd,getdate()) will give the only the date as 26
select Convert(varchar(10),getdate(),101) will returns the date as '09/26/2008'
September 26, 2008 at 5:51 am
Viewing 6 posts - 1 through 6 (of 6 total)