| |
| |
| |
|
Page: 1 2 3
Comments:
<0> damn - my laptop now has an uptime of 811 days <1> YuppieOTL, 2 years and a half :D <1> incredible <2> YuppieOTL:: i would feel really bad was I your laptop <2> s/was/were <2> wth. <3> yar <4> I have a mssql table with two datetimes. I need the average difference between the two. Does anyone have an idea how to do that ? <3> avg(abs(dt1 - dt2)) <3> erm, average <3> group by abs(dt1 - dt2) <4> abs does what ? <3> absolute value <4> "Implicit conversion from type datetime to float is now allow" <3> so explicitly convert it then <4> So I need to use CONVERT or something ?
<4> ok <3> I hate the way MS-SQLServer handles dates and times <4> ;) <5> hi <5> i need some help with a query: i need to do a search and get all students with all the grades in my search and with a cote equal or grater then the search cote for those grades. You can find the tables here: http://www.pc-architect.com/~ann/help.htm Please help... <3> cote? <6> I'm still trying to figure out how you manage to design a schema and not know how to get the data you need out of it. <5> like a number, saing for that grade they got a good chance to score or not <5> so i need all students that were predicted to p*** the exams with X chance kind off <5> rmah: understand? <6> Main Entry: cote <6> Pronunciation: 'kOt, 'kt <6> Function: noun <6> 2 : a shed or coop for small domestic animals and especially pigeons <7> @param_IDs, delete from [table] where [id] in (@param_IDs) when @param_IDs= "1,2,3,4" gives me an error <6> I'm not aware of any rdbms that that will work right in. <3> wtf is a cote? <3> k00: you can't do that <7> ahh i see where i went wrong <7> i would need @param_IDS = " '1','2','3'" etc <6> Why, is ID a string? ;) <7> IDs <7> meaning , more than one :-D <6> Yes. If you ID field isn't a string, why would you think p***ing a list of strings would help when a list of numbers doesn't work? <7> lol <7> true. <7> So..why does tsql favor strings like this <3> because it ****s? <7> thats one possibility <8> so when the topic says "useless info here"... <8> does it mean "here" as in the chan /topic... or "here" as in the chan? :P <3> the world is a mystery <9> the world is like chicken <3> like a giant chicken? <9> semi giant <1> In sql server 2005 I have a stored procedure with a SELECT inside. I want to send the output only if this select return at least 10 items. Have I to write 2 SELECT (one with COUNT and one normal) or there is a way to do this with a single SELECT? <3> BlackArro: at a guess, ***ign the results of the select into a variable and then return based on some attribute of that var <1> for example? I have to use DECLARE var inside the stored procedure and use var = SELECT ...? <3> I don't know <1> probably I can use the SET NOCOUNT OFF. I try! <6> @@cursor_rows, probably. <1> ok, I found @@ROWCOUNT :) <0> BlackArro : there is no way to do this with only one select from a stored proc <0> there must be at least two <1> the first is the SELECT COUNT and the second is the SELECT, isn't it? <0> yes <1> ok, thanks YuppieOTL <1> I have a SELECT but I want to display before records with PK >= 150000 and after records with PK < 150000. Can I do it with a single SELECT? I tried using where pk > 150000 OR pk <150000 but it always returns fields from the begin. <6> What? <1> excuse me for my English <1> :( <6> If you want records with pk >= 150000 and with pk < 150000 ... well, that's all records. <1> yes, but you want to see records higher than 150000 before and records lower after <6> You need to build an order by to do it, there where clause has nothing to do with the order of the result set. <6> Probably have to use case <1> I tried with the UNION statement and it works well. :) <10> I'm using MSSQL 2005. Does anyone know how to filter out indistinct records for only one field in a select statement where there are multiple fields returned? <11> (sqlserver2k ent) if I make sqlserver pick a random number between 1 and 4 over and over again, will it equal 2 25% of the time?
<12> no, it'l be 2 50% of the time <11> 50%? <11> why 50%? <12> ya, there's only 2 numbers between 1 and 4, those are 2 and 3 <11> I'm saying 1 through 4 inclusive <11> 1,2,3,4 <11> it will equal 2 25% of the time? <12> heh, well, you gotta specific <12> what do you think? <11> I'm hoping yes ;) <6> Over enough iterations, yes. <6> It is random, after all. <6> Which means it will occasionally be streaky, but over long runs it'll be fine. <11> Drk`Angel: ok cool thx <13> Hello. I'm reading some SQL for PostgreSQL, and i have come across the abbreviation "oid". Can someone please tell me what this might mean? thanks. <9> did you check google first? <9> if you did you'd find the answer all over the place <9> oid is a unique id in postgresql <9> every row is implicitly given <9> object identifier <13> yes, I see the abbreviation all over the place, but nobody says what it means. I see that it is a postgres type, but ... Thanks for the help, Darken. <9> it does say what it is <9> google "postgresql oid" <9> and you find it all over the place <9> i verified <9> every single link tells you what it is <9> even in foreign languages <9> i don't mean to bite your head off <9> just check a bit better on simple questions :) <13> thanks, Darken|. <1> is there a way to improve a LIKE %keyword% query in mssql 2005? <14> BlackArro : yes <1> ok. What is it? <14> BlackArro : depends <14> BlackArro : first you need to ask a more detailed question <1> I have a select ... where field like %keyword% and the field is an uk field <1> so there is an index on the column where i do the LIKE <14> 'uk field'? <1> unique key <14> what is the data type? <1> is nvarchar 150 <14> do you insert to that table much? <1> no <14> 150-unicode char unique values? heeheehee <1> yes <14> which rdbms is this for? <1> there is a PK int and a uk nvarchar 150 <1> i'm using sql server 2005 <1> the like is on the uk field <1> do you think a Create statistics on this field can help me to improve performance? <14> if you're doing %value%, then the uk isn't going to help at all - you need to use the full-text stuff <14> no - create stats won't help you a damn bit <1> what are statistics for? <14> what? <14> that question indicates a number of holes in your understanding of sql as a whole... <1> For what statistics are useful? <14> the stats are used by the query optimiser/parser engine to decide where to start looking in the index <1> Yes, I'm not an expert and my English is not good. I'm sorry :( <14> any worthwhile database will have a scheduled job to update the statistics - more often for a heavily updated index <14> but this has nothing to do with your problem <14> the uk will only help your lookups if you are doing field like value% <14> but you're not <14> you're doing like %value% <14> so the index is almost totally useless <1> ok, I understand. So i have to use a full text index <15> hi, is there anything in MSSQL server that's similiar to the SET data type in MySQL? <14> face- : nfi. what *is* the SET datatype? <14> face- : did you not understand the question? <15> allows you to store multiple values in one column, in a somewhat clean way <1> but when I use CONTAIN(field, 'keyword') it returns me different results than like %keyword% <14> no ****. that's another good reason never to use mysql - using a single field to store multiple values is a sign of a ****ty design <14> that mysql actually supports it is the sign of a ****ty rdbms <1> are there a full text command equal to the like %keyword%? <14> so, the answer is 'no, there is nothing in ms-sql that is the equivalent'
Return to
#sql or Go to some related
logs:
#windowsxp #debian #linux-noob sunce chat daily q.n225 wrong # args: should be while test command XBMC bangbros plugin. #computers #visualbasic #politics
|
|