Unix Technical Forum

SQL to combine columns

This is a discussion on SQL to combine columns within the SQL Server forums, part of the Microsoft SQL Server category; --> yuri wrote: >> Yes it is brought up all the time because people will not bother to >> read ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

 

LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 03-01-2008, 02:40 PM
Ed Murphy
 
Posts: n/a
Default Re: SQL to combine columns

yuri wrote:

>> Yes it is brought up all the time because people will not bother to
>> read even one book on RDBMS, so they keep asking this kind of thing
>> over and over. Please post DDL, so that people do not have to guess
>> what the keys, constraints, Declarative Referential Integrity, data
>> types, etc. in your schema are. Let's start by doing what you should
>> have done for us:

>
> Oh, I'm sorry about that. I failed to get a copy of the CELKO SQL
> posting etiquette. Could you please point me in the right direction?
> Sarcasm aside, I will do this in the future. Thanks.


He's pretty much always like that. You get used to it after a while.

>> Why do you wish to destroy First Normal Form (1NF) with a concatenated
>> list structure? It is the foundation of RDBMS, after all. See why I
>> say you never read a book on RDBMS.

>
> You're right I should have went out and bought a book on RDBMS. I mean
> who would ever think about asking a question on the internet was
> possible. I mean everybody should shut down all forums and rely on tech
> manuals because they are always so well written and contain every piece
> of knowledge on the planet about the subject, including all the hidden
> tips and tricks. Questions will be a thing of the past. Just grab a
> book and your answer will be there. Did you get criticized in class
> when you had a question about something? Did the teacher yell at you,
> tell you to read the book and never answer the question?


This is not a class. It's reasonable to expect people to do at least
a bit of reading on their own first.

>> Why did you think that an owner is an attribute of a dog? It is a
>> relationship! It might have attributes of its own, like license
>> numbers, issue date, etc. but let's ignore that.

>
> I think a dog belongs to an owner. Can an owner have more than 1 dog?
> Hmmm.... I think so in this example. Yes, creating a seperate table in


But can a dog have more than one owner? If so, then the relationship
should indeed be moved into a third table.

This (among many other issues) is the sort of thing that questioners
tend to gloss over, not because they haven't thought about it, but
because the answer is obvious to them (whereas it is not obvious to
the rest of us). Politeness issues aside, I think it's a net gain
for such issues to be pointed out pre-emptively.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 03-01-2008, 02:41 PM
yuri
 
Posts: n/a
Default Re: SQL to combine columns

> This is not a class. It's reasonable to expect people to do at least
> a bit of reading on their own first.


The questions were in reference to me being a student asking for help from
more experienced users. If CELKO, the teacher, acted like that then there
must have been a reason, hence the class reference.

<Sarcasm>
Oh right, reading books!! Yes, I never thought of that. I should smack
myself over the head. Jeez... Let me pull some imaginary money out of my
butt, go to the store and grab the $40-$50 dollar book. (No library
reference please).
</Sarcasm>

I have found all the information on the internet, not from books or
schooling(SQL and RDBMS). Did you or CELKO crawl out of the womb and say,
"I am the Master at X, and you will bow before me". I don't think so,
therefore you must have done reading, schooling and for heaven sakes, you
ASKED questions from more experienced people at some point. Didn't you? You
have to start somewhere.

I guarantee I know something you or CELKO don't, and does it make it right
for me to criticize you if you ask a question that is very obvious to me?
No.

Yes, CELKO is a Master at RDBMS, I have just started out and have done very
well in only a few days. So, I cannot ask any questions until I become
extremely proficient at RDBMS and SQL! Huh... Tough group.

Ok, that's over with. Now, let's drink to good times.

Please, can you at least recommend a good book that is for intermediate to
advanced, in regards to SQL and RDBMS, recent copyright date please? I will
spare the money and buy it.

I think I accidently posted to: comp.databases.ms-sqlserver.masterlevel.


