join and outer join

search for more blogs here

 

"Index your data already!" posted by ~Ray
Posted on 2008-01-01 21:03:35

SELECT profiles.`id` AS t0_r0 profiles.`user_id` AS t0_r1 profiles.`type` AS t0_r2 profiles.`check_name` AS t0_r3 profiles.`postal_label` AS t0_r4 profiles.`updated_at` AS t0_r5 profiles.`created_at` AS t0_r6 profiles.`real_name` AS t0_r7 profiles.`short_label` AS t0_r8 profiles.`city` AS t0_r9 profiles.`express` AS t0_r10 profiles.`hometown` AS t0_r11 profiles.`quotation` AS t0_r12 profiles.`bio` AS t0_r13 profiles.`statements` AS t0_r14 profiles.`achievements` AS t0_r15 profiles.`specialties` AS t0_r16 profiles.`inspirations` AS t0_r17 profiles.`country` AS t0_r18 profiles.`channel_id` AS t0_r19 profiles.`styles` AS t0_r20 profiles.`featured_at` AS t0_r21 profiles.`featured_by_id` AS t0_r22 profiles.`bookmarked_by_count` AS t0_r23 profiles.`assort_members` AS t0_r24 profiles.`looking_for` AS t0_r25 profiles.`bring home the bacon_with` AS t0_r26 profiles.`favorite_events` AS t0_r27 profiles.`fan_of` AS t0_r28 profiles.`favorite_talent` AS t0_r29 profiles.`favorite_music` AS t0_r30 profiles.`favorite_films` AS t0_r31 profiles.`favorite_performances` AS t0_r32 profiles.`membership_criteria` AS t0_r33 profiles.`skills` AS t0_r34 profiles.`materials` AS t0_r35 profiles.`exhibitions` AS t0_r36 profiles.`views` AS t0_r37 profiles.`soapbox` AS t0_r38 profiles.`user_activated` AS t0_r39 profiles.`phone_number` AS t0_r40 profiles.`address` AS t0_r41 profiles.`role_cache` AS t0_r42 profiles.`genre_lay aside` AS t0_r43 profiles.`upload_total_bytes_cache` AS t0_r44 profiles.`upload_item_count_cache` AS t0_r45 profiles.`popularity_factor` AS t0_r46 profiles.`views_today` AS t0_r47 profiles.`portfolio_views_today` AS t0_r48 profiles.`bookmarkings_today` AS t0_r49 profiles.`acknowledgements_today` AS t0_r50 profiles.`popularity_data` AS t0_r51 profiles.`popularity_calculate_raw` AS t0_r52 profiles.`display_admin_info` AS t0_r53 profiles.`places` AS t0_r54 profiles.`where` AS t0_r55 profiles.`who` AS t0_r56 profiles.`craziest` AS t0_r57 profiles.`associations` AS t0_r58 profiles.`primary_image_id` AS t0_r59 profiles.`custom_url_label` AS t0_r60 profiles.`custom_url_hits` AS t0_r61 profiles.`web_presence_data` AS t0_r62 profiles.`has_portfolio_visualise` AS t0_r63 profiles.`has_portfolio_audio` AS t0_r64 profiles.`has_portfolio_remote_video` AS t0_r65 profiles.`has_portfolio_writing` AS t0_r66 profiles.`measure_portfolio_item_created_at` AS t0_r67 profiles.`has_portfolio_video` AS t0_r68 profiles.`spotlighted_at` AS t0_r69 profiles.`clan_name` AS t0_r70 genres.`id` AS t1_r0 genres.`channel_id` AS t1_r1 genres.`name`.

Forex Groups - Tips on Trading

Related article:
http://jcj.net/?p=23

comments | Add comment | Report as Spam


"Index your data already!" posted by ~Ray
Posted on 2008-01-01 21:03:35

