Hi
in mysql how to write a sql like this, to get the amount of X 20 and <20
select date, numberOfXMoreThan20,numberOfXLessThan20, otherValues
from table
group by (date, X20 and X<20)
thanks
When I run Book.scoped({:conditions => ['books.index LIKE ?','%query%']}) I get:
ActiveRecord::StatementInvalid: SQLite3::SQLException: near "index": syntax error: SELECT * FROM "books" WHERE (books.index like '%query%')
What am I doing wrong?
I've noticed when I pull up exchange management console, it shows mailboxes which have the "Recipient Type Details" as Legacy Mailboxes.
How do i go about querying which ones are legacy, user or linked mailboxes?
I've tried get-mailbox -identity | select deleteditemflags
but that doesn't seem to work.
thanks in advance
I'd like to use a selector to select the child img of the div I'm clicking on this example:
<div id="..."><img src="..."></div>
To get the div, I've got this selector:
$(this)
How do I get the img with a selector?
In Zend Framework how can I set the title properties of option elements within a select?
Desired output:
<option value="foo" title="bar">option</option>
Using LINQ I'm looking to break down the following path string[], however I'd like to break it up to the point of the Binn folder. Is there a WHERE UNTIL operator in LINQ?
c:\ Program Files\ Microsoft SQL
Server\ MSSQL10.SQLEXPRESS\ MSSQL\
Binn\ sqlservr.exe
What I'd like todo
var words = from word in thepath
where UNTIL thepath == "Binn"
select word;
Hii,
I have an 'Attach image button' in my web page, I don't want see the the file upload control in my page. On the click of the 'Attach image button' it will directly shows the browser's directory window and select the file from that and can directly uploads to the server. Does any body knows how it is possible
I have column with varchar values like "022008" that I need to convert into a datetime like "02/01/2008". This will run on millions of records for a conversion process. What is an efficient select statement for doing this?
I want to do something like:
select a.a_ft,count(b.a_ft) FROM row a JOIN row b on match a.a_ft against (b.b_ft). However, this isn't legal. Basically, I just want to look for similar phrases in my database. What is the easiest way to do this?
I did following:
create or replace type my_row as object
(
lname varchar2(30),
fname varchar2(30),
MI char(1),
hohSSN char (9),
hohname VARCHAR2(63),
hohDob char(10),
dob DATE
);
create or replace type eiv.my_rec as table of eiv.my_row;
but then doing query like:
my_records my_rec
select '', '', '', '', '', '', sysdate bulk collect into my_records from dual;
gives error ORA-00947: not enough values
what can i be doing wrong here?
just i print the two table data so i am using inner join
SELECT sd.GameName
FROM LottoryTickets AS sd
JOIN group AS p
ON sd.Group = p.groupname
WHERE p.groupname = 11
now i get #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group AS p ON sd.Group = p.groupname WHERE p.groupname = 11 LIMIT 0, 30' at line 3
this response please guide me
thanks for advance.
Is there an easy way to convert an XMLType to a User Defined Type? I can convert the UDT to XMLType using the below.
select SYS_XMLGEN(pUDT) into param2 from dual;
I can't though, is find a function that takes that and turns it back into that UDT using the same mappings the SYS_XMLGEN used.
I want to use linq to get datarow array from a datatable which its string type ColumnA is not null or depending on its length 0 , so I can get the row index with Indexof() method to deal with something else.
ColumnA ColumnB ColumnC
A0 B0 C0
Null B1 C1
A2 B2 C2
Null B3 C3
My Linq Statment:
DataRow[] rows = myDataTable.Select("ColumnA is not null").Where(row=>row.Field<string>("ColumnA").Length>0);
somebody who can help?
Hello,
I have a JList that shows multiple JPanels on them , i have created a custom renderer that returns a new JPanel.
The JPanels are displayed in the JList but they are not accessible, i cant select them and if i have a button or a text area in it i can not press it.
I want to try if this works in a JList because i want to do further pagination. I managed to get it work by adding panels to a Jscroll pane, but would love to make the JList thing work.
Thanks
Hi
http://msdn.microsoft.com/en-us/library/ms189797.aspx
In this link they are committing a transaction within catch clause IF (XACT_STATE()) = 1, I don't get it, if there is an error why they are committing it? even if the problem in select statement and there is no big deal committing it, why don't just roll it back.
Thanks
I have this query:
$theQuery = mysql_query("SELECT phrase, date from wordList WHERE group='nouns'");
while($getWords=mysql_fetch_array($theQuery)) {
echo "$getWords[phrase] created on $getWords[date]<br>";
}
The data table "wordList" contains 75,000 records in the group "nouns" and every time I load the code I am returned an error. Help!
I have a select box that calls window.open(url) when an item is selected. Firefox will open the page in a new tab by default. However, I would like the page to open in a new window, not a new tab.
How can I accomplish this?
even though I select debug, i get this: a valid provisioning profile for this executable was not found
.
i can't install it on my phone again. what should I do?
can any one please let me know, i need to set the "Total Price" value to be in two decimal point value like "56.35". Now its showing more fraction values like "56.3566666". I need it to be format it by musql "SELECT" query.
I have a sql statement I am using a simple sort such as the following
Select numbers
From theTable
Order By numbers
What I get in return is the following
1
11
12
14
2
21
22
23
3
35
37
etc...
I want it to be ordered in normal order
1
2
3
4
5
6
etc...
In Android, how can I apply a style to an API action?
I am using the RingtoneManager.RINGTON_PICKER action to let the user select an alarm, and would like to apply the standard theme that the other child-activities use.
Does anyone know how I can apply a theme? The code I'm using to open the RINGTONE_PICKER is
Intent intent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);
((Activity)mContext).startActivityForResult(intent, BackendConstant.RINGTONE_CODE);
Can any one tell me the LINQ 2 SQL version (in vb.net) of the below Left outer join query.I am trying to get all Employees with name "Shyju" and their address line 1 if it exist in the address table
SELECT E.EMPLOYEE_NAME,
E.AGE,A.ADRESS_LINE1
FROM EMPLOYEE_MASTER E
LEFT OUTER JOIN
ADDRESS_MASTER A
ON E.ID=A.EMPLOYEE_ID
WHERE E.EMPLOYEE_NAME='Shyju'
Thanks in advance
Is there some cool Moria like theme for Visual Studio 2010?
Mine is highlighting gray font with gray background!
I just can't configure it on Tools-Options-Environment-Fonts and Colors menu. Visual Studio doesn't seem to show an item for this "highlighting keyword/tag system". You select a variable on variable called myVar, and it highlights all with the same name but with a grayer color and gray background. I just can't read it and can't set it.
I'm trying to execute this on MS-SQL but returns me an error just at the Group by line
update #temp
Set Dos=Count(1)
From Temp_Table2010 s
where Id=s.Total and s.total in (Select Id from #temp)
group by s.Total
Do anyone knows how can I solve this problem having good performance.