| |
| |
| |
|
Page: 1 2 3 4 5
Comments:
<0> ??? <1> loool <1> no mysql here <0> i cant talk in #mysql <0> n/m <0> now i can <2> sql server: when i try to insert 'Route d'Agy', it gives me exception Line 1: Incorrect syntax near 'Agy'. "Unclosed quotation mark before the character string " . How to resolve this problem ? any addquotes() function in sql? <3> escape your ' character <2> thats values i am getting from another database. can you tell me how ? <3> how are you getting it from another database <2> .NET: i am reading from an access db to DataSet, and i am creating insert queries with that data and INSETing to sql server. <2> will [ ] solve this problem ? <3> why don't you try and find out <3> escape a character with itself <2> okey <3> in sql, generally
<4> should this work in sql? SELECT (SELECT COUNT(DISTINCT videos.id) FROM videos) AS video_count, (SELECT COUNT(DISTINCT photo_gallery.photo_id) FROM photo_gallery) AS photo_count <4> mysql <5> morning all <6> g'morning yuppie <6> which occurs first: a WHERE clause (validation/etc), or an aggregate function? <6> in processing a query <7> WHERE <7> The SELECT clause generally always executes last, although you can't really think of the statement executing in any form of sequential order. <6> just have to be sure that doin an agg fn will apply to the records after the WHERE clause has been "accounted for" (lack of better term)... as opposed to WHERE being used against the results of the agg function... which would make it harder for the WHERE to execute prior to the agg fn <6> thx though <8> the WHERE filters, the SELECT applies <9> good morning all folks <10> sup d2d <11> sup there SicLuDe <11> i was having lunch while watching anime :) <12> Why do i get this error: http://frw.se/sql.gif ? <13> ok, I'm using MS T-SQL and I've got a tricky task... I'm making a multiple-choice quiz where I need to pick 3 incorrect answers and 1 correct answer from a table - so far I accomplished this by doing a union select with the first select requesting top 1 and looking for a matching id, and the second select requesting top 3 and looking for a non-matching id... so far so good. But then I have 2 more things... <13> I need to order them randomly... <13> and also I need to add a field called [letter] which will letter the answers A,B,C,D in sequential order after they are randomly ordered. <12> Is it possible to get access to the databases even if the database is not working? <13> that's a really weird question <12> heh <12> my sql server doesnt work.. its broke.. and i want my databases! <12> Eeker: look at http://frw.se/sql.gif <12> I get that error and i cant access my database :S <13> one sec <13> I'm sorry - I'm not a DB administrator. I don't know the answer. :-( <13> databases are secure so I don't think it's easy to hijack the data outside the normal server <13> I'd recommend trying to troubleshoot why it's not running <13> check the service <14> frW is it running? <12> CoJoNEs: ye <14> are you getting the error from only one machine tryin to connect? or all? <13> coJoNes : Do you know a good method for randomizing? <13> ok, I figured out the randomizing <13> now I just need to figure out the alphabetic randomization <13> not randomization... incrementation I mean <5> frW : did you answer the question i posed earlier? <12> YuppieScm: What question? <12> Looks like you got net-splitted, so i must have missed it <5> frW : what are the symptoms? what leads you to believe it's not working? what error messages to you get? <3> do* <12> YuppieScm: i posted an image. but im gonna re-install the computer next week so no need to fix it <5> k <13> damn it blows that they haven't taken the time to write a random orderer in SQL 2005 <13> wth is that all about <15> sql2005 <15> you want to know what blows <5> Eeker : a random orderer? <15> having to type true|false in the em interface <15> bastards <5> wtf would *anyone* want a random orderer in an sql engine? <13> yuppiescm : I'm creating a multiple choice quiz and I need possible answers to be pulled randomly from a table <13> hehe <13> he quits <16> Eeker what db? <15> sql 2k5 <16> randomization is something that generally should be done onthe client side i think <13> if I have a database of vocabulary words, it's pretty silly to capture thousands and sift through them client-side <16> its just about as sillyas expecting a db to randomize them for you :P
<5> Eeker : what's wrong with 'order by rnd()'? <5> if you really really have to do it at all <16> ms sq;l si[[prts tjat <13> well, I don't know why you would qualify it with "if you really really have to do it". My purpose is pretty straightforward. Anyway, using newid() (like rnd() but in mssql) will have issues if you're using a union select. <16> ms sql supports that? <13> mssql is newid() <13> but if you have a union it takes much more work <5> Eeker : newid() is nothing like rnd() <16> im talking to YuppieScm <5> hm... can't remember if it's rnd() or rand() <13> it's rand() <5> Eeker : and it's nothing like newid() <13> and it's hardly random... it provides a random number in a predictable way... so if you run a random number on some sort of seed, the resulting random numbers are in the same sequential order as the original seeds <13> pretty ridiculous <16> SELECT TOP 5 * <16> FROM glacialcomponents.Auth_Pages <16> ORDER BY RAND() <16> hmm <16> that <16> like <5> rand() returns a double between 0 and 1 - newid() returns a guid <16> doesnt do any randomization <16> lol <16> least in sql 2k <13> exactly... no randomization with rand() :-) <5> there is if you seed it first... <5> damn, you people need spoonfeeding <5> but my underlying point was/is, sql is all about getting *specific* data <5> not getting *whatever* <13> I've been through all this... if you go out and read there are countless google pages with people explaining how rand() produces sequentially predictable random numbers given whatever the seed is <13> it will not help you with random ordering <13> YuppieScm : Do you have a better solution for getting multiple choice quiz answers? <16> lol <16> these are usually the same people who develop a spider solitaire game <5> Eeker : two things - (1) it's ususally random enough (2) sql isn't about random data anyway <16> and their "randomization" that they spent 5 weeknds from sudnay on <16> produces 5 9's in a row <5> Eeker : yes <5> Eeker : i have a much better way <13> Yuppie : Thanks for the suggestion but I'm afraid you're mistaken about random... it's not "random enough". Just go run a query and add a new manual field created by doing rand() on any sort of seed and you'll see what I mean. <13> ok, I'm listening <5> Eeker : is your data properly normalised? <13> what specifically you mean by normalized ? <13> do <5> i didn't say normalized, i said normalised <16> heh <13> forget it man <13> have a jolly good day chap <16> huhu trying tocreate a GUID for randomness without knowing what normalisation is <16> huhu <3 HALLO SIR WELCOME TO TEH ****ED UP WORLD WOULD U LIE TEH RED NECK TO BE MANAGING TEH NUCLEAR POWER STAtiON ??????/ <5> well, for a quiz, i'd have a table of questions, with a column indicating the id of the right answer. then i'd have a table of answers, and a third table with id of question to id of answer, to give me a list of 'possible' answers to any question <5> so that an answer could be a possible for more than one question <13> but for multiple choice, how would you produce 3 possible answers for the user that are incorrect? <16> or even more fun produce 2 answers that could be correct <16> huhu <5> so, once i'd chosen a question, i'd look up all the ids of possible answers excluding the right one, and select several ids at random <13> how would you select them at random :-P <5> you could actually do this all in a stored proc <13> we're back to square 1 <13> it is all in a stored proc <5> or, return the list of possibles bac kto the client, and have *it* select the random items if you need more randomness than ms-sql provides <5> or, write a random number generator in c# and add it in as a udf under ms-sql2k5 <13> so you're issue with "randomness being unnecessary" is not in general application but in databases? <5> "you're"? <5> do you mean "your"? <16> randomness usually <13> is that what you think I mean? <16> is something that you only do on db side because one is lazy and wnats the quickest rooute to somewhere <5> i don't know - that was just a suggestion <16> course why you're worried about predictable randomness <16> in a 4 solution <13> Yuppie : I doubt anything I'd say could mature you in this respect, so I'll just leave you to your word-analysis mongering. <16> whilst youcontinue trying to use a GUID for a random generator while still wondering what somebody meant by normalisation? <16> :p
Return to
#sql or Go to some related
logs:
SendInput VB Sample Source make boot cd #computers pfsense webalizer soccerish
#politics #politics #slackware fartbrazil downloads #politics
|
|