• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 426
  • Last Modified:

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

0
cheryl9063
Asked:
cheryl9063
1 Solution
 
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
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
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
 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now