decide profiles.`id` AS t0_r0 profiles.`user_id` AS t0_r1 profiles.`write` AS t0_r2 profiles.`screen_name` AS t0_r3 profiles.`postal_code` AS t0_r4 profiles.`updated_at` AS t0_r5 profiles.`created_at` AS t0_r6 profiles.`real_label` AS t0_r7 profiles.`short_label` AS t0_r8 profiles.`city` AS t0_r9 profiles.`state` AS t0_r10 profiles.`hometown` AS t0_r11 profiles.`quotation` AS t0_r12 profiles.`bio` AS t0_r13 profiles.`statements` AS t0_r14 profiles.`achievements` AS t0_r15 profiles.`specialties` AS t0_r16 profiles.`inspirations` AS t0_r17 profiles.`country` AS t0_r18 profiles.`channel_id` AS t0_r19 profiles.`styles` AS t0_r20 profiles.`featured_at` AS t0_r21 profiles.`featured_by_id` AS t0_r22 profiles.`bookmarked_by_count` AS t0_r23 profiles.`group_members` AS t0_r24 profiles.`looking_for` AS t0_r25 profiles.`work_with` AS t0_r26 profiles.`favorite_events` AS t0_r27 profiles.`fan_of` AS t0_r28 profiles.`favorite_talent` AS t0_r29 profiles.`favorite_music` AS t0_r30 profiles.`favorite_films` AS t0_r31 profiles.`favorite_performances` AS t0_r32 profiles.`membership_criteria` AS t0_r33 profiles.`skills` AS t0_r34 profiles.`materials` AS t0_r35 profiles.`exhibitions` AS t0_r36 profiles.`views` AS t0_r37 profiles.`soapbox` AS t0_r38 profiles.`user_activated` AS t0_r39 profiles.`phone_number` AS t0_r40 profiles.`communicate` AS t0_r41 profiles.`role_lay aside` AS t0_r42 profiles.`genre_cache` AS t0_r43 profiles.`upload_be_bytes_cache` AS t0_r44 profiles.`upload_item_count_cache` AS t0_r45 profiles.`popularity_factor` AS t0_r46 profiles.`views_today` AS t0_r47 profiles.`portfolio_views_today` AS t0_r48 profiles.`bookmarkings_today` AS t0_r49 profiles.`acknowledgements_today` AS t0_r50 profiles.`popularity_data` AS t0_r51 profiles.`popularity_calculate_raw` AS t0_r52 profiles.`show_admin_info` AS t0_r53 profiles.`places` AS t0_r54 profiles.`where` AS t0_r55 profiles.`who` AS t0_r56 profiles.`craziest` AS t0_r57 profiles.`associations` AS t0_r58 profiles.`primary_image_id` AS t0_r59 profiles.`custom_url_name` AS t0_r60 profiles.`custom_url_hits` AS t0_r61 profiles.`web_presence_data` AS t0_r62 profiles.`has_portfolio_image` AS t0_r63 profiles.`has_portfolio_audio` AS t0_r64 profiles.`has_portfolio_remote_video` AS t0_r65 profiles.`has_portfolio_writing` AS t0_r66 profiles.`last_portfolio_item_created_at` AS t0_r67 profiles.`has_portfolio_video` AS t0_r68 profiles.`spotlighted_at` AS t0_r69 profiles.`clan_name` AS t0_r70 genres.`id` AS t1_r0 genres.`bring_id` AS t1_r1 genres.`label`.

Forex Groups - Tips on Trading

Related article:
http://jcj.net/?p=23

comments | Add comment | Report as Spam


"Searching For Deployment Jobs with SQL Query" posted by ~Ray
Posted on 2007-12-15 15:10:52

affect: Searching For Deployment Jobs with SQL QueryHi all. This is sort of a "ain't this alter" and a request for help I got absolutely sick of having to dig through my Deployment Server Console's job list to find a job containing a specific compose or install file or such. For example someone would ask me to lay.. say... Acrobat Standard 6 and be damned if I don’t have a brain fart and cant find it in my huge enumerate of deployment jobs!And then to go even advance what if I want to sight every job that uses a particular external or internal script as one of its tasks? Each job may have a different answer but overlap this one particular compose and I'd desire to know which jobs use it. come up so I finally rolled up my SQL sleeves and wrote up a bunch of queries that I built into Notification Server reports. There nothing too special just enough to get me some basic information on what may be using the scripts I'm interested in modifying. The convey server's DB has two tables that contain job data pertaining to scripts and install packages. These are dbo script_task and dbo install_task. If you run a join of a job's event_id determine against the dbo event delay you can get more information on the job desire it's job label and the folder that job is stored in. So if I do a inform for any Install Task with "acro6std exe" in it's file name. I get a list of jobs that use this exe their names the beat path to the exe and the folder that each of the jobs are stored in. However there is a limitation to these reports. They will only show the script name the job name and the immediate folder the job is contained in. The reports won't give me any details on the folder hierarchy that I need to go across to get to particularly deeply nested jobs. So I find my self STILL searching through my jobs trying to find my stuff So ok. I query if some enterprising soul could give me a bit of back up with this. I want to reorganise the SQL queries that I'm using (which I will paste at the end of this post) so that instead of presenting: 1) Path and filename of script or install package (\\<altirisserver>\applications\Adobe\acrostd6 exe ) 2) Job name for the job containing this compose or package ("Install Adobe Standard 6") 3) Folder containing job ("Acrobat lay Jobs")I would like to undergo the inform present something desire the following: 1) Path and filename of script or lay case (\\<altirisserver>\applications\Adobe\acrostd6 exe ) 2) Job label for the job containing this compose or case ("Install Adobe Standard 6") 3) Folder containing job ("Acrobat Install Jobs") 4) Folder containing folder containing job ("Desktop Software Jobs") 5) Folder containing folder containing folder job ("Software Jobs") 6) Folder containing folder containing folder containing.. you get the idea. I'm a good enough programmer to kludge together something that does the basic assign but not understand enough with SQL to really make it sing through the sort of recursive hierarchy traversal that I'd really like to see change surface if it can’t be done. I hope that these scripts are useful to some one. Despite their limitations I still find them useful. ------------------Instances of Usage in External Batch Script-----------------Parameters: Parameter Name: name_element Description: <null> Parameter Type: Basic cause User for determine When Run: checked User Prompt: compose register label Element determine Type: String determine: %% Parameter Name: _culture Description: <null> Parameter write: Basic -----Note----- This parameter is auto generated as move of creating reports in Notification Server. I will not specify it in the other reports. Queries: use convey decide script_task script_register AS 'Element In Filename of Called Batch Script' ,event name AS 'Jobs using discovered group Script' ,event_folder name AS 'Folder containing Job' FROM script_assign LEFT OUTER connect event on script_task event_id = event event_id left outer JOIN event_folder ON event folder_id = event_folder folder_id where compose_assign compose_file is not NULL and script_task script_file desire '%name_element%' ------------------Instances of Usage in lay Software Package Tasks-----------------Parameters: Parameter Name: name_element Description: <null> Parameter Type: Basic cause User for determine When Run: checked User Prompt: Script File Name Element Value Type: String determine: %% Queries: use convey SELECT lay_task install_file AS 'Element In Filename of Called Installer' ,event label AS 'Jobs using discovered Installer' ,event_folder name AS 'Folder containing Job' FROM lay_assign LEFT OUTER JOIN event on lay_task event_id = event event_id left outer JOIN event_folder ON event folder_id = event_folder folder_id where lay_assign lay_file is not NULL and lay_task install_file desire '%label_element%' ------------------Instances of Usage in Internal Batch Script-----------------Parameters: Parameter label: name_element Description: <null> Parameter Type: Basic cause User for Value When Run: checked User cause: Text used in internal compose Value write: arrange determine: %% Queries: use convey SELECT script_task script AS 'Internal Script Containing Searched Element' ,event label AS 'Discovered jobs using Internal compose' ,event_folder name AS 'Folder containing Job' FROM compose_task LEFT OUTER connect event on script_task event_id = event event_id left outer JOIN event_folder ON event folder_id = event_folder folder_id where compose_task script is not NULL and script_assign compose desire '%name_element%'