"Ed Murphy" <emurphy42@socal.rr.com> wrote in message
news:45f585f7$0$5777$4c368faf@roadrunner.com...
> yuri wrote:
>
>>> Yes it is brought up all the time because people will not bother to
>>> read even one book on RDBMS, so they keep asking this kind of thing
>>> over and over. Please post DDL, so that people do not have to guess
>>> what the keys, constraints, Declarative Referential Integrity, data
>>> types, etc. in your schema are. Let's start by doing what you should
>>> have done for us:

>>
>> Oh, I'm sorry about that. I failed to get a copy of the CELKO SQL
>> posting etiquette. Could you please point me in the right direction?
>> Sarcasm aside, I will do this in the future. Thanks.

>
> He's pretty much always like that. You get used to it after a while.
>
>>> Why do you wish to destroy First Normal Form (1NF) with a concatenated
>>> list structure? It is the foundation of RDBMS, after all. See why I
>>> say you never read a book on RDBMS.

>>
>> You're right I should have went out and bought a book on RDBMS. I mean
>> who would ever think about asking a question on the internet was
>> possible. I mean everybody should shut down all forums and rely on tech
>> manuals because they are always so well written and contain every piece
>> of knowledge on the planet about the subject, including all the hidden
>> tips and tricks. Questions will be a thing of the past. Just grab a book
>> and your answer will be there. Did you get criticized in class when you
>> had a question about something? Did the teacher yell at you, tell you to
>> read the book and never answer the question?

>
> This is not a class. It's reasonable to expect people to do at least
> a bit of reading on their own first.
>
>>> Why did you think that an owner is an attribute of a dog? It is a
>>> relationship! It might have attributes of its own, like license
>>> numbers, issue date, etc. but let's ignore that.

>>
>> I think a dog belongs to an owner. Can an owner have more than 1 dog?
>> Hmmm.... I think so in this example. Yes, creating a seperate table in

>
> But can a dog have more than one owner? If so, then the relationship
> should indeed be moved into a third table.
>
> This (among many other issues) is the sort of thing that questioners
> tend to gloss over, not because they haven't thought about it, but
> because the answer is obvious to them (whereas it is not obvious to
> the rest of us). Politeness issues aside, I think it's a net gain
> for such issues to be pointed out pre-emptively.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 03-01-2008, 02:41 PM
Greg D. Moore \(Strider\)
 
Posts: n/a
Default Re: SQL to combine columns

"yuri" <yuri32@hotmail.com> wrote in message
news:l1jJh.36$aQ3.29@newsfe12.lga...
>
> <Sarcasm>
> Oh right, reading books!! Yes, I never thought of that. I should smack
> myself over the head. Jeez... Let me pull some imaginary money out of my
> butt, go to the store and grab the $40-$50 dollar book. (No library
> reference please).
> </Sarcasm>


In other words, you're part of the generation that thinks all the answers on
the Internet.

Sorry, but if you can't afford them, the library IS another option. The
Internet, as wonderful as it is, has its limitations.


>
> I have found all the information on the internet, not from books or
> schooling(SQL and RDBMS).


Unfortunately a lot of the information on the Internet sucks.


> Did you or CELKO crawl out of the womb and say, "I am the Master at X, and
> you will bow before me". I don't think so,


I think Joe Celko did. ;-)

> therefore you must have done reading, schooling and for heaven sakes, you
> ASKED questions from more experienced people at some point. Didn't you?
> You have to start somewhere.
>
> I guarantee I know something you or CELKO don't, and does it make it right
> for me to criticize you if you ask a question that is very obvious to me?
> No.
>
> Yes, CELKO is a Master at RDBMS, I have just started out and have done
> very well in only a few days. So, I cannot ask any questions until I
> become extremely proficient at RDBMS and SQL! Huh... Tough group.
>
> Ok, that's over with. Now, let's drink to good times.
>
> Please, can you at least recommend a good book that is for intermediate to
> advanced, in regards to SQL and RDBMS, recent copyright date please? I
> will spare the money and buy it.


