Viewing 15 posts - 256 through 270 (of 363 total)
[font="Verdana"]
Yes, just concatenate the columns.
Declare @theMinutes int
Set @theMinutes = 2945
Select @theMinutes / 1440 as NoDays + ' ' + (@theMinutes % 1440) / 60 as NoHours...
MH-09-AM-8694
April 25, 2008 at 3:10 am
[font="Verdana"]
Assuming you got a stroed procedure.
...
Declare @Id Int
Select @Id = Max(DocID) From TableB
Insert Into {TableB}
Select @Id, A.Col1, A.col2... From TableA As A
...
Mahesh
[/font]
MH-09-AM-8694
April 25, 2008 at 1:21 am
[font="Verdana"]
set @RoundedVar = 0.996;
SELECT round(@RoundedVar,2)
Even if you would have been tried this code, you will get the o/p which you did get earlier. That is 1.00
DECLARE @RoundedVar decimal(10,2)
set @RoundedVar =...
MH-09-AM-8694
April 25, 2008 at 12:29 am
[font="Verdana"]
For row = 0 To .UpperBound(1)
.value(row, 13) = IntnewBno
...
MH-09-AM-8694
April 24, 2008 at 3:15 am
[font="Verdana"]
print (@dbname)
set @sqlstr = 'use ' + @dbname + @ctrl
After the above statement, add the below line to your code.
Exec (@sqlstr)
Here you have just builded the dynamic sql string, but...
MH-09-AM-8694
April 24, 2008 at 12:56 am
[font="Verdana"]
Also,,, Can anybody explain me how to get only the acting on update, insert on rows from column 21, 22 and 30 for example? I tried to read the msdn's...
MH-09-AM-8694
April 24, 2008 at 12:35 am
[font="Verdana"]
These are few good sites where you can search and update your SQL skills.
http://www.sqlservercentral.com/
Mahesh
[/font]
MH-09-AM-8694
April 23, 2008 at 4:42 am
[font="Verdana"]
Select {col1, Col2, ...Coln} From {Table}
Where (Department <> 2 And Category2 <> 'B')
And (Department <> 2 And Category3 <> 'C')
And (Department <> 3 And Category1 <> 'A')
And (Department <>...
MH-09-AM-8694
April 23, 2008 at 1:25 am
[font="Verdana"]Post some real life data with desired o/p.
Mahesh[/font]
MH-09-AM-8694
April 23, 2008 at 12:56 am
[font="Verdana"]
No cure needed... they automatically drop at the end of the proc (poet and don't know it, too!)
Thanks Jeff for updating me. I was under impression that, they...
MH-09-AM-8694
April 23, 2008 at 12:19 am
[font="Verdana"]
...is PIVOT not supported in SSExpress2005?
It might be the problem of Compatibility Level. Even I have faced the same problem with SQL Server 2K5. Check the Compatibility Level ...
MH-09-AM-8694
April 22, 2008 at 11:01 pm
[font="Verdana"]
Jeremy (4/22/2008)
MH-09-AM-8694
April 22, 2008 at 10:48 pm
[font="Verdana"]I think you must go the way Robert has suggested you earlier. Ask DB guy to alter the table and add the identity column, so that you’re every call which...
MH-09-AM-8694
April 22, 2008 at 10:10 pm
[font="Verdana"]Yup, I think Bindu has suggested nice solution. Even she has exact o/p desired by the original poster.
Mahesh[/font]
MH-09-AM-8694
April 22, 2008 at 6:24 am
[font="Verdana"]Look at the Execution Time, right bottom hand ... :D[/font]
MH-09-AM-8694
April 22, 2008 at 6:21 am
Viewing 15 posts - 256 through 270 (of 363 total)