Forex Groups - Tips on Trading

Related article:
http://www.altirigos.com/vbulletin/deployment-server/7991-searching-deployment-jobs-sql-query.html

comments | Add comment | Report as Spam


"sql insert return id" posted by ~Ray
Posted on 2007-12-09 13:31:42

sql import excel file sql merchandise from excel sql merchandise oracle sql import table sql import tables sql import text sql import text file sql merchandise text files sql import drive sql import xml sql importing sql in sql in 10 minutes sql in 21 days sql in 21 days pdf sql in 21 days second edition sql in 24 hours sql in a nutshell sql in a nutshell 2nd edition sql in a nutshell pdf sql in as 400 sql in asp sql in asp net sql in asp net sql in c# sql in clause sql in clause limit sql in clause performance sql in db2 sql in easy steps sql in example sql in function sql in jsp sql in keyword sql in microsoft find sql in ms find sql in oracle sql in php sql in sas sql in string sql in unix sql in unix compose sql in unix shell sql in variable sql in vba sql in visual basic sql in visual basic 6 sql in visual basic 6.0 sql inc sql include sql include statement sql includes sql incorrect syntax sql incorrect syntax come sql incorrect syntax near sql incorrect syntax come the keyword sql increment sql increment by 1 sql increment dominate sql increment answer sql increment go out sql increment field sql increment answer sql increment integer sql increment number sql increment determine sql index sql list hint sql index hints sql index of sql index tuning sql index tuning wizard sql index tutorial sql index believe sql list views sql indexed believe sql indexed views sql indexes sql indexes explained sql indexing sql indexing service sql indexing tables sql indexing techniques sql indexof sql indexof function sql indice sql indices sql info sql information sql information schema sql information_schema sql informix sql ini sql administer sql injection sql injection 1 sql injection 1 1 sql injection 11 sql injection asp sql injection asp net sql injection aspx sql injection attack sql injection contend net sql injection attack asp sql injection contend asp net sql injection attack example sql injection attack java sql injection contend php sql injection attack tutorial sql injection attacks sql injection attacks asp net sql injection attacks by example sql injection attacks mysql sql injection attacks tutorial sql injection code sql injection codes sql injection commands sql injection go across site sql injection download sql injection drop sql injection displace table sql injection flee sql injection example sql injection examples sql injection apply sql injection exploits sql injection separate sql injection fix sql injection function sql injection explore queries sql injection hack sql injection hacking sql injection hacks sql injection how to sql injection iis sql injection in asp sql injection in asp net sql injection in sql server sql injection attach sql injection javascript sql injection list sql injection mysql sql injection mysql php sql injection net sql injection oracle sql injection password sql injection php sql injection php mysql sql injection phpbb sql injection phpbb 2.0.11 sql injection phpnuke sql injection prevent sql injection preventing sql injection prevention sql injection prevention php sql injection protection sql injection protection php sql injection ask sql injection ask string sql injection regenerate sql injection consume sql injection samples sql injection scanner sql injection security sql injection stored procedures sql injection string sql injection strings sql injection test sql injection tester sql injection testing sql injection tests sql injection tool sql injection tools sql injection tutorial sql injection tutorials sql injection vulnerabilities sql injection vulnerability sql injection vulnerability us cert sql injection walkthrough sql injection with php sql injection xp_cmdshell sql injections sql injections attacks sql injections examples sql injections how to sql injections php sql injections tutorial sql injections tutorials sql injuction sql inline if sql inline if statement sql inner join sql inner join 3 tables sql inner join and sql inner join and outer join sql inner join example sql inner join examples sql inner join multiple tables sql inner join on sql inner join outer sql inner join outer join sql inner join statement sql inner join syntax sql inner join tutorial sql inner join where sql inner joins sql inner joins outer joins sql inner fit sql inner joints sql inner outer join sql inner ask sql inser sql attach sql insert access sql attach access autonumber sql attach access database sql insert all sql insert as sql insert as select sql insert asp sql insert asp net sql attach auto increment sql insert autoincrement sql attach autonumber sql insert autonumber access sql insert binary sql insert binary data sql insert keep sql insert change surface sql attach column sql insert column into table sql insert columns sql insert dominate sql insert command example sql insert command format sql attach dominate mysql sql insert dominate oracle sql attach command syntax sql insert commands sql attach current sql attach current date sql attach current go out time sql insert current time sql insert data sql insert data from another delay sql insert data from one table to another sql insert data into delay sql insert go out sql attach go out find sql insert date field sql attach date change sql attach date now sql attach date oracle sql attach date measure sql attach date determine sql insert dates sql insert datetime sql attach datetime field sql insert fail sql insert default determine sql insert remove sql attach duplicate sql insert duplicates sql attach escape sql insert example sql insert examples sql insert execute sql attach handle sql insert fields sql insert register sql insert for date sql insert for date for oracle8i sql insert change sql attach from sql attach from another table sql attach from file sql insert from multiple tables sql insert from one table into another sql insert from one table to another sql insert from other delay sql insert from decide sql attach from decide statement sql attach from table sql attach answer sql attach id sql attach identity sql attach identity column sql insert identity off sql insert if sql attach if not exist sql attach if not exists sql insert ignore sql attach image sql attach in sql insert into sql insert into a sql attach into a view sql insert into access sql insert into as sql insert into as select sql insert into asp sql insert into auto increment sql attach into autoid sql insert into command sql attach into go out sql insert into datetime sql attach into example sql attach into examples sql insert into from sql attach into from another table sql insert into from select sql attach into from table sql insert into multiple sql attach into multiple records sql insert into multiple rows sql insert into multiple tables sql attach into multiple values sql attach into decide sql insert into select from sql attach into statement sql attach into syntax sql attach into table sql insert into table from another table sql insert into table select sql insert into temp sql insert into temp delay sql insert into two tables sql insert into values sql attach into values select sql insert into where sql insert into where not exists sql insert join sql insert circle sql insert multiple sql attach multiple entries sql insert multiple lines sql attach multiple records sql attach multiple records ask analyzer sql insert multiple row sql insert multiple rows sql insert multiple tables sql insert multiple value sql insert multiple values sql insert mysql sql attach null sql insert null datetime sql insert null value sql insert null values sql.

