Click here to Skip to main content
16,004,727 members
Home / Discussions / Database
   

Database

 
GeneralRe: Concatenate two column from different table Pin
pmarfleet6-Feb-08 1:46
pmarfleet6-Feb-08 1:46 
GeneralRe: Concatenate two column from different table Pin
Neophyte306-Feb-08 2:16
Neophyte306-Feb-08 2:16 
GeneralRe: Concatenate two column from different table Pin
pmarfleet6-Feb-08 2:31
pmarfleet6-Feb-08 2:31 
GeneralRe: Concatenate two column from different table Pin
Neophyte306-Feb-08 2:56
Neophyte306-Feb-08 2:56 
GeneralRe: Concatenate two column from different table Pin
pmarfleet6-Feb-08 3:36
pmarfleet6-Feb-08 3:36 
GeneralRe: Concatenate two column from different table Pin
Neophyte306-Feb-08 3:43
Neophyte306-Feb-08 3:43 
GeneralRe: Concatenate two column from different table Pin
kimo code6-Feb-08 2:57
kimo code6-Feb-08 2:57 
Generalconcat command in stored procedure Pin
jithbiz00336-Feb-08 0:21
jithbiz00336-Feb-08 0:21 
Hi Guys

I have a stored procedure which has the coding to insert values in tables with different suffix but one prefix. Eg table_fruits, table_vegetables, table_pulses etc., I am passing the suffix in the procedure. I dont know how to concat the suffix to insert the value in the specific table.

create procedure [dbo].[my_proc](
@category varchar(30),
@Name varchar(50))
As
Begin
insert into table_+@category+ value name=@Name;
End


I dont want to follow

if(@category = 'fruits')
insert into table_fruits values name=@Name;
else if(@category = 'vegetables') etc ., etc.,

Is there any way to do this. Kindly help me.

Thanks
Jith
GeneralRe: concat command in stored procedure Pin
pmarfleet6-Feb-08 0:47
pmarfleet6-Feb-08 0:47 
GeneralRe: concat command in stored procedure Pin
jithbiz00336-Feb-08 17:39
jithbiz00336-Feb-08 17:39 
GeneralRe: concat command in stored procedure Pin
jithbiz00336-Feb-08 23:23
jithbiz00336-Feb-08 23:23 
AnswerRe: concat command in stored procedure Pin
pmarfleet7-Feb-08 2:24
pmarfleet7-Feb-08 2:24 
Questionwhat is the exact meaning of this statement Pin
jagan1235-Feb-08 23:57
jagan1235-Feb-08 23:57 
AnswerRe: what is the exact meaning of this statement Pin
pmarfleet6-Feb-08 0:49
pmarfleet6-Feb-08 0:49 
GeneralRe: what is the exact meaning of this statement Pin
#realJSOP6-Feb-08 3:55
professional#realJSOP6-Feb-08 3:55 
GeneralSQL Server SSL Connection Pin
Ed Gadziemski5-Feb-08 16:05
professionalEd Gadziemski5-Feb-08 16:05 
GeneralSQL Server 2005 express issue Pin
ninkk5-Feb-08 8:18
ninkk5-Feb-08 8:18 
GeneralRe: SQL Server 2005 express issue Pin
Marek Grzenkowicz5-Feb-08 22:02
Marek Grzenkowicz5-Feb-08 22:02 
GeneralRe: SQL Server 2005 express issue Pin
ninkk5-Feb-08 22:39
ninkk5-Feb-08 22:39 
GeneralRe: SQL Server 2005 express issue Pin
Marek Grzenkowicz5-Feb-08 22:48
Marek Grzenkowicz5-Feb-08 22:48 
GeneralRe: SQL Server 2005 express issue Pin
ninkk6-Feb-08 1:28
ninkk6-Feb-08 1:28 
GeneralRe: SQL Server 2005 express issue Pin
ninkk6-Feb-08 1:29
ninkk6-Feb-08 1:29 
GeneralRe: SQL Server 2005 express issue Pin
Marek Grzenkowicz6-Feb-08 1:53
Marek Grzenkowicz6-Feb-08 1:53 
GeneralRe: SQL Server 2005 express issue Pin
ninkk6-Feb-08 2:31
ninkk6-Feb-08 2:31 
GeneralRe: SQL Server 2005 express issue Pin
Marek Grzenkowicz6-Feb-08 3:12
Marek Grzenkowicz6-Feb-08 3:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.