Actually Joe as a couple of decent books out there, not sure how many are
for true beginners.

He (and others) have posted some titles before, so google may find them.

I'd personally start finding a book on SQL theory itsellf. Unfortunately
cant' recommend any.

Though CJ Date has a decent book on the original work Codd did.

>
> I think I accidently posted to: comp.databases.ms-sqlserver.masterlevel.
>
>

--
Greg Moore
SQL Server DBA Consulting
Email: sql (at) greenms.com http://www.greenms.com


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 03-01-2008, 02:41 PM
yuri
 
Posts: n/a
Default Re: SQL to combine columns

> In other words, you're part of the generation that thinks all the answers
> on the Internet.


OMG, heavens NO! I'm not that young. I wish I had this knowledge 20 years
ago.

I do have an extensive library on programming, artificial intelligence,
expert systems, etc. Approaching, 30 books and the dump has more.

> Unfortunately a lot of the information on the Internet sucks.


Hence, the question in the newsgroup.

> Actually Joe as a couple of decent books out there, not sure how many are
> for true beginners.


I don't need one for true beginners. I can get by. I need one for
intermediate to advanced. I hate the learn X in 21 days (Yea, right.)

I prefer more advanced books.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 03-01-2008, 02:41 PM
Greg D. Moore \(Strider\)
 
Posts: n/a
Default Re: SQL to combine columns

"yuri" <yuri32@hotmail.com> wrote in message
news:CkjJh.37$aQ3.1@newsfe12.lga...
>> In other words, you're part of the generation that thinks all the answers
>> on the Internet.

>
> OMG, heavens NO! I'm not that young. I wish I had this knowledge 20
> years ago.
>
> I do have an extensive library on programming, artificial intelligence,
> expert systems, etc. Approaching, 30 books and the dump has more.
>
>> Unfortunately a lot of the information on the Internet sucks.

>
> Hence, the question in the newsgroup.
>
>> Actually Joe as a couple of decent books out there, not sure how many are
>> for true beginners.

>
> I don't need one for true beginners. I can get by. I need one for
> intermediate to advanced. I hate the learn X in 21 days (Yea, right.)
>
> I prefer more advanced books.


In that case, honestly, Joe Celko's SQL for Smarties is a good. (which I
should pick up one of these days). ;-)

If you want SQL Server specific, anything by Itzk Ben-Gan on programming is
good.

I want to be like him when I grow up as a DBA :-)

(and Kalen Delaney too.. I'm reading her Inside SQL MSSQL 2005: The Storage
Engine now).


>


--
Greg Moore
SQL Server DBA Consulting
Email: sql (at) greenms.com http://www.greenms.com


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #16 (permalink)  
Old 03-01-2008, 02:41 PM
othellomy@yahoo.com
 
Posts: n/a
Default Re: SQL to combine columns

On Mar 13, 3:09 am, "yuri" <yur...@hotmail.com> wrote:
> I don't need one for true beginners. I can get by. I need one for
> intermediate to advanced. I hate the learn X in 21 days (Yea, right.)
>
> I prefer more advanced books.


In order to learn transact sql I don't think CE will be helpful. You
need to get the full edition with all the features available. Once I
worked with a developer who used to browse the sql user manuals when
he had free time at work for relaxation!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #17 (permalink)  
Old 03-01-2008, 02:41 PM
othellomy@yahoo.com
 
Posts: n/a
Default Re: SQL to combine columns

On Mar 13, 3:09 am, "yuri" <yur...@hotmail.com> wrote:
> > In other words, you're part of the generation that thinks all the answers
> > on the Internet.

>
> OMG, heavens NO! I'm not that young. I wish I had this knowledge 20 years
> ago.
>
> I do have an extensive library on programming, artificial intelligence,
> expert systems, etc. Approaching, 30 books and the dump has more.
>
> > Unfortunately a lot of the information on the Internet sucks.

