@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12



Comments:

<0> select customerID, max(time) from customers group by customerID; that might work
<1> max(time) doesnt give me an ID though
<0> nope, customerID does
<1> so to get the ID i'd have to join on it
<1> i'm llooking for visit.id
<0> ah oops i put wrong tablename
<0> select id, max(time) from visits group by id;
<0> your tables don't make much sense :-P
<1> yes they do
<1> customers have many visits
<0> so?
<0> select distinct id from visits; = list of all customers
<1> i want customer ID and visit.id of their most recent visit
<1> http://rafb.net/paste/results/INcInl50.html
<1> that will do it but i know there's some way to avoid the subselect
<0> are you not able to customize the query based off what I gave you?



<1> you haven't given me anything :P
<0> what database are you using
<1> mssql
<0> haha ok
<0> no wonder you don't understand sql, have fun
<1> ?
<1> i didn't say mysql
<1> and i know how to do all the stuff you said just fine
<1> do you see the query i pasted?
<1> and what my actual question is?
<1> my query works, yours don't
<2> Database technology is now expanding and the need to handle very large heterogeneous databases make parallelization the only valid approach for the next generation of DBMS's. The high potential of the parallel databases and the rapidly increasing sizes of databases require that both the vendors and users have a deep understanding of parallel database systems. The book is intended for the well-informed specialists in DBMS and for computer en
<2> where is that jerrette guy
<3> Try to avoid subqueries in the select clause for simple queries. It just makes t hings harder to read.
<3> select * from visits where (customerid, time) in (select customerid, max(time) from visits group by customerid) would also work.
<1> ah i see why terminus said my tables are dumb
<1> it's because i left out customer info like name hehe
<3> Would probably be useful.
<3> Just join to cusomters at that point to get what you need out of it.
<3> Ok. Off to bed, midnight too late for this stuff.
<1> later
<1> thanks
<4> in sql server 2005, how do you do a query to produce a sequence of numbers. i.e 1000 rows, with a column going 1 to 1000?
<5> SQL Server doesnt have a logical field ? i.e., True/False ?
<1> it has a bit datatype
<6> im learning SQL right now, i think its cool as ****
<1> kprosser just do a loop from 1 to 1000 and insert
<7> is it possible to subtract 2 date-times? "'2006-03-27 04:00:00' - '2006-03-27 03:00:00'". How do i get the 'interval' between 2 dates?
<8> which db for gods sake
<7> mysql
<8> datediff most likely
<7> k thx
<7> how would i get the hours p***ed between 2 date-times in mysql?
<8> read the documentation on datediff?
<7> yes, it only gives days p***ed
<8> no, it doesn't
<7> DATEDIFF() returns the number of days between the start date expr and the end date expr2. expr and expr2 are date or date-and-time expressions. Only the date parts of the values are used in the calculation.
<8> timediff perhaps
<8> jesus, mysql blows
<8> SELECT unix_timestamp(date1) -
<8> unix_timestamp(date2) FROM table_name
<8> that will give you the number of seconds between the two dates
<8> divide by 3600 to get hours
<9> lol
<9> mysql ****s the huge nads dude
<9> we only use it for rudimentary web stuff
<9> our proper servers run sql server for a good reason
<7> lol
<10> ;_; no one likes me
<10> im a nice person
<11> ...
<10> lazaron, do i seem nice to you?
<9> with a nick like avenging?
<9> lol
<10> i nicely beat the crap out people who offend me :o)
<10> and i try to make sure i dont neuter them with my steel toe cap boots :oP
<10> why is no one talking? :o(
<8> you have failed to meet the criteria for being interesting.
<12> what's the easiest way to automatically move .BAKS over the network to another server?
<11> i'm playing eq2
<12> robocopy with batch files?



<12> I wann auto back up the .bak and some other non sql files to another server nightly
<9> um
<9> make a batchfile
<9> and schedule it
<9> *shrug(
<12> what should i schedule the .bat file with?
<9> windows scheduler?
<8> you can also schedule a job in sqlserver
<9> but to a different pc dfworking
<8> but i think an external schedule is better
<8> so
<9> schedule the backup
<9> to local disk
<9> and then run the batch file
<9> to copy/move it
<8> yes, i was simply saying he could do both from the db
<8> but i don't think its a good idea
<9> i dont think u can backup to a different server
<8> backup the file, run the batch file to move ****
<9> ^^
<8> ...
<10> in other words, all that ^ was a waste of time
<13> ola
<10> hey baz
<13> hows life today
<10> as fun as getting lube of your **** with sandpaper, u?
<13> took the words right outta my mouth
<8> were your parents cousins by any chance
<13> i see a lot of channels with hundreds of people in them and it surprises that there isn't a crap load of chatting
<8> some channels have people in them that don't speak when nothing of value is to be said
<10> no df, not everyones pearents were cousins
<13> tis better to remain silent and thought a fool, than to speak and remove all doubt
<13> so i do have an sql question
<13> using this FROM: Contact INNER JOIN [User] ON Contact.ContactID =[User].UserContactID
<13> i get a recordcount of 10000 records
<13> however there are 15000 records in the CONTACT table
<13> how can i isolate/delete the 5000 CONTACT records that aren't related to any USER records
<8> SELECT c.contactid FROM [user] u LEFT OUTER JOIN contact c ON u.usercontactid = c.contactid WHERE c.contactid IS NULL
<8> will give you the contactid's that don't have a corresponding usercontactid entry
<8> then you could simply use that in an IN clause in your delete
<8> but there are other ways to do it
<13> looks great... i don't need the most efficient algorithm, i'm just doing some db cleanup - gratsi
<10> brb, im outta cola
<13> how come MySQL is banned in here btw, any special reason
<8> mysql is to relational databases as michael jackson is to being male
<13> really?! thats the first time i hear someone knock it - why do u say that\
<13> in terms of performace its in the same league
<8> its a poor excuse for a sophisticated relational database
<8> no, in terms of simplistic data retrieval and insertion its got good performance
<8> what it does well, it does very well
<8> but its not a replacement for a solid enterprise cl*** rdbms
<13> whats something it ****s at the others do well?
<8> complex logic, transactions, triggers
<8> check their to-do list
<13> hmmm, did not know any of that - do u know of any good article i could read that talks more in details of this
<8> just google it i guess
<8> anyone that bothers to write about mysql is usually writing about why its so great
<13> and all this still stands for mysql5?
<8> i don't know what they may have implemented in 5 that makes it less ****ty
<13> when companies like ebay stand behind it, it gives it good credibility
<8> again, if your uses are shallow, non-complex queries then its a good option
<8> um, i find it difficult to believe that ebay has based their entire system on mysql
<13> let me get u the link - its probably not the ENTIRE system
<13> wikipedia, craigslist, etc. http://www.mysql.com/why-mysql/mysql_power.html
<8> none of which are mission critical applications
<13> well wikipedia i think uses it exclusively
<8> anyway, not going to argue the merits or lack thereof of mysql
<13> u are enlightening me, i just wanted to get some more insight - no arguments
<8> i could not do half of what i do in sqlserver in mysql
<13> r u using 2005?
<8> i don't mysql even has stored procedures yet, but they may have added it
<8> not yet, 2k still
<8> i don't think, rather
<13> they have triggers and SP


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #sql
or
Go to some related logs:

#stocks
#beginner
#beginner
#windows
#red
#nhl
zzmollbat
#networking
#computers
curry nivida



Home  |  disclaimer  |  contact  |  submit quotes