@# Quotes DB     useful, funny, interesting





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



Comments:

<0> hi
<1> hello
<2> What's wrong with this simple insert line: Insert Into gb (Namn, E-mail, Kommentar) Values ('sdfsd','sdf','dfffff') ?
<3> nothing, per se; what error do you receive?
<2> http://pastebin.com/567636
<2> oops
<2> http://pastebin.com/567642 <-- error message
<2> sytax error in INSERT INTO-expression
<3> try wrapping E-mail as such: [E-mail]
<3> the dash probably hosing you
<2> trying, thanks
<2> A new error message, always something, haha
<3> lol
<3> gotta run
<3> good luck
<2> The Operation must use a query that can be updated



<4> can anyone reccomend a more optimal way to write this (SQL Server 2000) http://www.rafb.net/paste/results/CtKe3356.html ?
<5> hey, I've got a question. There's some weird symbols showing up on a database I'm managing, and I don't know how to fix them. Safari outputs them as question marks and camino outputs them as checkmarks and euro symbols.
<5> #mysql is dead, and the people in #wordpress told me to come here.
<6> if I have an enumerable
<6> like Boy or Girl
<6> should I save it in the db as a number or a string
<1> depends upon what you're planning on doing with that value, doesn't it
<6> jackfig: very simple queries
<6> select * from table where ***= this or that
<1> then what difference does it make?
<6> I'm asking does it
<6> because I'm going a lot of queries
<6> like that
<1> so?
<6> I wondered what kind of performance hit I would get if I used string instead of int's
<1> varchar(1) doesn't take up any more space than an int
<6> int's feel far more machine friendly than varchars
<6> yeah I know that
<6> but varchar(4) does
<6> Boy | Girl
<1> and why are ints more 'machine friendly'?
<6> it would feel that way
<6> when I work in C
<1> they aren't
<6> I far prefer to p*** around int's than char pointers
<7> jackfig: a varchar(1) actually takes twice or quadruple (UTF-8) the space of a TINYINT.
<6> space isn't a huge concern
<6> I don't think I'm going to be hurting from this
<7> space = memory = speed.
<6> arjenAU: so for this should I use tinyint?
<6> and jsut restrain myself to 1 or 0
<7> however, boy/girl style stuff is not something you can index decently. if you search on it, you will be doing full tablescans.
<8> the size depends upon the DBMS you are using
<7> of course.
<1> so your statement may or may not be valid, depending upon dbms ....
<7> a varchar(1) will take at least 2 bytes, no matter how you implement it (with a terminator or with a length indicator)
<7> my statement may just be even more valid in certain cases.
<1> 1 byte difference is NOT going to create a huge performance difference
<8> not all DBMS have a 1 byte integer type
<6> I'm running PostgresQL
<6> I'm wondering if the overhead is worth it
<6> because everytime it is seen, I'm going to have to convert it
<6> with a silly function to its string form
<9> how do you look up a value in another table in a select statement?
<1> usually with: where <somecol> in (select someothercol from someothertable <where .....>)
<10> If i have multiple joins in a query is there any tool which tells you which join didnt work ?
<11> startkeylogger
<12> hi
<12> kibibyte> http://pastebin.com/568296 can you tell me why i cannot create table users_groups
<12> <12> #1005 - Can't create table '.\moja\users_groups.frm' (errno: 150)
<12> <12> help\\
<12> :(
<13> Are you sure you can include CREATE INDEX inside the table definition?
<12> i can
<12> http://mysqld.active-venture.com/InnoDB_foreign_key_constraints.html
<13> Well, I don't know then, aside from make sure the index exists first?
<12> there are indexes
<13> Sorry, no idea then. I'm no expert, however, maybe someone else will respond.
<14> and it looks to me like you're using this service as an application layer/middleware anyway
<15> well is more of a replication of data from an AS400 to our SQL Server based
<14> so you're transfering data between two legacy databases?



<15> well, is there a function in SQL called TO_NUMBER ?
<14> no
<14> there are five functions that returns a number, bit_length(), char_length(), octet_length(), extract(), and position()
<14> I guess you might use translate(), but that would be a horrible hack merely to claim you're following standards
<15> thanks for everything.... so far... I gues sif we want to use DTS... we might have to use CAST to convert String to Number and then LTRIM it.....
<14> aye
<14> the ltrim shouldn't be necesarry tho
<16> say i have a table table1, and a table table2. there are multiple table2's for each table1. table2.num is a numeric value, i want to return all rows in table1 joined with the lowest table2.num for that table1 row.
<16> i'm ***uming this involves min() or the like, i tried a subselect table join using top ... but that didnt seem to work
<16> this is sql server 2000, could use a tip on the syntax or approach to take
<17> hansbrix: subqueries are your friend
<16> BigTrucK: no doubt, i tried with a subquery though, maybe my problem was that i was trying to use top instead of min
<18> hansbrix: http://dev.mysql.com/doc/refman/5.0/en/example-maximum-column-group-row.html
<18> hansbrix: Read through that for some hints.
<16> will do, thankyou sir
<18> You're welcome.
<19> hi
<19> Xgc: i tried your statment - i cant execute :(
<18> mike84: Your SQL engine doesn't handle it? What engine are you using?
<19> pgsql 8.1
<18> PostgreSQL will handle that.
<19> http://rafb.net/paste/results/gI8eYJ25.html
<19> is that ok for table tbl_test and column test
<19> ?
<19> the column name is quite strange - i called it test ;)
<20> raxor!
<18> That form isn't exactly correct.
<19> Xgc: i get: ERROR: syntax error at or near "test1" at character 18
<19> hmm
<19> Xgc: what have i done wrong?
<21> Brez!
<20> forgto a comma?
<20> or what's "t1.test-1 test1" ?
<19> test1 is a alias for t1.test-1?
<19> an alias
<20> right
<20> maybe try AS
<18> Try: (SELECT ...) UNION (SELECT ...) ORDER BY ...;
<18> mike84: The ()'s are important.
<19> :-S
<19> ERROR: missing FROM-clause entry for table "t1"
<19> uff
<19> ccomplictaed
<18> mike84: You may also need to ORDER BY expression, where the expression is not a derived column. I'm not certain if pg need that or not.
<18> mike84: Trivial.
<18> mike84: You must be misunderstanding me.
<19> i don't ;)
<19> but your statement is quite hard to read *g*
<18> mike84: The SQL is almost exactly correct. You just need to add ()'s around the inner (SELECT ... FROM .. JOIN ...) subselects.
<18> mike84: The easiest way for me to suggest this is: (SELECT ...) UNION (SELECT ...) ORDER BY ... LIMIT ...;
<19> hmm. still the same error
<18> mike84: That is meant to suggest the form your SQL should fit into.
<18> mike84: Ok. That means pg is not allowed to ORDER BY an alias.
<18> At least it suggests that.
<19> i removed the alias
<19> http://rafb.net/paste/results/aiKxd154.html
<19> ERROR: missing FROM-clause entry for table "t1"
<18> mike84: Try it without the ORDER BY and LIMIT.
<18> Hold on.
<19> yes that works
<19> strange
<18> mike84: There's no t1 outside the ()'s
<18> mike84: Put the aliases back in and ORDER BY test1
<18> or just remove the ORDER BY for now, just for testing.
<19> Xgc: the aliases don't work
<19> ok with AS it works
<19> yes - now ir works :)
<19> rhy
<19> x
<19> thx
<19> now i have to undrestand *g*
<22> (...) UNION (...) ORDER BY .... <- the order by apply to the whole result and you need to use the column names, you can't say table_foo.x or anything
<22> and the resulting column names are the names of the columns in the first union part
<19> dennisb: i used the AS and it works


Name:

Comments:

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






Return to #sql
or
Go to some related logs:

installing showmount ubuntu
reiserfs cannot lstat Permission denied
#ubuntu
#linux
#math
DATABASE mythconverg DEFAULT CHARACTER SET latin1'
zyxel p600 nat strict
windows sticker 32p4414
linux what does pwd mean
tuntap fc5



Home  |  disclaimer  |  contact  |  submit quotes