Viewing 15 posts - 406 through 420 (of 443 total)
I think I have answered this in another forum. Same question.
Atif Sheikh
July 21, 2008 at 4:26 am
;with wcte (AId, ACourseId, AGroup, AStarttime, AEndTime, AFacultyid,BId, BCourseId, BGroup, BStarttime, BEndTime, BFacultyid)
Select A.ID AId, A.CourseId ACourseId, A.Group AGroup, A.Starttime AStarttime, A.EndTime AEndTime, A.Facultyid AFacultyid,
B.ID BId, ...
July 21, 2008 at 4:19 am
You need to reset the variable in the Catch Block.
Sometimes you need to reset the variables as they were at the start of the procedure in case of an error....
July 21, 2008 at 1:29 am
As far as I understood your problem,
1. you need insert a record
2. you need to update the record according to the SELECTED ID
whats...
July 21, 2008 at 1:16 am
Both are same. No difference.
July 21, 2008 at 1:04 am
Just for error handeing, no issue of performance. Also, I think, using try / catch isd fast in case of execution, as it directly goes to error - handeler on...
July 21, 2008 at 1:03 am
Try Using PIVOT with SUM as as Aggrigate Function.
Atif Sheikh
July 21, 2008 at 12:26 am
I have so many tables in my database that have such a structure. You always fall in this situation when you are mapping a PK of one table and with...
July 21, 2008 at 12:20 am
With Query 1,Try this;
select (case when status <> "Attended' then
'green'
else...
July 21, 2008 at 12:06 am
It will be much better to check your alphanumeric values with ISNUMERIC() function before applying mathematical functions.
After that, use CAST for conversion to get the job done.
This way,...
July 20, 2008 at 11:50 pm
I think you should use sp_executesql as you want to return a parameter from your executed string. Get your @Row (@Row = COUNT(@FieldName)) variable return from the sp_executesql.
Atif Sheikh
July 20, 2008 at 11:45 pm
Make it a function as;
CREATE FUNCTION dbo.fnConvertBinaryToChar
(
-- Add the parameters for the function here
@binvalue varbinary(255)
)
RETURNS char(500)
AS
BEGIN
declare @charvalue varchar(255)
declare @i int
declare @length...
July 16, 2008 at 2:02 am
Ok here it goes...
Declare @binvalue varbinary(255)
Set @binvalue = 0x000FD4EB2F811A43A3D674D5FA7B5E95
declare @charvalue varchar(255)
declare @i int
declare @length int
...
July 15, 2008 at 11:00 pm
You can also user TALLTY Table in this case.
Thiswill parse your string character wise. Parsing can also be done by many ways, but 'tally table' strategy is fast.
After parsing...
July 15, 2008 at 10:24 pm
Viewing 15 posts - 406 through 420 (of 443 total)