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

LVL 1
cheryl9063Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

QPRCommented:
looks ok to me
0
cheryl9063Author Commented:
It does not like it..It highlights the last end in my proc with goes with the BEGIN at the start of my proc
0
Imran Javed ZiaConsultant Software Engineer - .NET ArchitectCommented:
Hi,
try this
Declare @Image_Binary nvarchar(max)
and if issue is not resolved then send complete sp
thanks
0
Acronis Data Cloud 7.8 Enhances Cyber Protection

A closer look at five essential enhancements that benefit end-users and help MSPs take their cloud data protection business further.

QPRCommented:
i only see 2 begin and ends in your sample... can you post the entire code
0
cheryl9063Author Commented:
I figured it out.. In my last set I'm missing a )
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Alpesh PatelAssistant ConsultantCommented:
Declare @Image_Binary nvarchar (some length)
0
QPRCommented:
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
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Query Syntax

From novice to tech pro — start learning today.