@# Quotes DB     useful, funny, interesting





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



Comments:

<0> Instad of ****ing with the query in a stupid *** way.
<1> I agree with Drk`Angel, its a display problem, not a db one
<2> hmm, i do get your point though, its not practical to do it within the database
<2> thanks
<3> is there any way to have a char column longer than 256 characters? (mysql 5)
<4> Hi, how can i debug stored procedures in SQL Server 2005?
<5> I have a view that does five inner joins, and would like to add a new auto increment key as a view column. is this possible?
<6> enoma : which rdbms?
<5> ms sql
<5> 2k
<5> arg. this would save a lot of time..



<6> dunno - why don't you try it, and see how far you get. then ask if you have a problem
<7> what tool can i use to export a oracle databas to another database
<4> if (select id_user from users where id_user = 1000) = null print 'User doesnt exist'
<4> what is wrong with that? the select is not returning a null value when user doesnt exist
<0> It would return no rows.
<4> not a null value?
<6> Euuu : use if not exists()
<4> how can i check if there no rows?
<4> ok
<6> Alexi5 : what do you mean by "another"? another oracle database? a sybase database? db2?
<6> Alexi5 : just tables and rows? all schema including rules and procs?
<4> YuppieScm, thanks
<6> Euuu : you're welcome
<6> nice to see someone has manners, and is capable of asking simple, declarative questions
<8> hello all, i'm working with MSSQL trying to figure out how to do a count of a max...basically get a max for a field to find out if a member attended at least one service, and count the number of members that did, for each service i'm bringing back...apparently i cant do a subquery in a count()..any ideas for another approach?
<0> Having trouble understanding what you want to do. You want your result set to have everyone that attended at least one thingie, along with how many thingies they attended?
<8> i'm looking to return, for each service, (which each have multiple dates) the number of unique members that attended at least one date
<0> So, you haave tables about like this? services (serviceid, desc) servicedates (serviceid, date) serviceattendees (serviceid, memberid)?
<8> the tablservices, servicedates, membersservices, membersservicedates
<8> so yea pretty much, but registration is for the service as a whole and attendance is for each date
<0> What's wrong with joining sercies to memberservices, and doing a count?
<8> that will return how many registered
<8> not how many actually attended at least one date
<0> Ah, ok.
<8> thats another piece of it I already did :P
<8> basically in the main query, i do join those two, and i'm trying to use a subquery to grab the attendance
<8> i thought i could use a count() of a max() but apparently thats not possible :)
<0> sec.
<0> Something kinda like this should work: http://sql-servers.com/nopaste/?show=689
<0> er. toss in memeberid on the memeberservicedates join too.
<0> Forgot that. :)
<0> But, that's why I said like.
<8> er i meant sum() of a max() but yea i think i follow ya, i might have to toss in another subquery in there
<0> You get the jist thogh, and that should get you on the right track.
<8> yeah
<8> thanks :)
<9> hi guys, using MSSQL 2005, ihave a column defined as type 'float', im trying to store the value '0.2' (using C#) using SqlCommand, but the value in the DB becomes '0.01999999524'. Im only storing a value between 0 and 1.0 so what should I use instead to keep the exact value?
<10> numeric, money, decimal
<8> or just make the scale 1
<10> floating point types are imprecise by design
<8> if all you want is 1 decimal point
<9> i want at the very most, 3 decimal points
<9> guess ill use a money type then
<9> or smallmoney, even better
<9> cheers guys
<8> woot i got it, thanks again drk`angel :) I was making it harder than it should have been, just did a count of a subquery with a select distinct where attended = 1



<11> hello, what could cause MSSQL to be super slow at inserting into a table? i'm using OLEDB to insert rows and it takes longer than 10 min to insert 500 000 rows, SELECT on the resulting rowset behaves normally it's just inserts that are slow
<1> lots of indexes?
<1> triggers?
<1> how are you inserting?
<8> 500,000 rows is quite a bit of rows to do at once lol
<11> it's a table with just an integer column and a nchar[40] i'm inserting with a simple INSERT INTO table_name (column_a,column_b) VALUES(val, 'val') statement
<11> ken_: yeah i won't actually have to add that many but i'm just surprised it's that slow
<8> is it one statement, or a loop through? oledb is probably the culprit not sql server
<11> a loop, but all the cpu time is being spent in the sqlserver process
<10> 10 min for 500,000 rows? Sounds about normal.
<11> plus OLEDB is the native api which has the less overhead
<10> OLEDB isn't the native API
<10> OLEDB is a generic COM-based DB API
<10> Where is the program relative to the server? What network client/protocol is it using?
<10> Are you issuing 500,000 individual insert statements?
<11> well i'm using ms-sql 2005 and unless i read the docs wrong it does use OLEDB as native API, the program is on the same machine, and the server only uses shared memory, no tcp/ip or named pipe
<10> Have you profiled the duration of the individual statements?
<11> no, will do, and yes i'm issuing 500,000 individual statement
<11> when you don't explicitely start a transaction and commit it auto-commits for each statement right?
<10> Yes.
<10> Problem with pushing inserts like that is that the program halts until the server responds and that is usually the bulk of the overhead.
<12> Your mom auto-commits on every statement.
<13> sql server 2k: say I have a table T that has 3 fields: id, value, next. next is the id of another row. what I want to do is copy the value field from one row to the row pointed to by the next field. for example if I have these values(id, value, next) [1, 44, 2] I want the row with id=2 to have value 44. I've tried using this update statement, but it doesn't seem to work: UPDATE t SET value = myt.value FROM t myt WHERE id = myt.id. could any
<10> Gotta do a self-join
<14> hi... I have this question concerning relational algebra and sql
<1> sounds like homework
<14> I know how to transform a % operator to sql... but I can't really understand why... can someone elucidate...
<14> not really
<14> it's more like, I want to understand... I already know the answer
<1> whatever
<14> so it's not cool to ask?
<13> Halo_Four: thanks.
<8> whats the kind of numbers called when they cant have a period in them, hurry up plz my teacher will be back any minute
<15> there's an addison wesley book called "Database Systems" that has chapters on relational algebra
<16> ken_: whole number?
<16> or perhaps an integer
<14> I have that book... I also have date
<14> 's
<8> i was joking :(
<16> :(
<15> oh
<1> heh
<14> I understand % ... I just don't understand how this sql snippet works http://sql-servers.com/nopaste/?show=690
<14> I've been looking at it for quite some while
<17> I'm reading throught the MSSQL 2005 docs, and they say theyre removing Stored Procedures in favor of this 'CLR'... what is that all about, and is that going to mean all of my standard SQL stuff will get torched too?
<10> They aren't removing stored procedures at all
<17> according to the docs:
<17> This feature will be removed in a future version of Microsoft SQL Server. Do not use this feature in new development work, and modify applications that currently use this feature as soon as possible. Use CLR integration instead.
<17> under the title: Extended Stored Procedures Programmers Reference
<17> http://msdn2.microsoft.com/zh-cn/library/ms164643(d=ide).aspx
<10> "Extended" is the key word
<17> theres a difference? :(
<10> Yes, extended sprocs in SQL are written in c.
<17> aahh
<17> ty kindly


Name:

Comments:

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






Return to #sql
or
Go to some related logs:

kang duk won
system-configure-display reboot
#3dsmax
#gentoo
cam chat sxcy x
#red
#nhl
HAO.V (CDN)
#gentoo
cyraquil



Home  |  disclaimer  |  contact  |  submit quotes