@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3



Comments:

<0> u are such disabled beach bastard that stick its little ********
<0> **** in every slut cunt even in your niggerbitch of a motherwhore. u are
<0> such damn grizzly mota****ers that put your damn ugly face in a goats
<0> arsehole every day and let your poor dog give you a blowjob all day and
<0> night , you are such cheap wallmart morons, you cum in the cellar all the
<0> time. bah.
<1> shut up
<2> hey there, if i have 2 tables, one has an email address, the other i need to have the same, and they're joined by a pk id .. how would I craft an update that would insert all emails into the table with the missing emails?
<3> insert into t1 (pk, email) values ((select t2.pk, t2.email from t2 left outer join t1 on t2.pk = t1.pk and t1.email is null)) maybe?
<2> elJo: its an update. so i need to find some way to get the id back .. maybe i need to write a small php script or something .. ugh
<3> kinabalu: well, update only affects existing rows
<3> kinabalu: but from what i understood you wanted to add rows, no?
<2> elJo: yeah, i probably wasn't clear .. i want to take the email from one table, that has a particular id .. and update it in another table which has that id
<3> kinabalu: ah :)
<3> kinabalu: so it's a simple update t1 set t1.email = t2.email where ( t1.pk = 123 and t1.pk = t2.pk ) ?
<3> eh forget the ()



<2> elJo: omg .. heh .. i think i completely overcomplicated it
<3> kinabalu: :)
<2> UPDATE profile set profile.email = principal.email where profile.profile_id = principal.principal_id;
<2> thats, causing an error ..
<2> ahh
<2> no profile.
<2> implied.
<2> grr .. didnt work still though
<2> i need sleep
<2> elJo: thanks for the help .. that owrked
<3> kinabalu: np :)
<3> kinabalu: so did it work? cause i forgot to tell you that it should be update profile, principal... ;)
<2> elJo: yeah, i fixed that .. works great
<4> kinabalu: You can't refer to a table (principal) not [derived] in a related FROM clause.
<5> can anyone tell me where I can look to find out how much space an oracle db is using on a linux box?
<4> kaylee_: Look at the tablespaces in enterprise manager or go directly to the data files on disk.
<5> Xgc: where are the data files on the disk?
<4> kaylee_: They're where you put them. You can find them via enterprise manager.
<6> hi, how can i say 'select * from table except mycol1 where key='key';
<6> so i want to select every coloumn apart from a specified coloumn
<7> does anyone know how i can do count(distict(blaat)) ?
<4> Gozzy: Just like that... or use a GROUP BY.
<7> Xgc im working in access & that doesnt work
<4> Gozzy: Next time read the topic first. It'll save everyone some time.
<4> Gozzy: Post the exact query. Guessing probably isn't a good idea.
<8> i need to make a statement that basically says this: find all patients where col x = 'U' OR where the patient has no row in the same table(s)
<8> <8> can I do this without a union?
<8> this is oracle if that matters
<7> Xgc http://pastebin.bafserv.com/paste
<4> tieTYT: The question is not clear. Provide clear and complete information to answer the question.
<7> http://pastebin.bafserv.com/2718
<7> xuse me
<8> i don't understand what's not clear about that
<8> because I used the term 'patients'?
<4> tieTYT: What same tables?
<7> Xgc when i try that subselect seperatelly it give 3 results
<8> in the same table as one with column x
<7> in a subselet 13
<7> (all the rows)
<4> tieTYT: Name the tables.
<4> tieTYT: Use a LEFT JOIN and pick all patients WHERE t2.id IS NULL OR x = 'U'
<8> ok thanks
<8> i think that's enough info
<4> t2 is not the patients table.
<4> You're welcome.
<7> Xgc can u tellme how u would do it using groupby?
<7> im not using a join so..
<4> Gozzy: SELECT count(*) FROM (SELECT DISTINCT Customers.Country FROM Customers) v1;
<4> Gozzy: You can run that against the Northwind database.
<7> never knew you can put a subselect in a FROM :)
<4> Gozzy: You'll find that Access often doesn't support standard query forms. If you're lucky, you can work around the problem, like this one.
<4> Gozzy: It's called a derived table.
<7> hmz ok thx!
<9> hello everone
<9> please, i need your on a little thing that i couldn't figure out how to do.
<9> suppose you have this table http://pastebin.com/531617
<9> i need all the records that have field2 set as either V1 or V2
<9> so this should get me T1 and T2, but not T3. is there anyway to do that?
<10> Hi! In general, is it a bad idea to have NULL columns?
<11> no
<10> For me, it's the choice between that and creating two 1-to-1 tables :\



