| |
| |
| |
|
Page: 1 2 3 4 5 6
Comments:
<0> you can do it just like that Judge <1> In transact-sql using PATINDEX, is there anyway I can use a starting offset to begin my search from like I can with CHARINDEX ? <2> Thanks CoJoNEsX... I had a typo, of course... <2> How do I get it to keep commas and such in the result though? <2> Like if I add 300 and 900 and get 1,200... I need that comma in there and it's removing it... is that CAST or Convert related? Using MS-SQL server <0> a number doesnt store/display the comma <0> thats considered presentation :) <2> Is there a way that I can make the SELECT statement return it in such a manner that it does? <0> either format it in your app, or if you HAVE to have it in the sql, you would need to covert it to a varchar <0> in oracle it would be to_char(total,999,999,999) if I rmemeber correctly <0> dunno in mssql <2> yeah, I found that while searching and then quickly learned that MSSQL doesn't have teh same function :( <0> look into cast or convert options <3> hi all <3> question about MS SQL <3> I can have multiple system/servers accessing a single SQL server, right?
<4> yeah <3> what do you call each system? <3> is it a database? a space? a schema? <4> client? <3> oh ok <3> makes sense <5> halo u there? <6> SQL 2005: where can I specify ODBC as a datasource for importing data with SQL 2005/ <6> ? <7> can anyone explain what the '@' does in MSSQL statement "SET @whatever = @@function" ? =) <8> google "ms sql t-sql reference" <8> it should take you to the msdn site with t-sql reference in ms sql <7> =] <9> or press F1 in query analyzer and look up variables, also look up set and global variables <7> I see, it says it's a local variable <7> thanx =) <10> anybody alive <10> i got a sql INNER JOIN problem, i have three tables, http://demo.promantix.com/sql.htm a quick text of the problem <8> Drexxle use our paste site please <11> is there an oracle function that will return the number of days (or the last day) in a given month? <12> sql2k, can i reference another db from within a transaction? not looking to rollback the other, but its involved in a join i want within the transaction <13> hi. is there a way to get NOW() in SQL QUERY? <14> yes <15> hey guys. I am trying to do a count on a table, with criteria. Its obviously not working <15> http://sql-servers.com/nopaste/?show=177 <15> can anyone have a look at it for me? <15> also in my conditions, is it possible to have a numeric wildcard instead of a alphanumeric one (*) <16> count() returns a number why compare it to "AB*" <15> doh <15> yeah, course <15> so if I want to produce a table that shows the results like: <15> man | Count of AB* | Count of AC* | Count of AD*| etc... <15> how would I go about that? <16> select man, (select count from stuff where man = tbl.man and xxx like 'AB%') as count_ab, (select count from stuff where man = tbl.man and xxx like 'AC%') as count_ac, (select [...]) from tbl <15> ahh yeah - course! <16> you could also get a result like: <15> ztod: do you know if there is a wildcard that is solely numeric, and not alphanumeric like "*" or "%"? <16> 'man-x', 'ac', 678 <16> 'man-x', 'ab', 678897 <16> that means 3 rows for eahc man <16> that could be done without subselects <16> no i dont know <16> maybe depends on your db <15> nah - I'm producing a graphical report - and it needs to be in the correct form, otherwise the report goes pppfft <16> ok, then that solution above is the only way i'd say <15> ztod: as I'm doing subqueries I can put like a : Left(tbl_dealers.dlr_postcode,IIf(IsNumeric(Mid(tbl_dealers.dlr_postcode,2,1))=True,1,2)) <15> which will do pretty much what I was <15> want <15> ztod: thanks for your help! <16> yep that should work <16> no problem <16> theres the _ wildcard too for use w/ LIKE btw, which is one character <15> god damn it <15> sod it - I'm using stored procedures. <15> bloody access and stooooopid bloody syntex errors lies <4> hehe <4> whats it lieing about? <15> seriously - its telling me tehre are too many parenthasis in my sql <4> probably is then <4> paste it
<15> took me AGES but I counted it through and there really are not <15> I double tripple checked <4> parser might be thrown out earlier on or smth. <4> VBA never lies to me in all the years ive used it :P <15> http://sql-servers.com/nopaste/?show=178 <4> oh god thats awful <15> sush <15> its not <15> also - if I do get it to work its going to be EXACTLY 124 times worse <15> except for taking the embedded "audi" and matching it to the grouped man_id <4> ((((((((( <4> )))))))) <4> thats what i get in notepad <4> so your missing one somewhere <15> weird, access tells me I got one too many <4> one to manyy ('s <15> you say I'm missing one <4> or one less )'s ;) <15> no - one too many ")" <4> its either/or <15> ::sigh:: back to the drawing board <4> and since your nesting so much <4> i dont want to pick my way through what its doing <15> (and later more ) <4> cuz i just got up <15> heh <15> :( edit plus doesnt have a sql editor <4> (((tbl_man.mnf_name)="audi") AND <4> try shaving a '(' off here <15> yeah I was looking at that bit <4> i think it is there <15> nope - needs that one <4> hehe <4> one sec <4> i can paste it in an editor <4> that tells me what they match up with <15> col - which one is that <15> now I have an extra ")" <15> and I dont think I've removed two "("'s <16> use some more indenting <16> cant you do select count(*) from instead of count([select...]) <15> ARRRRGGHHH! <15> now I sorted the parenthasis - its telling me theres a syntax err <15> ztod: YOU told me to embedd <4> this is the ugliest *** query i ever saw <15> MeshMan: thanks :D <15> like I said - its going to get EXACTLY 124 times worse <15> unless there is a way to pivot a table with all the prefixes in, so I only need a table with all the prefixes <15> and then do a left(bleh bleh bleh) compare with the post codes and the prefixes <15> right - toooooo bored of this. going back to stored procedures methos <15> *method <15> also - MeshMan noone ever said coding had to be tidy <4> yes they did :P <4> the only thing thats allowed to be messy is <4> 1) Your bedroom. <4> 2) Art. <4> and don't you dare say coding is art <15> 3> *** <15> hmmmmm messy *** <15> ::droooooooowl:: <4> heh <16> matty: http://sql-servers.com/nopaste/?show=179 <4> thats mine loos like now ztod <16> indenting + nice formatting is good practice <16> yxou had a ( too much after the where <15> guys - unless I can take a table of prefixes and do it that way - I'm just going to do it on stored procedures. <15> mostly because I know it will work <4> why dont you just do a few sub-queries <4> or a view <15> whats a cross tab <15> can I use that? <16> never heard that <4> hehe, wizards
Return to
#sql or Go to some related
logs:
pay someone to get ccna #politics #sex #openbsd #nhl #worldcup #microsoft niggertime
twistys treat error loading operating system acronis
|
|