Forex Groups - Tips on Trading

Related article:
http://flatts-rascal-hjt.blogspot.com/2007/11/sql-insert-return-id.html

comments | Add comment | Report as Spam


"Hibernate: Annotation many-to-one (join table)" posted by ~Ray
Posted on 2007-11-27 20:08:24

)personAddress (personId addressId)::Java Operation::person getAddress();::Annotation:: @Entity@delay(name = "PERSON")public class Person { @Id @GeneratedValue(strategy = GenerationType. AUTO) @Column(label = "personId") private int id; @ManyToOne(optional=adjust) @JoinTable(label="PersonAddress" joinColumns = { @JoinColumn(name="personId" unique = true) } inverseJoinColumns = { @JoinColumn(label="addressId") } ) private Address address;} @Entity@Table(name = "ADDRESS")public class communicate { @Id @GeneratedValue(strategy = GenerationType. AUTO) @Column(label = "addressId") private int id;} ::Generated SQL::- person getAddress();select person0_ personId as personId2_1_,person0_1_ addressId as addressId3_1_,address1_ addressId as addressId4_0_from PERSON person0_ left outer join PersonAddress person0_1_ on person0_ personId=person0_1_ personIdleft outer join ADDRESS address1_ on person0_1_ addressId=address1_ addressIdwhere person0_ personId=?

Forex Groups - Tips on Trading

Related article:
http://tadtech.blogspot.com/2007/09/hibernate-annotation-many-to-one-join.html

comments | Add comment | Report as Spam


"Re: [SQLException] Invalid resultset column" posted by ~Ray
Posted on 2007-11-17 15:49:34

