@# Quotes DB     useful, funny, interesting





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



Comments:

<0> sometimes its best
<0> example:
<0> when in similar situations i do the main aggregated query like you have, and then an additional query of all the other **** i need for a page, based on the id's in the first query. so, i'll have two queries handed to the page.
<0> then, when iterating the aggregate query, i'll do a query of queries and get the other cols from the secondary one
<0> i don't know if php supports query of queries
<0> but you get the idea
<0> two queries instead of 100, and marginal load when rendering the page
<0> many times its better than the alternatives
<1> problem is that my first query doesn't uniquely identify the rows. (it's actually from a join of a one to many relationship between two tables)
<0> doesn't matter
<0> second query: SELECT othercrap FROM table WHERE ID IN (first query's id's)
<0> even if you get duplicates (which you can handle) it doesn't really matter
<1> hm..guess I'd have to look up to see if php can do that, but I see what you are getting at now
<0> the queries are in ram by that time, so q of q is pretty fast
<0> the other option i would explore is simply inner joining the aggregated first query against the same table and get the other rows
<0> columns



<1> well, I can't uniquely identify the rows by just SELECT foo, MAX(bar)
<1> so I don't think they're joinable in that way
<0> sure you can, foo will be unique by definition
<1> yes
<1> hm..how to explain
<1> I need a whiteboard so I can draw database structures :b
<1> they're joinable - but, to my knowledge, it I can't get at the second coloumn I need
<0> you can, it just creates a grouped aggregate you don't like or need
<1> exactly
<1> well, simplifying the requirements a bit allowed for a simple query, and I think I can get away with it, so I guess problem solved
<0> solutions are never wrong, only requirements are wrong
<2> I have just updated to the latest stable postgresql jdbc driver, and get the following error: "ERROR: column "mei_xmldata" is of type bytea but expression is of type oid". Anyone seen this before?
<2> the db is version 7.4.2
<3> hey guys,
<3> I'm trying to write an update statement
<3> is there any chance that someone could have a quick look at it before I run it
<3> I really dont want to screw this one up
<3> http://sql-servers.com/nopaste/?show=246
<3> in a nut shell, there are two tables (tbl_dealers and tbl_postcode_area_prefix)
<3> the pap table has a list of post code prefixes and a numerical value of a region that prefix falls into
<3> I need to copy that region number (reguarly) into the dealer table
<3> it cant be linked always
<3> through the postcode (which is the iif(isnumeric(mid....... statement)
<3> hello?
<3> btw this is access
<3> whoops just spied a couple of mistakes
<3> so... um... I just ran it by mistake and it did screw up
<3> interestingly it didnt actually update anything - just listed its current value
<3> ok - I see what I did.
<3> but now I get the error "operation must be an updatable query"
<3> waaaaaaaaait a minute....
<3> I think I screwed up my iif(etc.... statement
<3> ok - I corrected my prefix code
<3> http://sql-servers.com/nopaste/?show=248
<3> still not "an updateable querey" :(
<3> *query
<3> this is the code for displaying the dlr_id and the pap_reg_id
<3> http://sql-servers.com/nopaste/?show=249
<3> that works ok
<3> ok, I sorted it using two joined queries. (the one in 249, and an update one) but I kinda wanted to do it in one query.
<3> if anyone comes online and wants to have a crack at this, I'll be working on this db for another 3 hours
<4> can I add 1 to the dbfield value from my query?
<5> Kulvis, :o
<6> select dbfield+1 from mytable ?
<4> the same in a insert statement?
<5> concatenate a value you mean :o
<4> INSERT INTO tblA (A) VALUES(a+1) ?
<4> _Kal-EL. my man.. hehe
<5> sir Kulvis :P
<7> Did you try it?
<8> Kulvis ^_^
<9> will sql2k5 attach to sql2k mdf's without issue?
<10> one would hope so
<10> let me know when you find out
<9> Darken i dont know, i was just wondering how backwards compatible it was
<9> i havent had a chance to play with it yet, im just searching msdn
<11> how do i select from database where something is empty?
<12> you mean null?
<12> select * from t where x is null
<11> ty
<11> no mysql tho



<7> is null works fine it mysql. Its not that much of a joke.
<13> Whats the best way of expanding production database? Say i want to add tables and stored procedures ***ociated with it.
<14> i dont get it
<7> Just, um, add the new tables and procs?
<13> Theres no tool to check that all stored procedures have been copied? Its a big expansion.
<12> MarkZ hopefully you have a QA environment that you can test the rollout on
<13> i have a local server to test, thats about it
<12> that's all you need
<15> MarkZ, use embarcadero change manager. its only about $2500
<13> thaks but i need to implement this today
<15> you should have thought about it before, now shouldnt you?
<13> well my boss should, im just try to help best i can
<13> trying
<15> a lack of preparation on your part does not constitute and emergency on our part
<15> unless you are paying ;)
<13> so there no tool in sql sever 2005 that might help right?
<15> yes there is, its called sql
<7> There's this nice thing called a "data dictionary". I'm sure it could be useful.
<10> what be them dictionary for
<16> i was wondering if i have a form that has an event date (input April 28 -29, 2006 for example) how can i input that into a table and then be able to sort it?
<10> doesn't sound much like a sql question to me
<10> sort using order by, the rest sounds like access or something else
<16> no im using SQL2K
<16> i mean what data type would i need to use
<16> and do i have to format it?
<10> you're using dates, so I would use a date type
<13> Drk'Angel, thx lots of good info there
<10> what business logic you use to store ranges is up to you
<10> and then i said zoul is such a noob
<10> :P
<16> Darken: does that requier a sertain format?
<16> certain even
<10> Gm0nEy you can use multiple formats for dates
<16> can i use 4/25-26/2006 for exaple
<16> or do i need a start date and an end date in diffrent columns?
<10> that is not a date
<10> that is a range
<10> id use 2 columns
<16> ty
<15> id use 2 rows
<10> easier that way
<15> what if you have a gap?
<10> Jarett__ his business logic is up to him
<15> aka excluded days
<10> not me
<10> 2 rows still uses 2 different columns
<15> Doesnt matter, his app wont work, and itll be a giant pile of crap
<10> the concept is to not try and group both dates in one column
<10> as it isn't as efficient
<10> that's not true
<15> sure it is
<10> stop talking out your ***
<10> you don't even know his concept
<15> self fulfilling prophescy
<15> like you do, Mr wizard?
<10> don't insult me Jarett__
<15> are you the calendaring master?
<10> you walk a thin line
<15> what gunna ban me? how long have they lasted before?
<15> ;)
<12> whoever put "logic" in the term "Business logic" needs to be shot
<10> tenfour hehe
<17> it should be business illogic?:P
<12> you take a logical efficient db design, and mess it up, and you have business logic
<18> anyone know of a resource for implementing Resource Description Framework on SQL Server?
<15> Darken does.. he is Mr Wizard
<14> nice
<10> quiet Jarett__
<10> before i send you back to oracle
<10> :/
<10> or #mysql
<10> more suited for you
<15> I remember the days when #sql jizzed for mysql since it was so cool
<10> i remember the days when you weren't here


Name:

Comments:

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






Return to #sql
or
Go to some related logs:

dns poisoning efnet
holocaust eye witnes
#windowsxp
query to find tables exist-select * from
#politics
glossy black button photoshop
#politics
#politics
+raid10 and +concurrent reads
#hardware



Home  |  disclaimer  |  contact  |  submit quotes