Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
qutesanju
Posting Yak Master
193 Posts |
Posted - 2009-06-08 : 06:35:37
|
| I have one SP like thiscreate Procedure test_SP](@LastRunDate as varchar(100), @TableName_N_ColumnName as varchar(100) )ASbegin-------------------------------------------------------------------------------------------Declare @LastRunDate as varchar(100)--set @LastRunDate='25-may-2009'select @TableName = substring (@TableName_N_ColumnName)select @ColumnName = substring (@TableName_N_ColumnName)...............................endHere @TableName_N_ColumnName will be passed as table name + column name .....shich I have to separate itIf I passed (Employedd_table-Employee_Name)as a parameter then how can I separate the TableName = Employee_tableand column name as Employee_Name |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-06-08 : 06:38:19
|
You can use CHARINDEX to find out the position of your delimiter. E 12°55'05.63"N 56°04'39.26" |
 |
|
|
|
|
|