<10> Okay, that's good then :)
<11> personally I see nothing wrong with having a column that accept NULL values
<11> if that's your question
<10> It is :) It's just that I'm reading this book which "advises" to avoid NULL columns because they 'complicate queries, inserts, and updates'
<11> ah
<11> is that for a particular SQL implementation?
<11> well, I can only speak for myself but I see nothing complicated with NULL values, at least in TSQL
<10> No, it's the Chris Fehily's SQL Visual Quickstart Guide
<10> *nods* I don't see how they would complicate things either. Especially since in my case, it's either a couple of NULL columns or a couple more JOINs in most queries.
<11> IMO determining the number of tables you need shouldn't be based on this kind of considerations
<11> it should be more a matter of logic organization of your data as well as the relative frequency of access to each of them
<11> but then it's all a case by case problem, in which the confidence of the developer into one schema or another has an important role to play as well :-)
<10> Hmm, all right. See, I have a table shipments which contains information about outbound shipments that is imported into the DB daily. Each of the shipments needs to be ***igned a trailer number and dock number. Both of those, however, are ***igned later by the user, so I figured it would be safest to move them into separate tables. However, I'm not sure if that's such a good idea any more.
<12> NULLs can certainly complicate queries. E.g., they sometimes behave inconsistenly in situations with aggregations
<11> right, for aggregates they may behave unnaturally or unexpectedly
<10> Would that apply to COUNT()?
<10> I don't think I'll be aggregating trailer/dock numbers any time soon :P
<11> hmmm... not really
<11> more AVG, SUM, etc...
<12> rkrush: http://www.sqlite.org/nulls.html
<12> (not specific to sqlite)
<11> oh, by inconsistently you meant accross implementations, I see :-)
<12> there can also be trouble with NULLs in columns used in foreign keys
<12> Brez: that, too
<11> can you set a FK on a column that accept null values? :-/
<11> accepts*
<10> That's a good question..
<12> Brez: That's probably not consistent across DBMSes, but in PostgreSQL's documentation, you may read about MATCH FULL, MATCH PARTIAL, etc
<11> oh, my little knwledge is limited to MSSQL... I don't think you can set an FK on NULL accepting column in MSSQL :-)
<12> In short: I still think it's a good general rule of thumb to try to avoid NULLs, although the rule should not be interpreted in a very strickt way
<11> fair enough
<12> Disclaimer: I was "technical editor" on Fehily's book (2nd edition)
<11> lol
<12> There is also the problems with three valued logic, and how to interpret the meaning of NULL (there are at least two ways to interpret them)
<10> Since i'm doing this in Access, maybe it's a good idea to stay away from NULLs in this case, since they would be foreign keys..
<11> I guess the bottom line of this is that there is nothing wrong with using NULL values as long as you are prepared to handle them properly
<12> rkrush: It's hard to say without knowing your specific business situation (which I don't have the time to hear much about)
<10> What do you think about using "dummy" values to avoid NULLs in this case? For example I can have a dock with number 0 that would signify "un***igned", same for trailers.
<11> So if you're not too sure of what you're doping, avoid them :)
<11> s/doping/doing
<12> rkrush: I think that dummy-values are worse than NULLs in many cases
<10> Brez: That's pretty sound advice there ;)
<11> yeah, I tend to dislike those dummy values things
<11> use them as a patch in desperate situations
<10> troelsarvin: *nods* All right, I'll keep that in mind. Thank you :)
<11> not when you're setting things up from the start
<11> or perhaps if you set up a dock table, you can add an entry in it with DockID = 0 and DockName = 'Un***igned'
<11> and you set 0 as a default value in your shipment dockID column
<10> Isn't that a dummy value?
<11> it's explicit
<10> That could actually work, so I think I'll go with that. Thanks :)
<11> and that way you can safely put an FK on the column
<11> you're welcome
<13> can i change this bit of code somehow to get the 2 different id's?"select ec.code, ec.creator, ec.editor, u.id, u.id from examcodes ec, users u where ec.id = 39 and ec.creator = u.pnumber and ec.editor = u.pnumber"
<11> replace one of the u.id by ec.id ?
<13> no, i need both u.id's
<13> ec.creator and ec.editor both come from the u table and i need the u.id's for both
<10> Wouldn't that query return only those examcodes whose creator and editor are the same?
<14> Hi, is there a method to select every n'th row, through a mysql sql statement (or standart sql, or whatever dialect)
<14> let's say we have a table with rows (1,2,3,4,5,6,7,8,9) then do a select statement that gets (1,4,7) (with n=3).
<14> is this possible in one statement ?
<15> what's special about those rows? is it a random thing?
<14> don't understand, lets say they are simple primary keys
<15> what's special about the data in those rows? WHY are you trying to select every third row?
<14> Well I have some data in my database that has a per minute timestamp and I want to get dataobjects with three minute offset to each other in a time range
<14> the data has serialnumbers that is encoded in minutes
<14> so you don't need date and time
<15> can you not then use mod and date serialization?
<14> Hmm, how would you use mod ?
<14> But I think that's a good hint I will try it
<15> ok.
<13> i have a table like this (id, code, level) and i need a query where it returns data if code has 2 or more items, so there may be 2 rows of code = 88, but i only want the rows where there are the same levels so there are 2 rows of code = 88 and level = 99, however i don't want rows returned where code =88 and level = 98 and level = 99
<13> if that makes sense
<15> it does, I'm just struggling to think of a solution


Name:

Comments:

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






Return to #sql
or
Go to some related logs:

#asm
get around sonicwall tor
lookbehind assertion ruby
i live to serve lisp
screen Cannot find terminfo entry for 'rxvt-unicode'
#kernel
#php
gmail ohgood
#ubuntu
#openzaurus



Home  |  disclaimer  |  contact  |  submit quotes