Link to home
Start Free TrialLog in
Avatar of cheryl9063
cheryl9063Flag for United States of America

asked on

SQL Begin and End problems

Is there something wrong with my syntax around where I place my begin and ends?
Declare @Image_Binary nvarchar
  
   If @Bin is null and @BinaryObject_Base64 is not null	
   Begin
	 Set @Image_Binary =(Select dbo.ImageProperties_Base64(@BinaryObject_Base64))
   END
	 If @BinaryObject_Binary is not null
	BEGIN 
	 Set @Image_Binary = (Select dbo.ImageProperties_Binary(@BinaryObject_Binary)) 
	END
    Set @Image_Binary = (Select rtrim(REPLACE(@Image_Binary,'||',' ')))
    Set @Image_Binary =(select [dbo].[ufn_Utility_GetWord](@Image_Binary,1,'')

Open in new window

Avatar of QPR
QPR
Flag of New Zealand image

looks ok to me
Avatar of cheryl9063

ASKER

It does not like it..It highlights the last end in my proc with goes with the BEGIN at the start of my proc
Avatar of Imran Javed Zia
Hi,
try this
Declare @Image_Binary nvarchar(max)
and if issue is not resolved then send complete sp
thanks
i only see 2 begin and ends in your sample... can you post the entire code
ASKER CERTIFIED SOLUTION
Avatar of cheryl9063
cheryl9063
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Declare @Image_Binary nvarchar (some length)
You asked if your begin and ends (in the supplied code) were correctly placed.
And you were answered that they were. You made no mention of other pieces of code (not supplied) or of syntax errors