>
> Hence, the question in the newsgroup.
>
> > Actually Joe as a couple of decent books out there, not sure how many are
> > for true beginners.

>
> I don't need one for true beginners. I can get by. I need one for
> intermediate to advanced. I hate the learn X in 21 days (Yea, right.)
>
> I prefer more advanced books.


I recommend to get rid of compact edition and learn T-SQL full edition
with all the features available.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #18 (permalink)  
Old 03-01-2008, 02:41 PM
yuri
 
Posts: n/a
Default Re: SQL to combine columns

I could get rid of Compact Edition and learn the full edition, but my
program uses Compact Edition. Learning the full edition will only help me
sure, but Compact Edition is what will be used for the next couple of
applications. This is for the end user. I don't want to distribute Sql
Server Express along with the application, size is too big. Plus, I don't
need a Porsche to go across the street in record time. Compact Edition is
faster than Access but slower than Sql Server Express. Perfect for a small
distribution of my applications, with 0 price tag, small footprint, no
Jet/MDAC worries (deprecation/x64/distribution), etc..

<othellomy@yahoo.com> wrote in message
news:1173759013.236561.187470@64g2000cwx.googlegro ups.com...
> On Mar 13, 3:09 am, "yuri" <yur...@hotmail.com> wrote:
>> > In other words, you're part of the generation that thinks all the
>> > answers
>> > on the Internet.

>>
>> OMG, heavens NO! I'm not that young. I wish I had this knowledge 20
>> years
>> ago.
>>
>> I do have an extensive library on programming, artificial intelligence,
>> expert systems, etc. Approaching, 30 books and the dump has more.
>>
>> > Unfortunately a lot of the information on the Internet sucks.

>>
>> Hence, the question in the newsgroup.
>>
>> > Actually Joe as a couple of decent books out there, not sure how many
>> > are
>> > for true beginners.

>>
>> I don't need one for true beginners. I can get by. I need one for
>> intermediate to advanced. I hate the learn X in 21 days (Yea, right.)
>>
>> I prefer more advanced books.

>
> I recommend to get rid of compact edition and learn T-SQL full edition
> with all the features available.
>


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #19 (permalink)  
Old 03-01-2008, 02:41 PM
--CELKO--
 
Posts: n/a
Default Re: SQL to combine columns

>> Please, can you at least recommend a good book that is for intermediate to advanced, in regards to SQL and RDBMS, recent copyright date please? <<

I would use Rick van der Lans INTRODUCTION TO SQL. It is better than
my mercifully out-of-print intro book. After that, when you have the
basics down, get my stuff. SQL FOR SMARTIES has been in print for 10+
years for a reason and SQL PROGRAMMING STYLE and TREES & HIERARCHIES
IN SQL are good references for working programmers. I like my DATA &
DATABASES for a quick intro to principles, but you really need a good
theory book.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #20 (permalink)  
Old 03-01-2008, 02:41 PM
yuri
 
Posts: n/a
Default Re: SQL to combine columns

Thanks, will do.

"--CELKO--" <jcelko212@earthlink.net> wrote in message
news:1173815113.767796.123170@n33g2000cwc.googlegr oups.com...
>>> Please, can you at least recommend a good book that is for intermediate
>>> to advanced, in regards to SQL and RDBMS, recent copyright date please?
>>> <<

>
> I would use Rick van der Lans INTRODUCTION TO SQL. It is better than
> my mercifully out-of-print intro book. After that, when you have the
> basics down, get my stuff. SQL FOR SMARTIES has been in print for 10+
> years for a reason and SQL PROGRAMMING STYLE and TREES & HIERARCHIES
> IN SQL are good references for working programmers. I like my DATA &
> DATABASES for a quick intro to principles, but you really need a good
> theory book.
>


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:37 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com