.zero

★ ★ ★
Aug 8, 2006
82,806
nothing better than a good burger
Damn straight

http://ia.media-imdb.com/images/M/M...anBnXkFtZTcwMzY5NzAyMQ@@._V1_SX640_SY720_.jpg

No idea. Best to avoid suitcases around 11th & Mission.

More of what I experienced last night were all the helicopters overhead for the 4-alarm fire at 22nd & Mission that you could hear from my house all night. Saw the overhead news footage and thought, "Fire across the Sketchers again? Looks like the Giants won the World Series."
It was mine. Moving in slowly but surely
 

Buy on AliExpress.com

IncuboRossonero

Inferiority complex
Nov 16, 2003
7,039
What am I doing right now?

I set a record of not having a bowel movement in 10 days...that coupled with the permanent diarrhea I decided to sit on the bowl and throw a Juventus flag in the bowl along with an over rated Del Piero poster and took what is the most massive dump in the history of dumps...


Burp
 

.zero

★ ★ ★
Aug 8, 2006
82,806
What am I doing right now?

I set a record of not having a bowel movement in 10 days...that coupled with the permanent diarrhea I decided to sit on the bowl and throw a Juventus flag in the bowl along with an over rated Del Piero poster and took what is the most massive dump in the history of dumps...


Burp
:lol:

Wonderful drop-in cameo
 

Dostoevsky

Tzu
Administrator
May 27, 2007
88,978
@Martin

SELECT CustomerName, Address+', '+City+', '+PostalCode+', '+Country AS Address
FROM Customers;

I understand what this does. What I don't understand is why the bold parts. I mean, why that order (starting +' and ending '+)? I don't think I've seen the explanation for it before.
 

Martin

Senior Member
Dec 31, 2000
56,913
@Martin

SELECT CustomerName, Address+', '+City+', '+PostalCode+', '+Country AS Address
FROM Customers;

I understand what this does. What I don't understand is why the bold parts. I mean, why that order (starting +' and ending '+)? I don't think I've seen the explanation for it before.
So this would be on a table that looks like this:

Code:
--------------------------------------------------------
| CustomerName | Address | City | PostalCode | Country |
--------------------------------------------------------
| Bob          | at home | Roma | 234234     | Italy   |
| Frank        | at work | Roma | 45644      | France  |
--------------------------------------------------------
The result of that select would be:

Code:
--------------------------------------------------------
| CustomerName | Address                               |
--------------------------------------------------------
| Bob          | at home, Roma, 234234, Italy          |
| Frank        | at work, Roma, 45644, France          |
--------------------------------------------------------
So from a table with 5 columns you're returning two columns of values, the first being CustomerName just as its stored, the second being a combination of the other 4.

Is that clear?
 

swag

L'autista
Administrator
Sep 23, 2003
84,749
What am I doing right now?

I set a record of not having a bowel movement in 10 days...that coupled with the permanent diarrhea I decided to sit on the bowl and throw a Juventus flag in the bowl along with an over rated Del Piero poster and took what is the most massive dump in the history of dumps...


Burp
Nick! You poor-man's Christian-Vieri-looking anal hairball! How you been?

@Martin

SELECT CustomerName, Address+', '+City+', '+PostalCode+', '+Country AS Address
FROM Customers;

I understand what this does. What I don't understand is why the bold parts. I mean, why that order (starting +' and ending '+)? I don't think I've seen the explanation for it before.
Bobby Tables :touched:
 

Dostoevsky

Tzu
Administrator
May 27, 2007
88,978
So this would be on a table that looks like this:

Code:
--------------------------------------------------------
| CustomerName | Address | City | PostalCode | Country |
--------------------------------------------------------
| Bob          | at home | Roma | 234234     | Italy   |
| Frank        | at work | Roma | 45644      | France  |
--------------------------------------------------------
The result of that select would be:

Code:
--------------------------------------------------------
| CustomerName | Address                               |
--------------------------------------------------------
| Bob          | at home, Roma, 234234, Italy          |
| Frank        | at work, Roma, 45644, France          |
--------------------------------------------------------
So from a table with 5 columns you're returning two columns of values, the first being CustomerName just as its stored, the second being a combination of the other 4.

Is that clear?
It is clear. That does make sense.

I just don't know why is is written like this +'. This
 

Attachments

Martin

Senior Member
Dec 31, 2000
56,913
It is clear. That does make sense.

I just don't know why is is written like this +'. This
I don't know how many concepts you've learned already.

In programming there is a basic concept called a string. It means a sequence of characters.

"a" is a character
"abc" is a string (more than one character)

In the SELECT you showed there are several strings being concatenated (ie. glued together) using the + sign (which means "joing two strings into one string").

So:

"a" + "b" => "ab"

- - - Updated - - -

I'll tell you later :D
 

Dostoevsky

Tzu
Administrator
May 27, 2007
88,978
I don't know how many concepts you've learned already.

In programming there is a basic concept called a string. It means a sequence of characters.

"a" is a character
"abc" is a string (more than one character)

In the SELECT you showed there are several strings being concatenated (ie. glued together) using the + sign (which means "joing two strings into one string").

So:

"a" + "b" => "ab"
This post made me feel like a retard. :D

Thanks.

Nick! You poor-man's Christian-Vieri-looking anal hairball! How you been?


Bobby Tables :touched:
Hey, I'm just trying to expand the universe of not-knowing. :p
 

Users Who Are Viewing This Thread (Users: 4, Guests: 450)