Viewing 13 posts - 1 through 13 (of 13 total)
Try this......
DECLARE @TestTable TABLE
(
ID INT IDENTITY PRIMARY KEY,
UserID INT,
CourseName VARCHAR(MAX),
StatusID INT
)
INSERT INTO @TestTable (UserID, CourseName, StatusID)
...
July 17, 2009 at 6:29 am
Hi,
Try out this query.Using this u can find Nth highest salary.
declare @n int
set @n=2
Select * From Employee E1 Where
(@n-1) = (Select Count(Distinct(E2.Salary)) From Employee E2 Where
E2.Salary...
May 18, 2009 at 10:52 pm
Thank u guys for the reply. But i came up with this solution...
select cast((900000* Rand() + 100000) as int )
This is also working according to my requirement..
Thanks
Shailesh:)
December 26, 2008 at 1:38 am
Hi suresh,
Actually 2005 named instance is not installed.If u can read my first post,my problem will be cleared to u. My sql 2005 is just working as a client for...
December 19, 2008 at 5:04 am
Thanks for the reply but if I am not wrong that will be fresh installation after uninstalling the old one.
Is there any other way, I mean to say without...
December 19, 2008 at 4:00 am
Hi,
u can use the following query to read data from a excel sheet.
SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.5.0', 'Excel 8.0;DATABASE=d:\ABC.xls', 'Select * from [sheet1$]')
Thanks
Shailesh
December 11, 2008 at 1:35 am
Hi Mh,
Try this....
cast(convert(varchar,cast(datecolumn as smalldatetime),101) as smalldatetime)
Thanks
Shailesh
November 30, 2008 at 10:59 pm
hi mpdillon ,
I think u don't want to compare time value with the date present in the column. For this problem , i have one function that will remove the...
November 19, 2008 at 3:40 am
Hi eric,
u can try this.................
select invno,ProductID,
(Select sum(case when size='30' then Quantity else 0 end )) as '30',
(Select sum(case when size='32' then Quantity else 0 end )) as '32',
(select sum(case...
November 11, 2008 at 2:50 am
Thank u all for the valuable suggestions...
I got one tool that will compare the two databases objects and show u the new changes made.I think it will be bit helpful...
June 20, 2008 at 3:55 am
Hi vish
u have not mentioned which version of sql server u r using because if u are using sql server 2000 then u will not be able to use Delete...
June 19, 2008 at 6:38 am
Thank u vidhya,
But my problem is that I have SQL server 2000. And I have to do in this.
Thank u
Shailesh
June 19, 2008 at 5:28 am
I have faced same problem once and i found this solution. I m taking same table for example as shown by u in ur post.
create table test
(
colA varchar(5),
colB varchar(8)
)
--I have...
June 13, 2008 at 1:28 am
Viewing 13 posts - 1 through 13 (of 13 total)