| |
| |
| |
|
Page: 1 2 3 4 5 6
Comments:
<0> sure <1> Gm0nEy : which version? <2> SQL 2000 <1> Gm0nEy : yeah - select * from <table> will report all the rows <1> what more could you want? <2> lol <3> What kind of "reporting features"? <4> you can use MS reporting services on top of sql 2000 <4> as lng as you can stomach that whole .net arena in designing the reports <5> CoJones: is there an equivalent command to minus in access sql? <4> - ? <5> I have two views, identical fields.. how do I get View1 minus View2's records in View1? using access 2003 <6> can you do a left join in access? <5> i believe so.. <5> ive tried all sorts of joins and i always get a cartesian product of records <6> heh
<5> View1 is all the records.. View2 contains all the records I don't want in View2 <4> then youre not trying the joins properly <5> obviously.. <6> a LEFT JOIN b ON a.id = b.a_id WHERE b.a_id IS NULL <4> so did you try reading about joins ? <5> ah, thank you upb <5> you'd have no idea ive taken to db courses in my life.. <5> *2 <4> nop, we wouldnt <5> i guess it all depends on what you choose to specialize in <6> why didi you take the courses then?:P <6> bad excuse <5> i didnt have a choice <5> part of comp eng and comp sci curriculum's <4> a better excuse woulda been 'im a bit crap and didnt pay attention to any of it' <7> just because you don't specialize in something doesnt mean you avoid it like the plague <5> i agree, but ive gotten by on just basic sql knowledge <5> till today <4> thats arguable ;-) <7> hehe <4> left join isnt really that hardcore <6> hehe like some guy told he had 10+ tables in his schema and didnt use joins ever <4> lemme guess, one for each of his 10 customers ? <6> what he did was iterate over the resultset in php and do another query for each row :P <6> it was on this chan btw ;P <4> :~( <5> only db's ive used out of the cl*** room is for simple web apps.. i never really did grap the whole right/left/inner/outer joins.. just simple primary/foreign key matching <4> well, do yourself a favour <4> spend an hour learning them cos thats all it takes <4> and then a db opens itself up <5> yeah.. i will <7> there are probably some good join tutorials on the net <5> this ones pretty good but it just tells you the bare essentials of what each type of join does: http://www.devx.com/dbzone/Article/17403/0/page/1 <5> didnt help me with a Set A minus SubSet B <4> depends if you want the answer on a plate, or if youre willing to apply what youve learnt <8> heloo <5> yes.. i was at fault <8> it seems <5> hey, you can't flog me too <9> dynamic ORDER BY without a case statement in the lastest version of MSSQL, has anyone done it? <4> oh not you again <9> inside a user defined function heh <9> yeah I have to look at it again <4> yeah, and remember last time ? <9> I remember somewhat, been working a lot lately <4> we discussed it for wayyy too long without you ever saying why CASE is not acceptable <4> its not possible. use CASE. <4> case closed. <9> oh because I don't know what I'll be ordering by <4> then use CASE <9> if I can't enumerate what I'll be ordering by, how could I use case? <4> you dont understand what CASE does, do you? <9> yes, I understand what a case statement is <4> tell me <9> CASE @this <9> WHEN 'A' THEN blah end <4> ok great <4> but you say <9> however, I don't know what @this might be <4> ? <9> so how can I ***ign whens for it
<4> you dont know its range of values ? <9> no, because @this needs to be dynamic <4> why? <4> you have infinite fields in your table ? <9> no, but an extremely large set that would be next to impossible to maintain in a CASE <9> I use a CASE now, but it's just getting way too big <4> get used to it, thats sql im afraid <4> a big query doesnt mean its a bad query <9> I know, I was hoping some SQL hacker had figured out a way around it <9> without using SQL 2005 <4> ok, well without 2005 im fairly confident in saying the only way is a big case <4> or call diff procs depending on the order by field, but again youre just using a case to decide which to call <9> 2005 isn't even service packed yet, we can't even pretend we're going to use it or we'd lose customers <4> however you slant it, you need an IF THEN ELSE <4> i dont use 2005 yet either <9> I just can't do that for the amount of fields, sigh, this ****s <4> well maybe go back to the drawing board and rethink your design <4> why cant you anyway, once its written its written <4> its not like you gotta write it 1000 times <9> yeah, we were just doing that even though it's ****load of work when you have 1200 sps and udfs <4> maybe youd be better sorting it client side then? <9> not a possibility for us =( <9> oh well, thanks for the hel Carpathia <4> :( <9> err help <4> theres no other way, what can i say :) <9> yeah heh <4> id say sorry, but i didnt design sql ;P <9> be back soon I'm sure, adios <4> heh <6> what is he trying to do?:P <4> some bs <6> heh <4> order by an arbitrary field without using a CASE <6> ah <4> time for him to call Gandalf i think <6> and he has 1000 fields?:P <4> well, id take that with a pinch of salt <4> more like 10 <6> lol <9> I'm back already hah <4> hey thats no joke <9> What about creating tables with duplicate columns and then using the columns to order? <9> duplicate sorted columns <4> ? <9> #temp tables <4> what? <9> this is all inside a user definied function <4> UDFs cant create a temp table <7> VRik what is your scenario here <9> attempting dynamic order by <7> broader <9> can't use case statement <9> ok <4> no, be honest, wont, not cant <9> we have a udf that gets ids depending on what they specify in search parameters. Right now we use CASE statements in our ORDER BY to accomplish the sorting, as in CASE @this WHEN 'A' THEN blah.... END <4> ok, and what problem is that causing ? <9> The problem is that we are starting to need more and more possibilities for @this <7> VRik so this is a search engine? <4> how about p*** @this2 ? <7> where the user may want to order by different columns <4> or make @this an int instead of a char <9> yeah, call it a search engine <9> right and that number of columns is growing much larger <4> ok so lets say you find a way without case <7> what's wrong with adding more cases? <4> exactly how do you envision it working ? <4> sooner or later you gotta make some decision base don a param <4> ie, an IF <9> tenfour : too many column possibilites makes it crazy to maintain <4> ie, a CASE <7> somewhere in your logic you are going to have to branch on @this <7> so logically there's no problem with putting it in a case - that's exactly what it's built for <4> i think youre not really telling us the real problem
Return to
#sql or Go to some related
logs:
1680x1050 wallpaper #beginner unable to initialize Ntbackup #mirc #politics #windows #freebsd #freebsd #debian #fedora
|
|