Viewing 15 posts - 91 through 105 (of 362 total)
[font="Verdana"]Then what you need to do is, to use the Table variable example which Grant has suggested.
Mahesh[/font]
February 6, 2009 at 2:50 am
[font="Verdana"]
Grant Fritchey (2/5/2009)
The last post is close...
Grant i didn't get you.
Mahesh
[/font]
February 5, 2009 at 7:26 am
[font="Verdana"]something like:
Create Table Tab1
(IdInt Identity(1,1),
NameVarChar(10))
Go
Create Table Tab2
(IdInt,
NameVarChar(10))
Go
-- Insert
Insert IntoTab1 (Name)
Output Inserted.Id, Inserted.Name Into Tab2(Id, Name)
Values ('AAAA')
Insert IntoTab1 (Name)
Output Inserted.Id, Inserted.Name Into Tab2(Id, Name)
Values ('BBBB')
Go
Select * From Tab1
Select...
February 5, 2009 at 5:12 am
[font="Verdana"]What if you will handle FALSE in Else part? Why you need this situation to be handle in Catch part?
Mahesh[/font]
February 4, 2009 at 1:24 am
[font="Verdana"]Let us know, what problem still your are facing. What stange situation you have and three of the examples are not working for you.
Thats why I have asked you...
February 4, 2009 at 12:23 am
[font="Verdana"]Let us know some sample data with expected o/p. Even the example I have given you earlier, go into its details. It is self explanatory. Anyways let us know your...
February 3, 2009 at 1:57 am
[font="Verdana"] Let us know...
Create Table dbo.Employee(
EmpIdInt
,EmpNameVarChar(10)
,MgrIdInt)
Go
Insert Into Employee
Select1, 'AAAA', 2 Union All
Select2, 'BBBB', 3 Union All
Select3, 'CCCC', 4 Union All
Select4, 'DDDD', 1 Union All
Select5, 'EEEE', 2
Go
SelectE.EmpId, E.EmpName, E.MgrId, M.EmpName
FromEmployee As...
February 3, 2009 at 12:07 am
[font="Verdana"]Parameters in SProcs are not optional. You have to mentioend them while calling the SProc. You can instead mention 'DEFAULT' keyword while passing the parameters. Like:
EXEC dbo.sp_Sample Default, Default
Mahesh[/font]
February 2, 2009 at 4:58 am
[font="Verdana"]even almost same discussion can be found at http://www.sqlservercentral.com/Forums/Topic646567-145-1.aspxBut I think Jeff's article is much better explanatory.
Mahesh[/font]
February 2, 2009 at 1:01 am
[font="Verdana"]I din't get your requirement. But I think you are looking for PIVOT. For more information, check out BOL
Mahesh[/font]
January 30, 2009 at 5:01 am
[font="Verdana"]Almost similar post. Please view http://www.sqlservercentral.com/Forums/Topic646567-145-1.aspx
Mahesh[/font]
January 30, 2009 at 4:46 am
[font="Verdana"]Yes, It can be done through executing the SProc inside Trigger as well. However I am not aware with the Pros and cons of it.
If anybody is aware with it,...
January 30, 2009 at 4:22 am
[font="Verdana"]I think you better write a UDF like:
Create Function dbo.Convert_Into_CSV(@ID Int)
Returns VarChar(50)
As
Begin
Declare@CSVVarChar(50)
Select@CSV = Case When @CSV Is Null Then col2 Else @CSV + ', ' + col2 End
FromTest
Wherecol1...
January 30, 2009 at 2:46 am
[font="Verdana"]Then why you need the SProc for this. Just directly write whatever the statements you wants to wtire inside SProc. You can write such statements under IF UPDATE(column_name) condition. It...
January 30, 2009 at 2:25 am
[font="Verdana"]Thank you very much noel, it works.
Mahesh[/font]
January 20, 2009 at 3:51 am
Viewing 15 posts - 91 through 105 (of 362 total)