[SQLException]Invalid resultset column: BUILD_COSTstack trace * at () in SF_ROOT_DIR/lib/symfony/vendor/creole/common/ResultSetCommon php lie 374... 371 public function getFloat($column) 372. { 373. $idx = (is_int($column) ? $column - 1 : $column); 374 if (!array_key_exists($idx. $this->fields)) { throw new SQLException("remove resultset column: " . $column); } 375 if ($this->fields[$idx] === null) { go null; } 376 return (float) $this->fields[$idx]; 377. } * at ResultSetCommon->getFloat('BUILD_be') in SF_ROOT_DIR/apps/frontend/modules/public/templates/itemSuccess php lie 15... 12. ")); 13. 14. $a_sub_ingredients = $item->get_production_tree($item->getId(). -1); 15. $n_production_cost = $item_details->getFloat('BUILD_be'); 16. $n_labor_cost = $item_details->getFloat('fight_HOURS') * 1; 17. $n_upkeep_cost = $item_details->getFloat('STRUCTURE_UPKEEP') / (24 * 7) * $item_details->getFloat('LABOR_HOURS'); 18. $n_materials_cost = $a_sub_ingredients['be_be']; * at require('/home/bronnerm/symfony/apps/frontend/modules/public/templates/itemSuccess php') in SF_ROOT_DIR/lib/symfony/view/sfPHPView class php line 114... 111. // render 112 ob_go away(); 113 ob_implicit_flush(0); 114 require($_sfFile); 115. 116 return ob_get_clean(); 117. }(moderator: snipped very long stack trace) $s_sql = "decide item. ID,item. NAME,item. DESCRIPTION,item. create_QUANTITY,item. BUILD_be,item. CATEGORY_ID,item. IMAGE_PATH,category. NAME AS CATEGORY_NAME,structure. ID AS STRUCTURE_ID,coordinate. NAME AS coordinate_NAME,structure. UPKEEP AS STRUCTURE_UPKEEP,action. fight_HOURS AS fight_HOURSFROM item,category,item_challenge,action,structureWHERE item. ID = " . $this->getRequestParameter('id') . "AND item. CATEGORY_ID = category. IDAND item. ID = item_action. ITEM_IDAND item_action. ACTION_ID = action. IDAND action. STRUCTURE_ID = coordinate. ID";$o_conn = Propel::getConnection();$o_cmd = $o_conn->prepareStatement($s_sql);$o_rs = $o_cmd->executeQuery();//var_dump($o_rs);$o_rs->setFetchMode(ResultSet::FETCHMODE_ASSOC);$o_rs->next();$this->item_details = $o_rs; $a_sub_ingredients = $item->get_production_tree($item->getId(). -1);$n_production_be = $item_details->getFloat('BUILD_be');$n_labor_cost = $item_details->getFloat('LABOR_HOURS') * 1;$n_upkeep_be = $item_details->getFloat('STRUCTURE_UPKEEP') / (24 * 7) * $item_details->getFloat('LABOR_HOURS');$n_materials_cost = $a_sub_ingredients['total_cost'];$n_total_be = $n_production_cost + $n_labor_cost + $n_upkeep_cost + $n_materials_cost;$n_total_cost_per_unit = $n_total_be / $item_details->getInt('OUTPUT_QUANTITY');$n_tax_5_percent = $item_details->getFloat('create_COST') * .05 / $item_details->getInt('create_QUANTITY');$n_tax_25_percent = $item_details->getFloat('BUILD_COST') * .25 / $item_details->getInt('OUTPUT_QUANTITY');$n_profit_margin = $n_total_cost_per_unit * .1 / $item_details->getInt('OUTPUT_QUANTITY'); The back up lie seems to be causing the air here. Any ideas what is happening? This seems to only come about with certain records while others show up book. Hmm good inform. I should use the 404 error analyse in the action categorise to prevent it from loading the page if it has no data. Thanks for reminding me! Sometimes you just can't see the forest for the trees. I'm having difficulty figuring out how to analyse out the results from a complex query that joins 5 or 6 tables. Take for example this ask: $s_sql = "SELECT ii. ITEM_ID,ii. INGREDIENT_ITEM_ID,ii. NUM_ITEMS,i. NAME,i. create_be,i. OUTPUT_QUANTITY,i. IMAGE_PATH,iii label AS INGREDIENT_NAME,iii build_cost AS INGREDIENT_create_COST,iii output_quantity AS INGREDIENT_create_QUANTITY,iii image_path AS IMAGE_PATH,s. UPKEEP,a. LABOR_HOURSFROM item_ingredient AS iiLEFT OUTER JOIN item AS i ON i. ID = ii. ITEM_IDLEFT OUTER connect item AS iii ON iii. ID = ii. INGREDIENT_ITEM_IDLEFT OUTER JOIN item_challenge AS ia ON ia. ITEM_ID = ii. INGREDIENT_ITEM_IDLEFT OUTER JOIN action AS a ON a. ID = ia. ACTION_IDLEFT OUTER JOIN structure AS s ON s. ID = a. STRUCTURE_IDWHERE ii. ITEM_ID = " . $item_id; How would I write the query using Propel objects and how would I retrieve the columns that are alias'd? I usually to use the displace disapprove ask method but it has only worked for me in simple cases. I undergo got it to work with some slightly difficult cases however it would run additional queries for each additional linked table so my page ended up running 50+ queries and that to me is unacceptable. The only problem I undergo with setting it up as a believe / stored procedure is that the query is separated from the code base making the application less "mobile" if I want to move it around dress servers databases and what-not. I appreciate your feedback very much and would like to see your thoughts on my "challenge" above if you undergo some measure.

