| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11
Comments:
<0> well, you didn't show us the data <1> i knew i wasnt that much of a retard. <1> lol <1> the data wasnt the issue (except for the null). <0> which meant that it was... <1> you could use whatever you wanted for the data, they were equal. <1> lol <1> w00t <1> my 'mirror' is just about completed.
<2> I want to perform a select statement and use the results to insert into another table.. Is there an easy way to say insert into TABLE (ID, NAME, LINE) VALUES select ID, NAME, i++ from table where... <2> basically I want the line value to increment during the insert call <3> increment from what? <2> doesn't matter really but I'd start at say 10 and add 10 every insert <2> I mean I could just perform the select and read each line and insert them 1 by 1 and perform the math myself but was looking for a more effient way <2> I guess what I'm asking is it any better to beform a insert into table values (select ...) VS using select ... then looping the results and performing an insert 1by1 using a prepared statment? <2> I have to ***ume the former is better since all the processing takes place 100% on the database VS p***ing data back and forth sever->client client->server <2> and I don't have the ability to add a constraint to the table to do it for me <2> I have a feeling I've doen a really ****ty job asking my question :) <2> Do you understand what I'm trying to do Halo? <3> Why not spec the table with an identity field? <2> I don't follow <3> Which RDBMS? <2> the number I'm adding to teh new table is not stored anywhere and is simply a stupid field stored for a display order <2> and I just want to populate it with unique values in the order I insert and don't really care what they are really.. <2> DB2 <4> I am in MS SQL, and i am trying to retrieve a list of all of my "categories" which a user is subscribed, to and it is returining duplicate values for some of the results. I made a little paste thing for you guys to look at: http://sql-servers.com/nopaste/?show=357 <4> Any suggestions? <3> DB2 has auto number fields, you should be able to use that <2> Halo_Four: yes but you specify them during the table creation correct? or using alter table which I'm unable to do... <3> That it correct. <3> I don't know of another method to do this. <5> bleg: are you trying to display only cats that are subscribed to? <4> no, i want to display ALL cats <4> just show a 1 where they are subscribed <5> on the case use MAX() <2> I need something like insert into mytable (ID, NAME, LINE) VALUES (select ID, NAME, $VARIABLE from othertable where..) <4> i tried throwing a distinct in there so it would only get one result per id, but that didn't work <3> You have you join backwards <3> hm, maybe not <2> Halo_Four: I kinda thought it wasn't possible.. I'll just have to insert them 1by1.. <2> without setting a column to auto increment.. which I can't <2> Thanks for the help though Halo <4> techdev: uhm, where exactly do i insert max() <5> i updated your paste <4> lememe check it out
<4> techdev: that seems to be working, i had to add a "group by" clause, but its lookin' good! <4> thansk' <5> np <5> where is a good site or source that explains about indexing? <6> http://www.windowsitlibrary.com/Content/77/17/toc.html <6> thats for mssql, but will work for any btree indexes really <5> thanks <6> some dbs do more than just btree tho <7> Question: if I have on the average this much text <7> http://sql-servers.com/nopaste/?show=359 <7> what data type should i use? <0> Gm0nEy : count the characters. if it's less that 8000, use varchar() <7> and if there is more <3> TEXT <7> it wont fit bro <7> i tried <0> Gm0nEy : yes it will <0> TEXT will take 2gb of text <7> something with copy and past? <0> Gm0nEy : what do you mean? <7> i have text in a text file. I open the file copy it and past it in the DB Cell <7> it gets cut off <0> Gm0nEy : that's because you're a cretin <0> Gm0nEy : that's not how you populate those fields <7> o <7> ok i also build an app <7> but how do i do it then? <0> by reading the documentation <7> i looked on how to insert lots of text <7> couldnt find anything except binary methods <7> i dont mind reading at all <7> what do i need to look up? <0> the text datatype in BOL <0> er - which rdbms? <7> SQL 2K <0> then look it up in BOL <7> k thank you <5> yuppie in your opinion is it good to stay away from constraints? <1> constraints are the devils work. <5> so its pretty much best to write script to take care of that away from the dbms <0> nothing wrong with contraints used correctly
Return to
#sql or Go to some related
logs:
#sex #qmail photoshop what does feathering do #beginner #computers #politics #computers cocaine tweek #3dsmax #beginner
|
|