Query
What is the meaning of "Select Ac1_Code, Ac1_Name, ' ' as Publisher,0 as Ac1_Status from accounts1 order by ac1_name "
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted Mar 27, 2012, 2:23 AM EDT
Prasant JinagaRank #2,383 · 594 reputationPosted Mar 27, 2012, 2:27 AM EDT
It means fetching Ac1_Code , Ac1_Name , ' ' as Publisher (which is blank values with alias means column name as Publisher), 0 value with alias or column name Ac1_Status from accounts1 table then ordered by ac1_name
Hope it helps!!!
Thanks,
Prasant
SenthilkumarRank #387 · 6.5K reputationPosted Mar 27, 2012, 3:05 AM EDT
- You are trying to retrieve the result from the account1 table.
- You have columns like Ac1_Code, Ac1_Name from the table. You want to retrieve the columns
- You are trying to retrieve ''(single space empty) in the publisher column in result table.
- You are trying to create the Act1_Staus column and you want to make 0 is default result in that column.
- You are trying to order the result by ac1_name in the ascending order.
Now result will be,
Ac1_Code Ac1_Name Publisher Ac1_Status
00001 Ajay 0
00002 Babu 0
00003 Harish 0
00004 Ramesh 0
00005 Senthil 0
Hope this will help you to understand this query.a