| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8
Comments:
<0> how much can text you put in a text datatype in ms sql, I see the length is 16 <1> i think its like 2-4 gigs or something like that <2> 2gb <1> i guess the value of an int? 2,147..... <2> 2gb <0> ok thanks, why does the Length say 16 in sql 2000? <0> when you create a column of that type <1> I think its a pointer <1> text data is stored on separate pages <2> because the data for a text field is stored seperately from the rest of the table <2> for performance reasons <2> f209 : you know, all of this information is in BOL - why not try hitting F1 once in a while <3> how can I format a numeric column to return a value of 5 as 0005 <2> Narbs : in the presentation layer <2> Narbs : sql is not the place to format data <3> oh ok
<2> Narbs : which is why sql has no formatting functions <1> You could use a trick like this though: SELECT RIGHT('00000' + RTRIM(cast(column as varchar(5)), 5) FROM Table <2> Eol : you could, but performance blows, and it's just the wrong thing to do <2> there are any number of ways to do it, but none of them are right <1> Yeah, but sometimes you don't care about "right" and just need it done <2> Eol : first you teach the right way. when the lesson is learned, only then do you discuss the wrong ways <2> Eol : the right way is not in sql <2> Eol : how about we try not to teach n00bs any bad habits? <1> Who's to say he's a n00b or not? <2> Eol : i am - because he's asking a n00b question <2> Eol : ergo, for the sake of this argument, he's a n00b <2> Eol : n00b is as n00b does <2> Eol : so, get a grip - the right answer is "not in sql" <2> Eol : if you want to give people the wrong answer to question, why don't you start your own channel? <1> I didn't give him a wrong answer, my answer, does in fact, work <1> It is not the "best practices" answer <3> I'm trying to change a data type in sql server management studio on a large table and the operation is timing out. any way to change the timeout period? <4> the real question is.. why are you trying to change a datatype? have you researched the possible ramificaitons of it? <3> char(20) to varchar(20) <3> it was char because the table was being populated from an oracle db that used fixed char types <3> but that's not the case anymore <5> script the action and run it manually. <6> stupid netsplit... <7> indeed <8> How can I return unique results in a full text search using CONTAINS <9> sounds like homework <10> how to insert multiple (2,000ish) rows into oracle with one line <8> nope not hw <11> terminus, use sqlldr or external tables <11> or turn off wordwrap and make it a LONG line <11> k00, use the distinct keyword. who would have thunk it <9> how are you getting 2000ish records? that would dictate how to do it <11> im thinking... excel <10> the 2000 records are generated from my program that parses documents <10> :-) <10> the records are documents <9> and what does your program do with them? <10> parses and stems them <9> and puts them into a file? or what? <10> nope, stdout <10> and then i use OCIExecute in a php script to insert them <11> lovely... <10> indeed <10> it's a generalized vector space model search engine <11> is it now <9> uh huh <11> not much of a search if you cant figure out how to get data into it <10> getting data into isn't a problem <11> seems like it is for you <10> nope <10> 1986 rows selected. <9> so right now you are running single insert statements? <10> doing it in one statement is the problem <11> why do you need it in one line? <10> i was using an insert all with select union alls <10> because doing 2000 OCIExecutes is a pain in the butt <10> :-) <9> im not sure what tools php give you to work in bulk <12> you mean it's slow <10> it's not php i'm worried about <10> it's the sql
<10> tenfour, yep you got it <12> can you use XML? <9> its probably the php connections <11> no its the whole idea <10> no **** ^ like i been saying :-) hence why I want to only do one OCIExecute ( aka one line) <12> this doesnt sound appropriate at all though <12> i mean, why is your app inserting 2000 items in a table? <9> do you have the records in bulk? <10> i have n documents i want to store in a database right? and I am parseing, and stemming the content of these documents <10> and then i am storing the document #, the content, and the stemmed terms in the database <11> oracle has all that built in <10> yes it does <10> it does not do what I want though <9> what kind of document is this? <11> you dont know how to do the very basic things <10> does it matter? <9> yes <11> so I doubt you know if it does what you need it to do <10> you know, it was a simple question <13> anyone have a lot of experience exporting relationships using FOR XML AUTO? <9> its not <12> terminus your question is worded simply but it's really not a simple syntax question <8> Jarett_, how would I incorp the distinct keyword in this piece of code: http://sql-servers.com/nopaste/?show=295 <10> well here are several answers that could have been given, which I have tried: PLSQL, a multitable insert using UNION ALL with selects, or as with mysql you could do insert values (x,y); insert values (a,z); <- doesn't work in oracle <10> so yeah it is a simple syntax question in some respects heh <11> sqlldr is the right answer <11> another acceptable but not as efficient would be bulk binds and insert <10> yes thanks <11> "single line" is an improper thought <10> i'm not too concerned about the efficiency of loading the documents as long as it's less than say 30 seconds <10> because it's a one time thing then my queries are driven off an ad hoc database <9> depending on what you are storing and connections and memory,etc 30 seconds sounds pretty arbitrary <11> in 1 minute i could write a php parser to create a sqlldr control file, export the data to text or p*** it as a variable, and then exec out to sqlldr <10> Jarett_, that is a great idea and I'll pursue that <11> or if its 9i or 10g you just do it via external tables <10> it's 10g and yes using external tables was what I was doing <11> but if its coming from another data source, there is no reason not to connect directly to that data source and pull the data <10> the data source isn't something you connect to it's documents on the web <9> oracle can read from a website <10> i'm grabbing the content from them and giving the docs a unique identifier <11> well pull them in as clobs, parse them in the db, insert as you parse <11> ummm easy <9> I have a plsql proc that reads from a website parses and inserts <11> given a text (like xml or webpage) i can parse out anything, and convert to almost any other document format.. or break it down <8> hrm you can't select a distinct ntext field <10> yeah what i was doing was grab doc-> parse -> remove stop words -> stem -> insert <10> in a very simplified breakdown of the operation <9> yeah you can do that in a stored proc <9> UTL_HTTP might be a starting point for you in that case <11> plus why do you need to remove stopwords? <11> they aid in scoring and searching <11> if you want to search only in <title></title> or in the body.. or in different CSS tagged area <14> see http://sql-servers.com/nopaste/?show=293 ... using mssql, im trying to find an easier/more efficient way to rewrite this query. i feel like im joining my tables too much <11> thats pretty ugly aLfer <14> yeah i know <14> how can i redo it? <11> break your tables out of the 3 individual selects <11> theres no need for it. either do 3 selects and union all.. or do 1 select with subselects <14> isnt that what i have now? 1 select with subselects? <11> no <11> you have 3 selects wrapped in a different select which is totally pointless <14> what is the syntax for a subselect? <11> www.google.com <8> how do you select distinct ntext rows <14> i think the problem is i have multiple aggregate functions in the select line, and each one is based on different criteria.. so i have to use an individual select to be able to use the different where clauses <11> learn to use group by <13> so without resorting to FOR XML EXPLICIT, is there a way to use FOR XML AUTO to preserve and nest relationships in generated XML? <13> I've read about 15 MSDN articles and they all use EXPLICIT to get the job done, but I don't need that level of detail in what the tables contain <14> jarett_: okay i rewrote the query http://sql-servers.com/nopaste/?show=296 <14> now i get Column 'joined.prstart' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause... but the problem is i dont want to group by prstart, i want them summed <12> why are you trying to return 3 completely different values in that query <12> if you want 3 different kinds of aggregations, just do 3 queries (like you are already doing) <12> it would also be possible to put it into 2 queries probably, by using with rollup <14> well i wanted the three aggregations to be lined up for each project
Return to
#sql or Go to some related
logs:
#linux-noob Flash scroll images endless loop #beginner #beginner canon 30d training video torrent #computers streamtvnow shoutcast Ted Strykar urxvt LC_TYPE spratt tutorial rhinoceros
|
|