Solved

SQL QUERY : JOIN

Posted on 2011-09-05
4
272 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

762 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

19 Experts available now in Live!

Get 1:1 Help Now