15,898,134 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by ali from hyd (Top 12 by date)
ali from hyd
18-Jul-13 1:50am
View
nice thank u
ali from hyd
18-Jul-13 0:54am
View
i have to display the Ticket which is in Replied Status first
Open Status second
Reopen Status Third
Closed Status Fourth
ali from hyd
18-Jul-13 0:36am
View
for my ticketing functionality i am having status as 1-Open ,2-Reply , 3-Closed ,4-Reopen.
in grid i want to display the records it in the following order 2,1,4,3
ali from hyd
15-May-13 1:02am
View
i written the following procedure and i am getting only one type of time only ie., By selecting min time or max time.
i want to concatenate both min time and max time with comma seperated
use ecampus;
DELIMITER $$
DROP PROCEDURE IF EXISTS `GetTimeByDate` $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `GetTimeByDate`(in sdate date)
BEGIN
declare finish int default 0;
declare cdate date;
declare str varchar(10000) default "select RF_Code,";
declare curs cursor for select Date from ecampus.log where (month(Date)=month(sdate) AND YEAR(Date)=YEAR(sdate)) group by Date;
declare continue handler for not found set finish = 1;
open curs;
my_loop:loop
fetch curs into cdate;
if finish = 1 then
leave my_loop;
end if;
set str = concat(str, "min(case when Date = '",cdate,"' then Time else null end) as `",cdate,"`,");
end loop;
close curs;
set str = substr(str,1,char_length(str)-1);
set @str = concat(str," from ecampus.log
group by RF_Code");
prepare stmt from @str;
execute stmt;
deallocate prepare stmt;
END $$
DELIMITER ;
i am getting output as below:
RF_Code 2013-01-01 2013-01-02
104 09:00:00 09:02:00
105 09:30:00 null
required output is:
RF_Code 2013-01-01 2013-01-02
104 09:00:00,18:12:00 09:02:00,19:05:00
105 09:30:00,18:30:00 null,null
ali from hyd
15-May-13 0:47am
View
i written the following procedure and i am getting only one type of time only ie., By selecting min time or max time.
i want to concatenate both min time and max time with comma seperated
use ecampus;
DELIMITER $$
DROP PROCEDURE IF EXISTS `GetTimeByDate` $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `GetTimeByDate`(in sdate date)
BEGIN
declare finish int default 0;
declare cdate date;
declare str varchar(10000) default "select RF_Code,";
declare curs cursor for select Date from ecampus.log where (month(Date)=month(sdate) AND YEAR(Date)=YEAR(sdate)) group by Date;
declare continue handler for not found set finish = 1;
open curs;
my_loop:loop
fetch curs into cdate;
if finish = 1 then
leave my_loop;
end if;
set str = concat(str, "min(case when Date = '",cdate,"' then Time else null end) as `",cdate,"`,");
end loop;
close curs;
set str = substr(str,1,char_length(str)-1);
set @str = concat(str," from ecampus.log
group by RF_Code");
prepare stmt from @str;
execute stmt;
deallocate prepare stmt;
END $$
DELIMITER ;
i am getting output as below:
RF_Code 2013-01-01 2013-01-02
104 09:00:00 09:02:00
105 09:30:00 null
required output is:
RF_Code 2013-01-01 2013-01-02
104 09:00:00,18:12:00 09:02:00,19:05:00
105 09:30:00,18:30:00 null,null
ali from hyd
14-May-13 6:25am
View
in a db i am having a table contains Date column, for my application i want to display the date as column name ,,,
ali from hyd
14-May-13 6:11am
View
hi aarthi,
for my table i am having the data as below
RF_Code Date Time
104 2013-01-01 09:00:00
104 2013-01-01 18:12:00
104 2013-01-02 09:02:00
104 2013-01-02 19:05:00
105 2013-01-01 09:30:00
105 2013-01-01 18:30:00
for a particular month i need all the Intimes and Outtimes of my emplorees
i will give Date='2013-01-01' as input and i want to get output in the following way
01-01-2013 02-01-2013
RF_Code Min OutTime Min OutTime
104 09:00:00 18:12:00 09:02:00 19:05:00
105 09:30:00 18:30:00
ali from hyd
23-Apr-13 8:00am
View
hi,
i have three tables
tableName: Mst_NDT
level_id Typejoint_Id Root_visual Final_Visual
1 1 100 100
2 1 100 10
3 1 100 100
4 1 100 100
5 1 100 100
tableName:Mst_TypeJoint
TypeJoint_Id Type_Joint Type
1 Butt Weld 1
2 Nozzle Weld 1
3 Socket Weld 1
4 Seal Weld 1
tableName:Mst_LevelInspection
Level_Id Level_Inspection
1 Level - 02
2 Level - 05
3 Level - 03
4 Level - 1B
i want to split my output as
Level - 02 100 10 Butt Weld 100 20 Nozzle Weld
Level - 05 100 10 Butt Weld 100 20 Nozzle Weld
i written the following query
select L.Level_Inspection,N.Root_Visual,N.Final_Visual,T.Type_Joint
from Mst_NDT N,Mst_TypeJoint T,Mst_LevelInspection L
where T.TypeJoint_Id=N.TypeJoint_Id and L.Level_Id=N.Level_Id ;
ali from hyd
23-Apr-13 7:10am
View
tableName: Mst_NDT
level_id Typejoint_Id Root_visual Final_Visual
1 1 100 100
2 1 100 10
3 1 100 100
4 1 100 100
5 1 100 100
tableName:Mst_TypeJoint
TypeJoint_Id Type_Joint Type
1 Butt Weld 1
2 Nozzle Weld 1
3 Socket Weld 1
4 Seal Weld 1
5 Socket Weld 1
6 Hanger 2
tableName:Mst_LevelInspection
Level_Id Level_Inspection
1 Level - 02
2 Level - 05
3 Level - 03
4 Level - 1B
5 Level - 04
ali from hyd
23-Apr-13 6:44am
View
select L.Level_Inspection,N.Root_Visual,N.Final_Visual,T.Type_Joint
from Mst_NDT N,Mst_TypeJoint T,Mst_LevelInspection L
where T.TypeJoint_Id=N.TypeJoint_Id and L.Level_Id=N.Level_Id ;
ali from hyd
23-Apr-13 6:44am
View
i want to get display the result as below
Level_Inspection Root_Visual Final_Dpt Type_Joint Root_Visual Final_Dpt Type_Joint
Level - 02 100 10 Butt Weld 100 20 Nozzle Weld
Level - 05 100 10 Butt Weld 100 20 Nozzle Weld
ali from hyd
23-Apr-13 6:34am
View
select L.Level_Inspection,N.Root_Visual,N.Final_Visual,T.Type_Joint
from Mst_NDT N,Mst_TypeJoint T,Mst_LevelInspection L
where T.TypeJoint_Id=N.TypeJoint_Id and L.Level_Id=N.Level_Id ;
Show More