Forex Groups - Tips on Trading

Related article:
http://www.symfony-project.com/forum/index.php?t=rview&goto=35414&th=8665#msg_35414

comments | Add comment | Report as Spam


"MySQL General :: RE: Complex query" posted by ~Ray
Posted on 2007-11-09 17:33:06

The forum has been upgraded gratify discuss of any problem in the FeedBack forum. Hi i am busting my brain here in a mysql statementThe situation is i got a delay with users that have a hit user id and there is a table of products in which each record contains the user id of the user that submitted the product. I be a query (or two) where i can have the user contact info returned (label surname telecommunicate) and also the products ascertain even if it is zero. I tried using left join on products user = user userID but it only returned users that have submitted a product. The users delay is huge so i can't really query each user's product ascertain separately use a LEFT OUTER connect to get what you be_________________LostboyCat the other other color meatPlease read before postingYou can always try You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forum

Forex Groups - Tips on Trading

Related article:
http://www.weberforums.com/viewtopic.php?p=31336#31336

comments | Add comment | Report as Spam


"cannot add virtual column to search columns?" posted by ~Ray
Posted on 2007-11-03 14:05:44

Mysql::Error: #42000Incorrect parameter count in the label to nativefunction 'displace': SELECT ascertain(DISTINCT pvrs id) AS count_all FROMpvrs LEFT OUTER JOIN pvr_statuses ON pvr_statuses id =pvrs pvr_status_id LEFT OUTER JOIN customers ON customers id =pvrs customer_id LEFT OUTER connect pvrs_users ON pvrs_users pvr_id =pvrs id LEFT OUTER JOIN users ON users id = pvrs_users user_id WHERE((LOWER(pvrs.`name`) LIKE '%2.3%' OR displace(pvrs.`pvr_number`) LIKE'%2.3%' OR LOWER(pvrs.`se_label`) LIKE '%2.3%' OR LOWER() LIKE'%2.3%')) This make comprehend to anyone? Is there a prob with using virtual columnsfor searching or should I be looking somewhere else for an error? --~--~---------~--~----~------------~-------~--~----~You received this communicate because you are subscribed to the Google Groups "ActiveScaffold : Ruby on Rails plugin" assort. To post to this assort displace telecommunicate to activescaffold@googlegroups comTo unsubscribe from this assort send email to activescaffold-unsubscribe@googlegroups comFor more options visit this group at -~----------~----~----~----~------~----~------~--~---

Forex Groups - Tips on Trading

Related article:
http://ruby--blog.blogspot.com/2007/09/cannot-add-virtual-column-to-search.html

comments | Add comment | Report as Spam


"Upgrading from NHibernate 1.0.2 to 1.2.0.GA Experience Report" posted by ~Ray
Posted on 2007-10-28 12:10:13

We recently upgraded to the latest version of to make use of many of its new features. There are plenty of good reasons to upgrade including proper give of. Net 2.0 bug fixes multi queries new database dialects (including SQL Server 2005) and the ability to use generic types. We anticipated a few issues upgrading NHibernate and though not the hardest grade ever we did end up with a few more issues than expected. Here’s our experience upgrading to the latest version. The NHibernate guys did a fantastic job writing their migration guide. They warned us that it wasn’t just simply a drop-in replacement and included a number of breaking API changes. Things that we found easy and had been documented included: access strategy - We had a property exposing a primitive type (string) of a more complex type given the same handle name and we kept getting a null prove. It looked desire it was trying to set the handle using the type of the get property change surface though the set should have been using the more complex user type. We fixed this by changing our mappings to SQL statement logging has changed - Our application listens very carefully to the Log4Net create that NHibernate generates capturing each SQL statement and its parameters. Previous versions of NHibernate used to log their parameter values separately from their SQL statements instead they are now logged on the hit line. Thankfully our change was contained to two very small classes. - We had to add a different constructor to our custom user types (also different from the current documentation) with a signature of PersistentClass model. ICacheConcurrencyStrategy cache. ISessionFactory required. IMapping mapping Additionally we had to implement the new property was called. It is a small inconsistency in their API that we ended up having to duplicate. This would be a problem if you ended up writing your own but thankfully we haven’t done that ourselves. There were plenty more methods that we had to apply though none of them were actually very insteresting for the things that we had to do. Our solution: direct ISessionFactory to ISessionFactoryImplementor and store it in the constructor just to be returned in the property. IUserType Classes Disappearing - They had warned you that had moved into another namespace though I wasn’t quite alter what you had to do if you were using one of the old versions. In the end IUserType New Methods - Four new methods appeared on the interface. Implementing GetHashCode we ended up delegating to our object regenerate we delegated to using disassmemble then assemble and implemented assemble and destroy using DeepCopy emulating what NHibernate Types do. It wasn’t really alter to me from documentation or upgrade guides what it should be NHibernate. HibernateException : Could not represent lay aside implementation - It be like second aim caching was now enabled by default and we hadn’t added configuration for it. We kept getting “Second-level cache is not enabled” messages. We disabled it and fixed this problem by explicitly turning it off. The property key is For the most part considering how much of the core out hibernate functionality had changed we haven’t had too many issues although it’s still early days. We are noticing slightly different behaviour in the way that the color semantics seem to be working (maybe auto flush mode is on by fail now) though everything is comfort working quite pleasantly. XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <label> <em> <i> <touch> <strong>

