| |
| |
| |
|
Page: 1 2 3
Comments:
<0> <1> i modified the code to this , http://sql-servers.com/nopaste/?show=146. It runs but with same results <1> you cannot join with products_ordered <1> that will multiply the results like you found out <0> i understand , but there must be a way to do this. I mean is it impossible <1> ok, you know what, since you seem to ignore my advice I'm going to follow on that trend <1> good luck <0> ok thanks. Atleast i know it cant be done. <1> it can be done <1> I already told you the solution <1> but never mind, you go on doing it your own way <0> i tried that , u know i did <0> <1> i modified the code to this , http://sql-servers.com/nopaste/?show=146. It runs but with same results <1> remove products_ordered from the join <0> k , but how do i include product_id. As thats the only place for it . In product ordered <1> and why do you need to include product_id? <0> stored procedure could be run for that particualr product
<1> and as I said, use the WHERE parent_auto_id IN ... <1> to get that <0> i tried that <0> <1> i modified the code to this , http://sql-servers.com/nopaste/?show=146. It runs but with same results <0> check it <1> the trick is to do both things <1> 1. use WHERE ... IN <1> 2. Remove products_ordered from the join <0> but again if u look at the diagram and the stored procedure i cant remove join from the stored procedure. Unless i am understanding u wrong <1> well, let me just say this the last time <0> in which case u can modify the query and paste <1> you ... need ... to ... remove ... products_ordered ... from ... the ... join <1> is that slow enough for you? <1> because if it isn't I can type slower you know <0> Its ok. I realise i am asking the wrong person . Thnaks for the help and time. <1> ok, try this <1> just remove products_ordered from the join, remove the INNER JOIN syntax <1> just remove it, you don't need it as you're not referring to any of the fields in that table <0> i know it works i have spent weeks on that problem , u thin i havent tried that <0> what u r saying not joining <1> what happens if you remove lines 14-17 in that query? <0> but that way i cannot include produt_id in the table <0> it gives me right results <1> line 18 should be: WHERE O. <-- remove PO and just write O <0> but i cant p*** in product_id, and later i have to modify the query to even include category_table <0> k trying <1> and remove BP. from line 19 <0> k <0> http://sql-servers.com/nopaste/?show=147 <0> did u want me top take the join away as well <0> to <1> remove lines 14-17 <0> k <0> plz plz forgive me. i think i never understood what you was saying. <0> it works like u said it would <0> so sorry for wasting your time <0> <1> You the man, thanks alot bro. I shall always remebr your name :) <1> well, thank you for contributing to my ignore list <0> no problem , i am a busy man :) <0> oh man, do i feel happy. Yeeehaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa <2> I have an access table of categories with three columns: CategoryID (autonumber primary key), name (text), and ParentID (number), all in whatever random order they were entered in. What I'd like to do is iterate through all of the top-level and parent categories and return them with their child categories listed underneath them respectively, using an SQL query(s) <2> If I were doing this in some host scripting context it would be simple enough, but all i have is pure access/sql to work with at the moment <2> I'm unsure of what direction to take... I've gotten it to return all rows who are marked top level or claimed as parent by any other rows using a subquery, not sure where to go from there <2> ...Or if it's possible, given the lack of control structures <3> ok.. this is for ms sql.. I'm trying to figure out the best way to do this.. I have a table with a varchar field (name) and an id.. I also have a table that links it to a third table.. I want to take the varchar and split each one by ' ' and create a record for each word in the first table.. any suggestions? or did that even make sense? <4> hi, I'm using pgsql and I'm trying to construct a query where you 'select distinct name from foo;' but I'd also like to get any id from foo matching the name for each distinct name <5> that would then make the name not distinct <4> perhaps I can better rephrase this <4> i have a table that is keyed off a sequence and i want to return distinct names from that table and any corresponding sequence number for each name <5> can a name have more than one sequence number? <4> yes <4> but only 1 seq per name <5> and which sequence of the many for each name did you want, do you care? <4> no <5> select max(seqID) as theSequence, name from foo group by name <4> thank you <5> sure <6> need help with a delete statement that deletes all rows where [timestamp] is 10 mins less than the current time <6> i'm coding a stored procedure (mssql2000) <6> i'm about to p*** out .. if you feel like helping me out .. please email me an example shaunpennell@hotmail.com .. thanks! and good night. <5> um, no.
<7> In an update statement, is it possible to reference the row being updated in a subselect? Like "update myTable t1 set name = (select name from myTable t2 where t1.id = t2.id and t2.deleted = 'false')" <7> i get the error: Incorrect syntax near 'm1'. <5> which db <5> and i don't see m1 anywhere in that statement <7> sorry, t1 <5> db? <7> mssql 2000 <5> is it supposed to be two separate tables? <5> its unclear what you're trying to do <7> no it is the same table <5> in plain english then what are you trying to do? <8> I have a PL/SQL question... is there a way to get the SQL used to create a table somehow using PL/SQL? I am not seeing an option for it like MSSQL's Query Analyzer has... <8> Or why when I say: alter table PROFILE_DEFAULTS modify Unique_ID null it says cannot modify to NULL ? <7> this was as implified example, what i try to do is update a duplicateOf column, for each row find the first row in the table with equal 'name' column as "this row" <7> ..simplified <5> UPDATE t1 SET t1.name = t2.name FROM myTable t1 INNER JOIN myTable t2 ON t1.ID = t2.ID WHERE t2.deleted = 'false' <5> try that, unclear if that will get you the results you want <7> i think we're on to something here.. thanks a bunch! <7> i have a sql query that gives me the correct values, just couldn't express it in an update statement <5> UPDATE alias SET blah = 1 FROM table alias <8> Does MSSQL Express Evaulation version come with Query Analyzer? <9> Hi.. Could you help me with this? I have a product and a category table, and nxn relation ship... but I want to list the products, one row each... how do I do this? the category names do not need to be complete for each product, only one per product is enough in the list.. <9> if I do an ordinary join, I get several rows for each product... <10> your dumb <9> ok show me how smart you are <9> if you are not dumber <5> stars2k, not sure what an 'ordinary' join is, but you want an inner join <9> yes.. but is it possible to limit row on joins? if I do an inner join I get several rows per product <5> then you're not doing it right <5> paste what you have <5> to the paste url <9> well my real example is complicated, but the example would just be like select * from product p join product2category pc on p.id = pc.productid join category c on pc.categoryid = c.id <10> hes an idiot <10> hes trying to get back 1 value from a 1-m relationship <10> lets say you are selling pictures <9> yeah <10> and picture 2 is in 2 categories <9> yep <10> fluffy bunnies and dog ****s <9> hihi <10> what if you only return fluffy bunnies <9> its ok <9> I just want one <10> and some little girl gets a pic of a of fluffy bunny and a dog **** <10> thats stupid <10> you need to know which one stars2k <10> either by max alpha betical order <9> no I dont <10> or sometthing <9> aha.. ok.. doesnt matter.. give me anything that works ;) <10> you need to use an aggregate function that returns one value <10> no I wont <10> you figure it out yourself dog **** peddler <9> haha.. you are too much <9> well I guees I could group them and use one such aggregate function ok.. thanks <9> I think you should have a etiquette policy in this channel <5> there is, he's complying. sad. <5> you should see when they really don't like you <9> hehe <9> lol, ok, I'm glad I've not seen that <11> how can i fully integrate Access 2003 with SQL Server 2005? right now I can't even write data from Access <11> when i try to edit the design Access says that it is only compatable up to SQL Server 2000 <12> have you tried to upgrade? <11> upgrade what? <11> yes <11> you mean update? <12> update access? <11> yes MS office updates <11> there are no updates available. afaik access 2003 is the latest version <13> http://www.sqlteam.com/Forums/topic.asp?TOPIC_ID=59725 <14> cd <11> Halo_Four: thanks <12> cd .. <14> heh, ****ing mouse focus ... I nudged the desk when I sat down ... changed focus to x-chat from konsole ;)
Return to
#sql or Go to some related
logs:
#politics #politics #politics #sex Discoveries this week, ariel dj_alex turkey suse kstartup #beginner NeoBlocks Strategy Kirupa_3D_05_PullThroughSpace
|
|