Here is my query
Select Gender from Table
The result pane shows
1
1
1
2
2
But i want the results to be
Male
Male
Male
Female
Female
The names Male and Female wont be present in my database.... I want to just hardcode the names based on values from the select statement....
...
Can i apply SUM() within an ISNULL().... Consider my following sql server select statement
SELECT e.Emp_Id,e.Identity_No,e.Emp_Name,case WHEN e.SalaryBasis=1
THEN 'Weekly' ELSE 'Monthly' end as SalaryBasis,e.FixedSalary,
ISNULL(Adv.Daily_Wage,0) as Advance from Employee as e
inner join Designation as d on e.Desig_Id=d.Desig_Id...
Hi.
I've got 2 select statements, returning data like this:
Select 1
col_a col_b
Select 2
col_a col_c
If I do union, I get something like
col_a col_b
And rows joined. What i need is getting it like this:
col_a col_b col_c
Joined on data in col_a.
...
I have two tables, TableA and TableB.
I need to select one count value from TableA, based on a where condition.
I need to select two values from TableB.
I'd like all the values in one result set. There will never be more than one row in the result set.
Here's what I have now:
SELECT count(id) FROM TableA WHERE ($some_where_statement)...
Hi,
I have a question about collapse panel..
I have a placeholder and I add more than one headerpanel, contentpanel, collapsiblepanel dynamically.. Here is my code :
CollapsiblePanelExtender cpe = new CollapsiblePanelExtender();
Panel pnlheader,pnlcontent;
Label lblcontent,lblheader; Button btn;
for (int i = 0; i < 10;...
I have Concatenated in mySQL to produce a field that I can search with. This contains animal as well as owner names and addresses for a client database. I need to be able to search by animal name, owner names and postcode in any order.
Thus if if my name is john smith and i own a dog called Fido and live in postcode AB1 2CD, I want the s...
hello
I'm developing a system in which I need to select, from a long list os customers, some to which an specific (batch) action will be executed. For example, I want to select "John", "Peter" and "Steve" and click the "delete" button. No more than 5 customers will be selected.
The problem is that, since there're more than 500 customer...
select() is a great system call. You can pack any number of file descriptors, socket descriptors, pipes, etc. and get notified in a synchronous fashion when input becomes available.
Is there a way to create an interval/oneshot timer and use it with select()? That would save me from having multiple threads for IO and timing.
...
SELECT column FROM table WHERE column is largest?
...
I've a select menu hardcoded in a wordpress (php) theme, but the manager requires to edit those frequently. Is it possible to populate the select dropdown options from a text file import? So he just has to edit the text file and the menu options would change.
The current menu looks like this:
<select name="location" id="sort-location" ...
In a .Net web application I use the public DataRow[] Select(string filterExpression) method in many places. Due to a last minute change characters such as ' and " are now valid input. What options do I have, is there a way to change the filterExpression in an adequate way and still preserve the Select functionality on the datatable, can...
I have a hibernate entity called Execution. It is created in the beginning of my process and updated at end, indicating how it has finished.
I would like to update a single property of this entity, without causing a select in my database.
Execution execution = entityManager.getReference(Execution.class, executionId);
execution.setSta...
I have a project whereby I'm reading huge volumes of data from an Oracle database from Java.
I have the feeling that the application we are writing is going to process the data far faster than it will be given to us using a single threaded SELECT query and so I've been trying to research faster ways of obtaining the data.
Does anyone h...
Thanks in advance guys.
Been searching quite a bit for this and I'm either searching badly, or there isn't much out there to explain it.
In SQL server you can insert into a table using a select statement.
INSERT INTO table(col,col2,col3)
SELECT col,col2,col3 FROM other_table (in this case is a temp table) WHERE sql = 'cool'
Would be...
I'm building a mobile website. I use regular html for the dropdown like below. If I select the dropdown on Android and click on "Category", it tries to submit the form. But iPhone doesn't do anything which is the desired behavior I want. I found a similar post here, but I'm not building an app. Some websites use links instead of dropdown...
Hello all,
How would I go about doing the following?
Given the tables, Recipe, RecipeItem, RecipeInstruction. How do I perform a SELECT only if the SELECT statement of Recipe returned results.
If Recipe exists, return RecipeItems and return RecipeInstructions.
...
I'm trying to speed up my SELECT queries in my web application. I have done some pretty major optimizations, like ordering the rows returned by PHP rather than MySQL itself. Now I'm just wondering, is it faster to use the SELECT statement on columns that are a primary key?
Example, I have a table set up with the columns settingKey and s...
Hello,
I have the following class-mapping that contains multiple collections mapped as :
Code:
<class entity-name="tab_a" table="tab_a" lazy="true"
schema="dbo" dynamic-update="false" dynamic-insert="false"
select-before-update="false">
<id name="tabid" type="string" column="`TABID`">
<generator class="nativ...
I have the most simple SQL
SELECT * FROM words
It has 13000 words (varchar). I need to get the longest word first in my output. I guess it might be possible with the WHERE command?
Alternative
If it doesn't work like that, is there a smart way to sort my output array so it will order it by the longest word first (in the 'word'-colum...
My code so far is this. The last line gives me a compile error: "expected end of statement".
Dim strSql As String
Dim groupId As String
strSql = "Select ID from RevenueGroup where description = '" & ListO.Value & "'"
groupId = CurrentProject.Connection.Execute strSql
...