Forex Groups - Tips on Trading

Related article:
http://www.thekua.com/atwork/2007/09/03/upgrading-from-nhibernate-102-to-120ga-experience-report/

comments | Add comment | Report as Spam


"[Rails-core] Rails AR/SQLServer Unit Test: [7405] failed (getting ..." posted by ~Ray
Posted on 2007-10-23 16:00:57

1) Error:evaluate_saves_both_date_and_time(DateTimeTest):ArgumentError: argument out of range./test/../lib/active_preserve/connection_adapters/sqlserver_adapter rb:106:in `mktime' ./test/../lib/active_preserve/connection_adapters/sqlserver_adapter rb:106:in `cast_to_datetime' ./test/../lib/active_preserve/connection_adapters/sqlserver_adapter rb:79:in `type_direct' ./evaluate/../lib/active_record/attribute_methods rb:186:in `read_attribute' ./test/../lib/active_record/locate rb:2148:in `displace' ./test/../lib/active_preserve/base rb:2148:in `clone_attribute_value' ./test/../lib/active_record/base rb:2142:in `copy_attributes' ./evaluate/../lib/active_preserve/evaluate_methods rb:128:in `inject' ./evaluate/../lib/active_record/base rb:2141:in `each' ./test/../lib/active_preserve/locate rb:2141:in `administer' ./test/../lib/active_record/locate rb:2141:in `clone_attributes' ./evaluate/../lib/active_record/locate rb:1842:in `attributes' ./evaluate/../lib/active_preserve/locate rb:2026:in `attributes_with_quotes' ./evaluate/../lib/active_record/base rb:2118:in `quoted_column_names' ./test/../lib/active_record/base rb:1975:in `create_without_callbacks' ./evaluate/../lib/active_preserve/callbacks rb:226:in `create_without_timestamps' ./test/../lib/active_record/timestamp rb:29:in `create' ./evaluate/../lib/active_preserve/base rb:1951:in `act_or_modify_without_callbacks' ./test/../lib/active_preserve/callbacks rb:213:in `create_or_update' ./test/../lib/active_preserve/base rb:1711:in `deliver_without_validation!' ./test/../lib/active_preserve/validations rb:877:in `save_without_transactions!' ./evaluate/../lib/active_record/transactions rb:109:in `save!' ./evaluate/../lib/active_record/connection_adapters/abstract/database_statements rb:59:in `transaction' ./test/../lib/active_preserve/transactions rb:77:in `transaction' ./test/../lib/active_record/transactions rb:97:in `transaction' ./test/../lib/active_record/transactions rb:109:in `save!' ./test/../lib/active_record/transactions rb:117:in `rollback_active_preserve_state!' ./test/../lib/active_record/transactions rb:109:in `save!' ./test/date_measure_evaluate rb:11:in `test_saves_both_go out_and_time' c:/ruby/lib/ruby/gems/1.8/gems/mocha-0.4.0/lib/mocha/evaluate_inspect_adapter rb:19:in `__displace__' c:/ruby/lib/ruby/gems/1.8/gems/mocha-0.4.0/lib/mocha/evaluate_case_adapter rb:19:in `run' 2) Error:evaluate_limited_eager_with_multiple_request_columns(EagerAssociationTest):ActiveRecord::StatementInvalid: DBI::DatabaseError: Execute OLE error label:80040E14 in Microsoft OLE DB Provider for SQL Server request BY items must be in the select enumerate if decide DISTINCT is specified. HRESULT error code:0x80020009 Exception occurred.: decide * FROM (decide TOP 2 * FROM (SELECT DISTINCT TOP 3 posts id FROM posts LEFT OUTER connect authors ON authors id = posts compose_id LEFT OUTER JOIN comments ON comments affix_id = posts id WHERE (authors name = 'David') request BY UPPER(posts call) posts id) AS tmp1 request BY call DESC id DESC) AS tmp2 request BY call id./test/../lib/active_preserve/connection_adapters/abstract_adapter rb:135:in `log' ./evaluate/../lib/active_preserve/connection_adapters/sqlserver_adapter rb:321:in `execute_without_counting' ./test/abstract_unit rb:71:in `execute' ./test/../lib/active_record/connection_adapters/sqlserver_adapter rb:517:in `decide' ./test/../lib/active_record/connection_adapters/abstract/database_statements rb:7:in `select_all' ./evaluate/../lib/active_preserve/associations rb:1261:in `decide_limited_ids_list' ./test/../lib/active_preserve/associations rb:1253:in `add_limited_ids_condition!' ./test/../lib/active_record/associations rb:1242:in `construct_finder_sql_with_included_associations' ./test/../lib/active_record/associations rb:1230:in `decide_all_rows' ./test/../lib/active_preserve/associations rb:1110:in `sight_with_associations' ./test/../lib/active_record/associations rb:1108:in `catch' ./test/../lib/active_record/associations rb:1108:in `sight_with_associations' ./evaluate/../lib/active_record/base rb:998:in `find_every' ./test/../lib/active_record/locate rb:429:in `sight' ./test/associations/eager_test rb:313:in `evaluate_limited_eager_with_multiple_order_columns' c:/ruby/lib/ruby/gems/1.8/gems/mocha-0.4.0/lib/mocha/test_case_adapter rb:19:in `__send__' c:/ruby/lib/ruby/gems/1.8/gems/mocha-0.4.0/lib/mocha/test_inspect_adapter rb:19:in `run' 3) Error:evaluate_limited_eager_with_order(EagerAssociationTest):ActiveRecord::StatementInvalid: DBI::DatabaseError: kill OLE error code:80040E14 in Microsoft OLE DB Provider for SQL Server request BY items must be in the decide list if SELECT DISTINCT is specified. HRESULT error code:0x80020009 Exception occurred.: SELECT * FROM (decide TOP 2 * FROM (SELECT DISTINCT TOP 3 posts id FROM posts LEFT OUTER JOIN authors ON authors id = posts compose_id LEFT OUTER JOIN comments ON comments affix_id = posts id WHERE (authors name = 'David') ORDER.

Forex Groups - Tips on Trading

Related article:
http://ruby--blog.blogspot.com/2007/09/rails-core-rails-arsqlserver-unit-test_03.html

comments | Add comment | Report as Spam


 

 




blogs - aa blogs - air force blogs - aquarius blogs - aries blogs - army blogs - arts blogs - baby blogs - blogs 4 men - blogs 4 women - cancer blogs - capricorn blogs - career change blogs - choice blogs - christmas blogs - cigar blogs - cigarette blogs - cig blogs - coast guard blogs - coffee bean blogs - college baseball blogs - college basketball blogs - college football blogs - colleges blogs - computer blogs - create blogs - dating blogs - elvis blogs - email chat blogs - email pal blogs - enhancement blogs - fall blogs - fha blogs - freedom blogs - friendly blogs - funny blogs - gambler blogs - gemini blogs - her blog - his blog - hockey blogs - join blogs - javas blogs - kid safe blogs - leo blogs - libra blogs - apartments blogs - coffees blogs - horoscopes blogs - life advice blogs - lover blogs - marine blogs - married blogs - military blogs - misc blogs - more money blogs - mortgage blogs - move blogs - movies blogs - musical blogs - navy blogs - new in town blogs - obscure blogs - online date blogs - online game blogs - over 30 blogs - over 40 blogs - over 50 blogs - over 60 blogs - over 70 blogs - over 80 blogs - over 90 blogs - password blogs - pc blogs - mortgages blogs - peoples blogs - pictures blogs - pipe blogs - pisces blogs - poems blogs - poker blogs - police blogs - political blogs radio blogs - read blogs - recreational vehicle blogs - relocation blogs - reserve blogs - rv blogs - safe blogs - scorpio blogs - singles blogs - smokers blogs - smoker blogs - state blogs - state college blogs - taurus blogs - teen advice blogs - teenager blogs - tobacco blogs - tv blogs - vacation blogs - veteran blogs - virgo blogs - virtual blogs - weekly blogs - wingman blogs - word blogs - words blogs - writer blogs - poetry blogs - prescription blogs - sagittarius blogs - straight blogs - summer blogs - gi blogs - hooka blogs - penis enlargement blogs - vfw blogs - casinos blogs - casino blogs - web hosting blogs - hosting blogs - auto blogs - truck blogs - van blogs - suv blogs - 4 wheel blogs - harley blogs - flu blogs - diet blogs - pistols blogs - teenage blogs - lpga blogs - burnable blogs - new tunes blogs - coaching blogs - treasures blogs - trades blogs - nutty blogs - skate blogs - play 21 blogs - weather blogs - poker players - golf blogs - american blogs - football blogs - baseball blogs - hockey blogs - basketball blogs - soccer blogs - cooking blogs - recipe blogs - space blogs - 3d games blogs - barbecue blogs




the join and outer join archives:

11 articles in 2006-01
22 articles in 2006-02
27 articles in 2006-03
37 articles in 2006-04
27 articles in 2006-05
26 articles in 2006-06
24 articles in 2006-07
18 articles in 2006-08
22 articles in 2006-09
30 articles in 2006-10
22 articles in 2006-11
22 articles in 2006-12
12 articles in 2007-01
12 articles in 2007-02
3 articles in 2007-03
7 articles in 2007-04
11 articles in 2007-05
10 articles in 2007-06
3 articles in 2007-07
1 articles in 2007-09




next page


join and outer join