473,387 Members | 1,791 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

table contains name column i want to display senthil at first remaining in order ?

1
I have a table , values are available in name column, i want to display senthil at first and remaining name in order andone can help me on this?
Nov 1 '10 #1
3 1881
debasisdas
8,127 Expert 4TB
kindly pass more information.
Nov 2 '10 #2
Pls try this

Expand|Select|Wrap|Line Numbers
  1. SELECT name, case name WHEN 'senthil' THEN 0 ELSE 1 END AS temp FROM  users ORDER BY temp,name
  2.  
Nov 8 '10 #3
amitpatel66
2,367 Expert 2GB
Try this:

Expand|Select|Wrap|Line Numbers
  1. SQL> ed
  2. Wrote file afiedt.buf
  3.  
  4.   1  with t as (select 'Senthil' col1 from dual
  5.   2  union select 'ABCD' from dual
  6.   3  union select 'John' from dual
  7.   4  union select 'Alex' from dual)
  8.   5  SELECT col1 FROM t
  9.   6* ORDER BY (CASE WHEN UPPER(col1) = 'SENTHIL' THEN 0 ELSE 1 END)
  10. SQL> /
  11.  
  12. COL1
  13. -------
  14. Senthil
  15. John
  16. ABCD
  17. Alex
  18.  
  19. SQL> 
  20.  
Nov 8 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: JJA | last post by:
I have fixed length records (167 bytes) in a .txt file and want to load this data exactly as is into a staging table where I hope to be able to later get at selected columns using the SUBSTRING...
1
by: Stephen Quinney | last post by:
I really cannot tell if this is a bug or I am just doing something stupid. I create a table called wibble: CREATE TABLE wibble (a integer, b integer); I insert some data: INSERT INTO...
3
by: Kathy | last post by:
Hi and thanks in advance for your help! I have Access 2000. I have imported a delinited text file and now have table with one column containing 100 records. I would like to display these values in...
1
by: aj | last post by:
DB2 LUW latest & greatest 8.2 FP11 Is there any way to dynamically reference the table and/or column name in a trigger body, perhaps w/ a special register or something? SP WRITE_AT() is...
3
by: prabhukumarasamy | last post by:
Now i m working in a existing project. I have to do some updations. In that project database table contain a table(usergroups) field name as 'Name'. When i am trying to insert a new record in...
5
by: balakrishnan.dinesh | last post by:
Hi frnds, Here is my secanrio. I have created a table , it seems to be, ~ Table's head part (table headings) will be static , and rest of part (rest of the rows) can be scrolled vertically...
5
by: Jim in Arizona | last post by:
I built a webpage using vb.net (.net 2.0) that creates a form letter. This letter pulls data from a database. Although I populate the address with the person's full name, which comes from the name...
3
by: adiel_g | last post by:
Hello everyone, I am trying to move a field name to a variable in vb.net. For example, first I retrieve the record from the database and save its value: .... userGroup =...
3
by: robjh | last post by:
Hi there! :) I am doing a school project in Microsoft Access, but I am having trouble setting up one of my queries.... The two relevant tables are "Products" and "Purchases" Products...
1
by: harish81 | last post by:
Hi, Please help me to get images in table format. I'm new to PHP. I have written code to display images in a table format and it displays only 9 images in a single page. when i click Next Url to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.