| |
| |
| |
|
Page: 1 2 3 4 5
Comments:
<0> i sort of wish my company had to be held to those standards <0> then i would have more money for resources and have a reason for it <1> as opposed to no money/no reason? <0> no money/no reason 2 and 3 letter management understand <0> its easy to say "the government makes us" <0> not "we have maxed out the throughput on our FC cards, i need a brocade switch and a few new cards" <0> its sad when you need to draw pictures of pipes and then color in "this is how much pipe we need, this is how much data water is flowing through it" <2> There any resources on implemnting paging with MS SQL 2000, ie what ROW_NUMBER let syou do? <3> wasabi__ it's a pain with mssql <0> yes its called sql <2> yeah i suspect so <3> select top item_count * from .... where id not in (select top item_offset id from ....) <3> that's the only way i've heard of people being able to do it <0> theres 88 indexes on an 8 column table... <2> hmm, so grab the top ones after the previous top ones. <0> do these people ever test their ***umptions..
<2> where the previous is number * page <2> alas. ;) <3> yea <4> i am attempting to write a string for a stored procedure... my syntax is set @SQL ='' SELECT ... where ... LIKE '' + @param1 + ''.... could someone tell me how to get it to do something like '%' + @param + '%' tried many ways and all have failed <3> what dbms <4> sorry MSSQL 2000 <3> @sql = '' SELECT <-- this is already a syntax error <4> this like '' + ''%'' + @param+ ''%'' + '' results in error operator equals modulo <4> oh yeah? <3> well ' is open quote, and ' is close quote <3> so '' is open and closed <4> i know... that was confusing the hell out of me as to why bother with it <3> why generate dynamic sql for this query at all? <4> it was in an example i found... so effectively im double opening everything <3> why not just run select ... where ... like '%' + @param + '%' <4> well i want to put in an if isnumeric() clause later <3> to escape single quotes, use two. <4> but i was thinking it would be easier to set the first part as a string, then the other part as a second string then if isumeric(@param) then attach 2nd string <4> this is retarded <5> huhuhu <5> that's an awesome topic <3> w***a if you have @sql = 'O''Hara', then @sql is O'Hara <3> do you see how to embed single quotes in a string literal now? <3> so if you want to make Like '%' + @x + '%' a string literal, it's 'Like ''%'' + @x + ''%''' <4> and then at the end of the proc it is EXEC @sql not SELECT @SQL? <3> yes <5> '''%%''\\\%''' <5> and other such atrocities <4> grrr.. this is my code with the errors it produces http://authors.aspalliance.com/aylar/ViewPasteCode.aspx?PasteCodeID=5511 <4> tenfour, do you see the errors of my way? <3> exec (@sql) <4> after that i get the error 'must decalre variable @searchAR <3> hehe i'm not going to hold your hand anymore <3> i'm sure the answer is in either the manual or in your brain somewhere <6> exec doesn't execute within the context of the current batch. You cannot directly share variables or such. <6> sp_executesql allows you to p*** variables to a dynamic statement <4> so tryng to run the proc as EXEC blah '75998' will never work <4> k thanks for the tips... ill work on this at home. cheers. <7> How do you execute a stored procedure with a parameter? <8> Knave:: huh? through sql or through app codes? <7> well, im building a stored procedure... let me just show you what im trying to do (1 line) <7> if (EXECUTE Get_Biography_CountByUid(@uid)) > 0 <9> ima li kakvih zena odje <7> I get an error at @uid, so im wondering if im doing that right... <8> what's the error msg? <9> brmbrm error <9> but <9> brm <9> is <7> Incorrect syntax near the keyword 'EXECUTE' Incorrect Syntax near '@uid' <9> coman <9> for <9> comand <9> for <9> muric <9> murica <9> why] <6> Can't call a sproc that way <7> Hmm... Any suggestions? im new to doing this kind of stuff <6> DECARE @ret INTEGER; EXEC @ret = MySproc; IF @ret > 0 <7> Okay
<7> THanks ill try that out <9> whel <9> murica <9> must set <9> on <9> brm <9> and no problem <7> ugh, would you knock it off? stop hitting enter <9> jes <9> ali to ne mijenja stvar da ti pojma nemas <7> So, DECLARE @count Int; EXEC @count = Get_Biography_CountByUid @uid do i just put the parameters in that method after the EXEC? <7> (im starting to like this!) <8> @count is not an argument <8> but holds a return value of the sproc <7> Yeah that i understand <7> it executes my SPROC and puts the returned value in @count as a new variable <7> But how do i supply @uid to my SPROC <8> declare another variable named @ui <8> declare @ui as <whatever the type is> <8> and then set @ui = blah blah blah <7> well, its not a declaration, its a supplied parameter. <8> and p*** @ui to the sproc <7> THe quiestion is, how do i p*** it to the sproc... (sorry if im not explaining myself properly) <8> exec @count = get_bigo_blah @uid ? <7> okay so i had that right <8> yeah <7> Okay thats what i wanted to confirm... i was more or less guessing <7> Wow, this is very powerfull. <8> Knave:: you could have just run the sproc on QA though <7> QA? <8> query analyzer <8> btw, what's your RDBMS? <7> MSSQL 2005 <7> This is what i ended up with: http://rafb.net/paste/results/rUKNwJ93.html <7> thats a no-paste of my sproc <10> that's lame <10> if not exists(select * from bio...) insert ....... else update...... <8> true <7> ahh yeah that would do the same thing... lol <7> probably more efficient too. <8> "exist" is pretty good operator to use <8> yeah. <8> as soon as it finds the match, it will return <7> ahh okay that is much more efficient ;) <7> d2d: reason i didnt use QA is i dont have direct access to the server besides through Visual Studio and a web-based utility <7> But thanks everyone, ive learned a lot now. <7> omg that was sooo simple... I wish i knew i could do this months ago <7> when i wrote a part of a paryoll system in asp.net... i used simple queries and no T-SQL/SPROCS... ugh! <10> wow <7> Just to check, you cant overload a SPROC can you? <8> no <7> LoL yeah that would be quite interesting to implement. <8> no. <7> Okay thanks a lot d2d/Quant.. youve been very helpfull. I understand enough to figure things out on myself now... <8> :) <7> I didnt know what this was capable of doing until i got your help <7> So i was 'guessing' so to speak <7> (w00t) <8> w00ty <7> yes.. much w00ty <7> crap.. Florida has a high threat of fires this weekend <7> we are super low on rain right now <8> i am goign to make fun of my friends living in Tampa bay <7> LOL <7> im in Orlando.. im rather safe myself.... <8> hmm.. but i don't think i will visit Florida anytime soon.. <8> i still have at least 50 years left till i have to live down there <7> hahaha <7> its not as much of a 'retirement-state' as you would think <7> crudloads of hot young women... <8> they are after old ppl with money <7> lol <8> golddiggers <7> some are... yes
Return to
#sql or Go to some related
logs:
phosopherous #red alright-sweden adultbouncer xpw #politics #winvista #gamedev #allnitecafe egypt AIFV #politics
|
|