@# Quotes DB     useful, funny, interesting





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



Comments:

<0> err.r.
<0> one sec
<1> i think i can just do SELECT .... then SET @whatever
<1> and then use it in another select
<0> select @param = isnull(col,1)
<0> if @param is null begin exec storedproc end
<1> right
<0> err... if @param = 1
<1> cool
<1> ty
<0> or you can do if ((select column from table) is null)
<0> theoretically that should work
<0> or maybe im confusing it with coldfusion I dunno try both lol
<1> ty any hoot
<2> so oyu are doing a query that returns only one row?
<2> ok so I'm running this file with 75Meg (text) of delete statements and SQLserver running out of memory



<0> how are you running it?
<2> ...and there's pleanty of memory on the box
<0> how much memory is allocated for sql server
<2> commandlin via isql
<3> using postgresql, if i want to replace all the html in a text field with '', how would i do so?
<2> how do I tell?
<0> trhough enterpsie manager
<2> where?
<0> right click on the server name and go to properties
<0> click ion the memory tab
<2> I see it, it's set for dynamic
<0> whats maximum?
<2> 2 gig
<0> try breaking the file up into smaller files
<0> is this a one time thing?
<2> why?
<2> no it isn't
<2> it's nightly
<2> that'd be a pain in the ***
<0> if this is somethign you are going to be doing often you should try using a dts
<0> a dts should be able tohandle what you are doing
<2> what difference does it make?
<4> tapped all the html? how do you define all the html?
<0> Guest1 do you know what a dts package is?
<2> yes, I'm quite familliar
<5> hrm... any efficient way to do per-record field-to-field comparisons in a query? kind of cram an if/then into each record?
<0> case statements
<2> everything else is being done outside
<5> dammit.
<5> slammed: you unblanked my brain.
<5> danke
<0> np
<0> Guest1 just try it
<3> CoJoNEsX, replace(field,'<%>','') basically
<2> thats not a solution
<4> you would need to identify the position in your field where that text occurs and replace the position with ''
<2> I have a file of delete statements, how do you propose I run that from DTS?
<2> yeah, thats what I thought
<0> you could always load them into a table, loop through each and run an sp_exectute_sql
<2> heh
<0> damn you got an attitude for someone who is asking for help
<0> </help>
<6> Raid 1 is slower than raid 5 in regards to writing data wouldnt you think?
<2> thanks for all you help, slammed
<2> heh
<2> if you don't know, say you don't know and don't waste peoples time
<2> christ
<2> neat, all you have to do to be an EFnet guru is to be condecending...like "do you know what a dts package is?"
<2> hahah
<0> yeah asking someone a simple question is condesending
<0> I didn't say "hey ****brick who cant get a real username, do you know what a dts package is"
<2> slammed, do you know what a DBA is?
<2> just asking a simple question
<0> sure, someone who doesnt come onto #sql asking why a db server is giving memory errors
<2> no wonder you're always slammmed...not because you know something, because you act like tyou know something and can't finish 1/2 of what you start
<2> I know your kind
<2> heh
<2> crap, I maight have to do this in oracle
<2> where they've been handling files like this for over a decade
<0> http://msdn2.microsoft.com/en-us/library/ms160815.aspx there, concept is applying to sql server 2k5 but the same concept applies to sql 2k
<0> so now, with that I bid you a go **** yourself



<7> So many attitudes on irc, on both sides.
<2> actually, thats not a bad idea... stuff them in a table and loop around them in a sproc... could still do that from isql
<0> :)
<2> may run into the same problem though
<2> it's wierd delete are implicit transactions, but I have a commit and go after each one
<2> I mean it's probably 10000 delete statements, but they are all well indexed calling primary keys, it should freakin fly
<2> but you're patially right, it looks like isql is just having problems temp storing the file, not the server running out of memory
<2> ...but call a bulk load sproc from ISQL and sending it the file name works great
<2> no need for dts crap though
<4> why not just have one delete statement?
<2> because thats not what I'm being sent
<4> performance wise it would be faster
<2> I'm being sent a flatfile with 1000s of delete statements that I need to apply daily (and they are different every day)
<2> hey I'd love to go back and say "hey guys, this is a pain in the ***, can you spend a few 100 man hours and rewrite your export routines?
<2> they'd laugh me off the phone
<2> ...tell me to use oracle and STFU
<5> what's the simple method for checking if a stored proc exists and removing it before creating a stored proc?
<0> IF EXISTS (SELECT name FROM sysobjects WHERE name = N'<procedure_name, sysname, proc_test>' AND type = 'P') DROP PROCEDURE <procedure_name, sysname, proc_test>
<7> information_schema.routines
<5> just got tthere in BOL - sorry
<5> =P
<5> thanks anyway
<2> eyepulp, just have EM create an 'SQL script' and steal the top statement (where it looks for existence and drops before creating)
<5> good call. I'll remmeber for next time.
<2> that works for all objects
<5> er, remember
<0> query analyzer has templates
<5> I see that now
<8> EyePulp: IF OBJECT_ID('whatever') IS NOT NULL
<7> mssql2k ... where in information_schema is a column identified as being an identity column or not? I can't find it.
<5> it's not in there - use ident_seed(tablename)
<5> one sec
<7> ah, ok
<7> How annoying.
<7> But, thanks :)
<5> is this for checking primary keys?
<7> hm. Actually, very annoying, since I'm trying to compare two scehmas.
<5> or finding them?
<7> Making sure the pk is set to identity. someone screwed up copying a few tables, and I was hoping to avoid having to check one at a time
<5> I just built a useful query for getting some of that metadata - want it?
<7> Sure, save me the time of beating my head against this.
<5> pastecode?
<7> yeah, that works just fine. the one in the topic
<5> http://wilcoding.xs4all.nl/Wilco/Pastecode/3014/showpaste.aspx
<7> Or that one. :)
<5> heh
<5> sorry, that's out of proc - bad cut. one sec
<5> here you go http://wilcoding.xs4all.nl/Wilco/Pastecode/3015/showpaste.aspx
<2> gawd dammit slammmed, its working. I have a sproc which accepts the filename of the delete file, creates a temp table, bulk inserts the file into the temp table, declares a FF read only cursor on the temp table loops through that and executes each statement dynamically, doesn't even need a explicit commit on each one
<2> my estimate was off, it's over 1/2 million delete statements
<2> takes about 10 minutes
<2> ...and I can call it from a batch file
<0> lol
<0> glad everything worked out
<2> I owe ya a beer
<0> mmm beer
<2> I like those red strip commercials
<2> HORAYY BEEER!
<0> red stripe
<0> its beer
<0> hooorraaayy beeer
<2> yeah
<0> dont care so much for the red stripe here in the us
<0> it doesnt taste the same as in jamaica
<0> guiness is where its at now though
<2> give me your keys... no... OK...give me your pants... well,okay... (takes keys from pants)horrayy responcibility!
<0> lol
<2> yeah I like guiness too, its more like a meal
<9> wow did you hear the latest news ?
<0> yeah its a nice dietary suplement
<2> did GW get shot in Iraq?
<9> It appears that justinm that used to visit this channel
<9> has commited suicide
<9> and found dead after he OD'd of weed


Name:

Comments:

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






Return to #sql
or
Go to some related logs:

jagr sucks
how to test sendmail on ubuntu
#worldcup
#delphi
#visualbasic
#nhl
#nhl
#beginner
windows service on Local Computer started and then stopped. Some services stop a
#beginner



Home  |  disclaimer  |  contact  |  submit quotes