Hi,
I want to sort Grid View on the basis of paticular column.
For example:
Now i want to sort above table in such a way that all Developers should come first.
Thanx
Hi all.
i m working sql server 2005.
My query is:
SELECT (
SELECT COUNT(1) FROM Seanslar WHERE MONTH(tarihi) = 4
GROUP BY refKlinik_id
ORDER BY refKlinik_id) as dorduncuay
And the error:
The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expressions, unless TOP or FOR XML is also specified.
How can i use order by in a sub query?
i have two tables with images that parts of them are transparent and i want
to ignore mouse interactions (especially clicking) on these parts and assign the
click to the image in the other table that below.
(i hope you understand because english is not my native language.)
thanks..
Hello,
In my table I have a field named eventdate in datetime format like 2010-05-11 00:00:00.
How do i make a query so that it adds one day to the eventdate eg if today is 2010-05-11, i want to show in where clause to return all records with tomorrow's date.
In SQL Server, is there any way to check whether the changes in the schema will impact Stored Procedures (and/or Views)?
For example a change of the column name in one table, may break some Stored Procedures; how to check the impacted stored procs?
Hi,
I have datatable with column name tag and 100 rows of data.I need to filter this table with tag starting with "UNKNOWN".
What should my sortexpression for datatable.select be ?
I'm trying the following.
Datarow[] abc = null;
abc = dtTagList.Select(string.format("tag='{0}'","UNKNOWN"))
How can I achieve tag startswith 'UNKNOWN' in the above code ?
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!
Hello,
Let's consider that I want to extend an existing JSF component, such as the <rich:datatable/>. My main requirement is to dynamically modify the content of a <f:facet>, to change its content.
What is the best way to achieve that? Or where is the best place in the code to achieve that?
In my faces-config.xml, I have the following declaration:
<faces-config>
...
<component>
<component-type>my.component.dataTable</component-type>
<component-class>my.project.component.table.MyHtmlDataTable</component-class>
</component>
...
<render-kit>
<render-kit-id>HTML_BASIC</render-kit-id>
<renderer>
<component-family>org.richfaces.DataTable</component-family>
<renderer-type>my.renderkit.dataTable</renderer-type>
<renderer-class>my.project.component.table.MyDataTableRenderer</renderer-class>
</renderer>
...
Also, my my-project.taglib.xml file (as I use Facelets) looks like:
<facelet-taglib>
<namespace>http://my.project/jsf</namespace>
<tag>
<tag-name>dataTable</tag-name>
<component>
<component-type>my.component.dataTable</component-type>
<renderer-type>my.renderkit.dataTable</renderer-type>
</component>
</tag>
So as you can see, I have two classes in my project for my custom datatable: MyHtmlDataTable and MyDataTableRenderer.
One of my idea is to modify the content of the <f:facet> directly in the doEncodeBegin() method of my renderer. This is working (in fact almost working), but I don't really think that's the better place to achieve my modification.
What do you think?
Technical information: JSF 1.2, Facelets, Richfaces 3.3.2, Java 1.6
Hi
this is my homework and the question is this:
List the average balance of customers by city and short zip code (the first five digits of thezip code). Only include customers residing in Washington State (‘WA’).
also the Customer table has 5 columns(Name,Family,CustZip,CustCity,CustAVGBal)
I wrote the query like below is this correct?
SELECT CustCity,LEFT(CustZip,5) AS NewCustZip,CustAVGBal
FROM Customer
WHERE CustCity = 'WA'
THANKS!!
Hey,
I know whats the difference between a NULL value and an empty string ("") value, but if I want to get a value by using the OR keyword, I get no result for a NULL value
The table i want to query looks like this:
titles_and_tags
+----+----------+------+
| id | title | tag |
+----+----------+------+
| 1 | title1 | NULL |
| 2 | title2 | tag1 |
| 3 | title3 | tag2 |
+----+----------+------+
The query i use looks like this:
select * from `titles_and_tags` WHERE `title` LIKE "title" AND `tag` = "tag1" OR `tag` IS NULL
So i want to get here a rows (id: 1,2), BUT this results 0 rows. What have i done wrong?
i have one table : nobel(yr, subject, winner)
and i have this query : In which years was the Physics prize awarded but no Chemistry prize.
this is what i tried :
select distinct
yr from nobel where subject='physics' and subject!='chemistry'
but is not working where i am going wrong.
see, i am not here to make my homework from someone. i am here to learn something. so, please give me suggetion.
I have a simple query over a table, which returns results like the following:
id id_type id_ref
2702 5 31
2702 16 14
2702 17 3
2702 40 1
2702 26 4
And I would like to merge the results into a single row, for instance:
id concatenation
2702 5,16,17,40,26:31,14,3,1,4
Is there any way to do this within a trigger?
NB: I know I can use a cursor, but I would really prefer not to unless there is no better way.
I'm generating an HTML report by C# to print pairs of files in a table which has 3 columns: the first two columns used for the filenames and the 3rd column is a hyperlink Compare - I want this link to run WinMerge to compare to two files and I currently don't know how to do it. Please help!
I have one table, which has three fields and data.
Name , Top , Total
cat , 1 , 10
dog , 2 , 7
cat , 3 , 20
horse , 4 , 4
cat , 5 , 10
dog , 6 , 9
I want to select the record which has highest value of Total for each Name, so my result should be like this:
Name , Top , Total
cat , 3 , 20
horse , 4 , 4
Dog , 6 , 9
I tried group by name order by total, but it give top most record of group by result. Can anyone guide me, please?
I want to transfer big files (1GB) over unreliable transport channels. When connection is interrupted, I don't want start file transfering from the begining. I can partially store it in a temp table and store last readed position, so when connection is reestablished I can request continue uploading of file from this position. Is there any best-practice for such kind of things. I'm currently use chunking channel.
Hello,
I have a table structure that looks like this:
ID String
-----------
1 A
1 Test
1 String
2 Dear
2 Person
I need the final output to look like this:
ID FullString
--------------------
1 A, Test, String
2 Dear, Person
I am really lost on how to approach this... I looked on a couple examples online but they seemed to be VERY complex... this seems like it should be a real easy problem to solve in sql.
Thank you for all assistance!
Hi all
I have a sql query in formula tag inside property tag.
In that query i am creating alias name but the hibernate appends table name and throwing me error.
select sum(e.salary) as sal from employee e
but hibernate changes to
select sum(e.salary) as employee.sal from employee e
how to avoid this ....
it should recognise as sal inside of employee.sal !!!
there!
I have this question, hope you guys can help me out.
So i have this table with two fields:
type and authorization
in type i have 2 different values: Raid and Hold
in authorization i have 2 different values: Accepted or Denied
I need to make a view that returns values like this:
TYPE:RAID ACCEPTED:5 DENIED:7
Basically i need to know how many of the values in TYPE are Raid, and then how many of
them are Accepted and Denied.
Thank you in advance!!
How to make an SQL query if there are 30 records in table and I want to pick rows from 12 to 20 where 12 and 20 are row numbers not Ids.
**Ids Code**
5 ABC
6 SDF
8 WSA
10 FSD
15 IOP
.
.
.
.
80 AWS
I have a table called cc_calls and there I have many call records I want to count them and group them in months I have a timestamp called starttime and I can use that row to extract the month, also limit the count for 12 months
the results should be like:
Month Count
January 768768
February 876786
March 987979
April 765765
May 898797
June 876876
July 786575
August 765765
September 689787
October 765879
November 897989
December 876876
Can anyone guide me or show me the mysql query that I need to get this result.
There's a table like this one
______________________
| id | title | order |
|----------------------|
| 1 | test1 | 1 |
|-----|--------|-------|
| 2 | test2 | 2 |
|-----|--------|-------|
| 3 | test3 | 3 |
|-----|--------|-------|
| 4 | test4 | 4 |
'----------------------'
when i introduce in my mysql shell a single update to a row
$sql UPDATE `table` SET order=1 WHERE id=3;
And then procedure or method resamples order column in the before update lower values to get its order renewed like this
______________________
| id | title | order |
|----------------------|
| 1 | test1 | 2 |
|-----|--------|-------|
| 2 | test2 | 3 |
|-----|--------|-------|
| 3 | test3 | 1 |
|-----|--------|-------|
| 4 | test4 | 4 |
'----------------------'
Any help would be appreciated, thanks!
I'm trying to figure out how to add records to an existing object for each iteration of a loop. I'm having a hard time discovering the difference between an object and an array.
I have this
@events = Event.find(1)
@loops = Choices.find(:all, :limit => 5) #so loop for 5 instances of choice model
for loop in @loops
@events = Event.find(:all,:conditions => ["event.id = ?", loop.event_id ])
end
I'm trying to add a new events to the existing @events object based on the id of whatever the loop variable is. But the ( = ) operator just creates a new instance of the @events object.
I tried ( += ) and ( << ) as operators but got the error
"You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occurred while evaluating nil"
I tried created an array
events = []
events << Event.find(1)
@loops = Choices.find(:all, :limit => 5) #so loop for 5 instances of choice model
for loop in @loops
events << Event.find(:all,:conditions => ["event.id = ?", loop.event_id ])
end
But I dont know how to call that arrays attributes within the view
With objects I was able do create a loop within the view and call all the attributes of that object as well...
<table>
<% for event in @events %>
<tr>
<td><%= link_to event.title, event %></td>
<td><%= event.start_date %></td>
<td><%= event.price %></td>
</tr>
<% end %>
</table>
How could i do this with an array set?
So the questions are
1) Whats the difference between arrays and objects?
2) Is there a way to add into the existing object for each iteration?
3) If I use an array, is there a way to call the attributes for each array record within the view?
I know this is simple question but taking more time
How to find first record from table in grails .
I need to get only the first record with out knowing the id number .
Is there any method like find :first in grails ?
thanks in advance .
Hi
How Can I Import Data From a Table in Sql Server CE To Excel?
I Try This From Excel But I Can Not Find an Item for This In Excel
Please Help Me To This
This should be a code igniter based class,
The table header should be
Price Percent_change Company Name Company Code Volume
Please help any one knows?
Many thanks!