@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet


Comments:

<0> cfnsvr.exe is the one who blocks sql server installation.
<1> RUNAS
<0> still the same prob, running as Administrator.
<0> Ive installed sqlserver2000 before and never had this prob, I installed host OS yesterday (winXpSp2)
<2> hi, is it possible to concatenate strings in a select statement? i want to put together a path name from different tables
<3> how can i test user/p*** to sql 2000
<3> i have restored copy of working sql 2000 and iis site on mobile computer and i get this error when acessing database portion of site
<3> http://paste.sqlwhores.com/?503
<4> use the management console and make sure the users exsist and have p***words
<4> it's actualy oddly difficult to move a mssql db to a completely different server
<5> oh please don t say that
<5> hehe
<5> how do i set p***words on datatbase for users
<5> is there a way to test user/p***



<1> mssql is crap difficult to move dbs
<1> you need to do something like create owner "SomeUSER"
<1> crap
<5> from management console or query analyzer
<1> dude
<1> just use enterprize manager
<5> yes
<5> and this would be the user/p*** that site is usin to login to SQL
<4> in mssql you have db server users, and actual db users, and they linked by both a name and an identifier
<4> the server users get p***words, the db users just look at the server users
<4> so if you already have a user on a db, you can't just create a server user and expect it to work because the uid will nto match
<5> you guys see the error on past.sqlwhores
<4> easiest way is to also restore "master", which holds the users
<5> ah then thats it
<5> k
<4> though then you have to do some system table hacking to get it to think it's name is the new pc's name
<5> so backup source master and restore master on destination machine
<4> or, do some system table hacks and update the UID's of your new system users to that of the db users you already have
<5> thnx bud ...gives me some work to do
<4> eitherway, you're in for some system table mods
<4> or, you can just recreate all the permissions on all your objects
<4> which can be sort of easy, delete all the users, recreate them, then from the source server script all the object permissions and run it against the new install
<5> thnx
<6> i looking at the beginning of a statement: SELECT m.* i don't understand the m. part. can someone explain?
<6> i know it's selecting columns, and * means all columns, but m.??
<7> can anyone recommend web resources and/or books I could look into? I understand basic SQL, but get confused on joins and how to structure longer queries. Is there a way to learn this, or is it purely by expeirience
<8> babbitt: There are tutorials, but mainly for the most trivial cases.
<8> babbitt: You'll probably learn more by trying and asking when you run into trouble (or to obtain feedback on your attempts).
<7> yea...I've done a few tutorials and have, in the past, done some simple sql databases
<7> but I'm finding in my current project I"m really lacking in experience with longer queries, especially joins
<7> unfortunately the current project needs to get done ASAP, so I'll probably just have to work around my inexperience with mutiple queries and python logic inbetewen
<8> babbitt: You might try asking specific questions from time to time, hoping to get a few new suggestions that can be applied generally.
<7> in the future I'll probably do so
<7> how do I remove all entries in a given table that have a duplicate column value?
<7> nvm, I found it in SQL cookbook. Thanks anwyay :)
<7> that'll teach me to read before posting, sorry guys
<8> babbitt: Not a problem. There are several approaches to that.
<7> its actually kinda frustrating, sql seems so powerful, but I'm so unfamiliar with the syntax and symantics...I can feel the power, but I don't know how to use it.
<8> babbitt: You're in good company. We've all been there.
<7> how would I select rows where a column bitwise anded to a provided value is true? I don't see it in the postgres docs
<7> how would I combine these two statements: "SELECT employeenumber FROM userp*** where username = '%s'" and ""SELECT groupnumber FROM groupmembership WHERE employeenumber = '%s'" ?
<9> you could use UNION
<8> babbitt: How does employeenumber relate to groupnumber?
<8> babbitt: There doesn't appear to be a relationship.
<8> babbitt: Sorry. Just JOIN them on employeenumber.
<9> oh, maybe he wants: SELECT groupnumber FROM groupmembership WHERE employeenumber = (SELECT employeenumber FROM userp*** where username = '%s')
<8> Nah. It's a simple JOIN.
<9> or SELECT groupnumber FROM groupmembership JOIN employeenumber USING (employeenumber) WHERE employeenumber = '%s'
<9> oops not quite
<9> or SELECT groupnumber FROM groupmembership JOIN employeenumber USING (employeenumber) WHERE username = '%s'
<7> ok, let me play with those
<8> SELECT .. FROM userp*** JOIN groupmembership USING userp***.employeenumber WHERE username=blah;
<8> SELECT .. FROM userp*** JOIN groupmembership USING (userp***.employeenumber) WHERE username=blah;
<9> right
<8> Apparently, the ()'s may be necessary.



