Solved

SQL QUERY : JOIN

Posted on 2011-09-05
4
273 Views
Last Modified: 2012-05-12
Hey guys, i have a query below

"SELECT *, r_name as InfoWindowText, Latitude as Lat, Longitude as Lng FROM dbo.pretoria"


now how can i write a query where InfoWindowText must r_name+'<br> + name

i just want to assign text to InfoWindowText
0
Comment
Question by:JCWEBHOST
  • 2
4 Comments
 
LVL 22

Assisted Solution

by:pivar
pivar earned 250 total points
ID: 36483187
Hi,

Do you mean?

SELECT *,  r_name+'<br> + name as InfoWindowText, Latitude as Lat, Longitude as Lng FROM dbo.pretoria

/peter
0
 

Author Comment

by:JCWEBHOST
ID: 36483231
yes
0
 
LVL 15

Accepted Solution

by:
gplana earned 250 total points
ID: 36483233
The SELECT proposed by privar will fail. You need an additional quote after <br>:

SELECT *,  r_name+'<br>' + name as InfoWindowText, Latitude as Lat, Longitude as Lng FROM dbo.pretoria
0
 

Author Closing Comment

by:JCWEBHOST
ID: 36483263
thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now