Viewing 15 posts - 1,336 through 1,350 (of 1,923 total)
If your SQL server is hosted on a VM, u are likely to get a wrong Server Name using @@ServerName.. Use OBJECTPROPERTY() function instead..
July 13, 2010 at 6:40 pm
All you need is to do unpivot.. here is how u do that.. this produces 2 column, with the column name as the second column.. remove "star" from the query...
July 10, 2010 at 7:58 am
Put the result of your SP into a temp table like this:
INSERT INTO TABLE EXEC SP1
Then use column values into variables and the execute SP2..
July 9, 2010 at 11:42 am
sorry dint read your entire post.. this is possible.. take a look the following great article from MVP Jeff Moden :
Cross Tabs and Pivots, Part 1 – Converting...
July 9, 2010 at 11:38 am
Only 4 columns are possible? i mean, for a given ID, will there be only 4 columns ?
July 9, 2010 at 11:36 am
Execute the Stored procedure for each ID present in the output of the other SP?
July 9, 2010 at 10:32 am
Grant Fritchey (7/9/2010)
Keep an eye on my blog (scarydba.wordpress.com). I'm posting three articles in two weeks as part of SQL Server University[/url]. They're all introductory articles on indexes.
Wow, thats excellent...
July 9, 2010 at 9:08 am
Books Online - THe free help that comes along with SQL Server 2005 installation is better than Google search..
CTE = Common Table Expression
These...
July 7, 2010 at 10:40 pm
Keyun, that's a lot of work, buddy! first get the today's date, then the first day of the month, then loop through each day to pull data from the DB...
July 5, 2010 at 7:10 am
Hi there, have this :
declare @table table
(
c1 int, c2 int , c3 int, c4 int, c5 int
)
insert into @table
...
July 5, 2010 at 2:48 am
Hi there, cursors are really pain-givers.. without your original "..Some Processing" code, we cant give an alternative..
but within the cursors u can use like this
create table #table ( your...
July 5, 2010 at 2:19 am
GilaMonster (7/2/2010)
virender.singh (7/2/2010)
@paul-2 : I will cheer for newzeland during next india-newzeland battle;-)Cheer for South Africa next time we play India! We're more likely to win. 😉 :hehe:
I will be...
July 2, 2010 at 2:44 am
Try this:
SELECT p1.DESIGNATIONS,
STUFF( ( SELECT ',' + NAME
FROM TableNAME p2
...
July 1, 2010 at 6:18 am
Hi there, try this:
declare @datatable table
(
CompanyID int,
ReportID int,
ReportDate smalldatetime
)
insert into @datatable (CompanyID ,ReportID, ReportDate)
select 10 ,123 ,'2007-09-19'
union all select 10 ,234 ,'2005-07-28'
union all select 10 ,345 ,'2004-10-08'
union...
July 1, 2010 at 4:01 am
Saravanan_tvr (7/1/2010)
Thank u sir,I forgot the charindex functions.. thanks for you output...
No issues, welcome saravanan!
July 1, 2010 at 3:50 am
Viewing 15 posts - 1,336 through 1,350 (of 1,923 total)