similar to: sql question

Displaying 20 results from an estimated 50000 matches similar to: "sql question"

2007 Feb 26
1
match() function with a little enhancement
Dear R users, I was wondering if R has a built-in function doing the following : my_match(values_vector,lookup_vector) { for each value of values_vector : if value %in% lookup_vector, then value is unchanged else, value is changed the the closest element of lookup_vector, "closest" meaning "the one that would come just after if we sorted them using order()" } For example :
2006 Jul 18
5
a best way to write this.
I have a form, with 3 fields, then in my controller I get the paramters to run a query but I don''t want to filter with paramters if they are nil or blank... I''m doing this @condition = '''' if(params.....) @condition = @condition + " myparamter = " + params[..... if(params.....) @condition = @condition + " myparamter = " +
2008 Jul 17
2
Add a SQL Statement to every query
Hi, im trying to create an application for multiple customers, where data shouldnt be accessible to others. So ive added a customer_id to every db-table where it matters. Question: How can i add a Statement to find and other sql-commands so i just pull out the ones belong to the customer, without having to add :customer => customer to every find query? Whats the easiest way? a before_filter
2005 May 16
3
voicemail.conf from DB
Hi I have been playing with trying to get voicemail.conf from DB, I am using cvs-head, but when I start asterisk, it dies a horrible death, because it cant load any voicemil setting. I looked at my mysql logs to see what query was being sent, and I get SELECT category, var_name, var_val, cat_metric FROM voicemail_users WHERE filename='voicemail.conf' and commented=0 ORDER BY
2009 May 14
3
Mysql query is not working
Please, Can anyone help me to execute this query? SELECT * FROM table WHERE customer_id IN (SELECT IF(1 <> 2,''SELECT customer_id FROM customers'',''SELECT customer_id FROM company'')) Regards... -- Posted via http://www.ruby-forum.com/.
2007 Mar 07
4
Strange Problem With Unwanted, Transient Caching
Hello, I hope somebody can explain to me what''s going on here because I''m baffled! In a controller''s action I want to create a new order for a customer. Because I post back to the same action (not RESTful I know, but that''s for another day) I use code like this: def edit @order = Order.find_by_id(params[:id]) || Order.new ... end I
2014 Apr 11
0
Rails 4.1 activerecord_relation conversion to array problem
After I upgraded from rails 3.2 to 4.1 I am getting this error below. I researched that Rails 4.1 requires a conversion of an activerecord_relation to an array using to_a. I did use to_a but looks like rails is doing a select count behind the scenes. Do you know how to fix this? def index order_type = params[:order_type] @oh = OrderHeader.select("orders_header.*, users.username,
2007 Oct 26
2
function in R that's equivalent to SQL's "IN"
Hi all, I'm trying to find something like the "==" operator that will work on vectors or something equivalent to SQL's "IN" function. For e.g., if I have: x <- c(1,2,3,4,5) y <- c("apples", "oranges", "grapes", "bananas", "pears") z <- data.frame (x,y) w <- c(2,4,5) I want R to return the values
2008 Jul 16
2
Wine + PL/SQL Developer + Ubuntu
Hi I?m starting with linux and wine, but I need use PL/SQL Developer in the Ubuntu environment. I?m using PL/SQL Developer 7.0.0.150, Oracle 10g and Ubuntu 8.04. I would like some help to make it works. The software loads but don?t connect to a database. Sometimes, show an error about OCI.dll not present. How do I solve this? How I configure wine to do this. Tks a lot Ricardo
2006 Jul 28
4
ajax scaffold
someone using ajax scaffold ?? I''m using @scaffold_columns = [ AjaxScaffold::ScaffoldColumn.new(self, { :name => "name" }) ] in my model... I have a column named "name", but it''s not working, When I click in "Create New" ajax indicator starts but not occurs . . . someone can help me? tks
2006 Apr 02
5
adding primary_key to join table using migrations
Hi list, My tag_question_user join table is not currently a full-blown model. It doesn''t have a primary key - just tag_id, question_id, and user_id. I now want to add a primary key to this model (because I want to add a "description" column as well so users can describe the tag. I''m not sure how to add this using migrations. Here is what I have: class AddNotesToTags
2007 Jan 08
1
Realtime Voicemail Table Column Name Question
Hi All, In the realtime voicemail table the column 'customer_id' is used, for my purpose, to specify the customers accountcode. The column name 'accountcode' is used in the iax and sip tables. To keep this consistent throughout the tables, is there any reason I should NOT switch the column name 'customer_id' to 'accountcode' in the voicemail table? Does Asterisk
2007 Sep 21
2
ActionWebServer and SOAPFault
I''m really new to RoR and my first task is to write SOAP web service. The problem is that I don''t understand how to send custom SOAPFault messages in case of the errors. For example, I have FindCustomerById API signature: api_method :find_customer_by_id, :expects => [{:customer_id => :int}], :returns => [Customer] And controller: def
2006 Jul 31
0
MY worker won''t stop working
> On Jul 30, 2006, at 5:11 PM, Chris H wrote: > >> Hi Ezra, >> >> thanks for the reply. >> >> There''s a ruby process that appears in top when I fire off the do_work >> method. >> It uses around 30-50% cpu and disappears once all processing has >> completed. >> >> When I try to stop processing using delete_worker I was
2004 Jun 08
1
wondershaper under Debian
Hi everybody! I know this discussion list isn´t just about wondershaper, but i think someone can help me. I used to have a linux box running red hat 8, as firewall on my lan. I upgraded to debian 3.0 and tried to use the same wondershaper files under debian, but, when i run wondershaper on ppp0 device, it just stops transfering. Remember: its the same files i used with success under red hat 8.
2006 Aug 15
1
serialisation
the case: i have two classes: 1) class Contract < ActiveRecord::Base serialize :addons end 2) class Addon < ActiveRecord::Base end Now i do the following in contract_controller: def create @contract = Contract.new(params[:contract]) @contract.user_id = session[:user_id] @contract.customer_id = params[:customer_id] @contract.pending = 1 @contract.addons = Array.new end def update
2006 Apr 24
2
Ror has problems with memory usage??
I saw this on a forum for MODx (a CMS which seem very good, built on standards, with clean XHTML/CSS, using PHP). "RoR is a killer application, but is either a crusher when it comes to memory usage or SQL usage. Even simple seeming things can kill a server if it''s not dedicated to the application. In addition, RoR is much more complex really than MODx if you''re not
2003 Nov 10
5
OT : For the SQL gurus..
SQL help needed.. If I have a MySQL table with dialing codes and a corresponding description (see below) and I want to lookup the best match for a phone number.. What would the SQL look like to do it? or would it take more than just SQL to get to the best result? Thanks.. Later.. Example numbers, (random end digits so I don't know who's they are.) 00442085673456 - UK London
2019 Feb 07
3
Paquete de R que use la sintaxis de SQL
Buenas a todos, Tengo que adaptar un proyecto que esta en lenguaje de SQL Server a RStudio. En el transcurso de este procedimiento tengo que realizar algunas consultas bastante complejas seleccionando campos de varias tablas y utilizar algunas clausulas como EXCEPT o UNION ALL. También debo actualizar varios campos de tablas usando la sentencia UPDATE y eliminar tablas bien con usando DROP TABLE o
2010 Jan 18
0
What's customer_id mean?
hi ,all I do'nt know exactly what customer_id mean? while if i have password i could visit the voicemail box. CREATE TABLE voicemail_users ( uniqueid int(11) NOT NULL auto_increment, customer_id int(11) NOT NULL default '0', context varchar(50) NOT NULL default '', mailbox int(5) NOT NULL default '0', password varchar(4) NOT NULL default '0', fullname