<9> when you say USING () you don't specify the table the join column belongs to
<9> because the column must exist in both tables you are joining
<8> Right.
<9> so just USING (employeenumber), not USING (userp***.employeenumber)
<8> Half in the middle of ON ... then changed it to USING.
<9> aha
<8> Serves me right.
<9> this is the brilliant part about irc... so easy to type any old stuff in before you try it or even think too hard about it :-)
<7> lol, right....I'll look at this in a few minutes, thank you for all your help guys, and for tolerating my newbie questions
<7> ok, got that...how do I do a join inside an insert: self.cursor.execute("SELECT statenumber FROM states WHERE statename = '%s'"%(state))
<7> stateNumber = self.cursor.fetchall()[0][0]
<7> self.cursor.execute("INSERT INTO orderstates (ordernumber, statenumber) VALUES (%s, %s)"%(orderNumber, stateNumber))
<8> babbitt: INSERT INTO table1 (col1, col2) SELECT v1, v2 FROM table2 WHERE ...;
<7> ok, learning a lot now...I didn't know an INSERT INTO SELECT structure was valid
<7> ack, sorry
<1> babbitt heheh
<10> I have a question. I just deleted my "users" table, what do I do to fix it?
<11> hello!
<11> how do i make an ORDER BY case INsensitive?
<1> lo all
<12> Liquid-Silence: !!!!!!!!!!!!
<13> guys
<13> you know in sql
<13> is there any way to insert a record, if it doesnt exist
<13> otherwise, update it
<1> if(Exist)
<13> is there any way to copy a table to another
<12> hacked``: you want to write that in plain sql??
<12> hacked``: you have to do a SELECT first
<13> why cant i just do insert into table2 select * from table1
<1> select into .......
<12> hacked``: yes you can
<8> hacked``: What database are you using?
<8> hacked``: Be careful using * in the SELECT list.
<13> why
<13> mysql
<8> hacked``: CREATE TABLE tbl2 LIKE tbl1; INSERT INTO tbl2 (col1, col2, col3) SELECT c1,c2,c3 FROM tbl1;
<8> hacked``: Because * isn't guaranteed to be successful. Don't ***ume order of the columns.
<13> k
<14> How do I fetch rows there the datefield resides within last month?
<14> like if it's the fifth month I want to fetch all the rows with 2006-04
<15> which db?
<14> mysql
<15> look at the mysql reference manual for the date functions, that will be very easy
<14> I don't think it's easy
<15> http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html
<15> Have you looked at that?
<14> Yeah
<14> Before I asked
<15> Use something like: where date_format(myDateColumn, '%Y%m') = '200604'
<14> Yeah I was thinking something like that, but how do I get that string?
<14> I use this for the present month; SELECT COUNT(DISTINCT ip) FROM webstats WHERE DATE_FORMAT(date, '%Y-%m')=DATE_FORMAT(NOW(), '%Y-%m')
<15> You can subtract one month from the current date.
<14> really, what function?
<15> Uhmmm.... subdate?
<14> something like DATE_FORMAT(SUBDATE(NOW(), 30), '%Y-%m')?
<15> Or interval 1 month
<14> Oh so DATE_FORMAT(SUBDATE(NOW(), 1 MONTH), '%Y-%m')?
<15> using days to approximate months can get you into trouble
<15> 'interval 1 month'
<14> jbalint_ that was what I was thinking about
<15> Can't you try this and see on your terminal?
<14> Yeah, ill try it
<14> thanks for helping, very kind
<14> Works like a charm, thank you!


Name:

Comments:

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






Return to #sql
or
Go to some related logs:

#asm
#gimp
skype frugalware
explain *** target pattern contains no `%'. Stop.
#perl
faac 1.25 deb
#linux
errror loading shared libraries ubuntu
hardening xubuntu
#perl



Home  |  disclaimer  |  contact  |  submit quotes