Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Please help


Please help

Author
Message
gokturk413
gokturk413
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 5
enter------------------------------intvalue--------out----------------intvalue
2014-02-05 08:56:51.230 -- 1----2014-02-05 08:57:05.990--- 2
2014-02-05 08:56:49.320--- 1----   2014-02-05 08:57:03.490---   2
2014-02-05 08:56:45.097---   1----   2014-02-05 08:56:57.840---   2
2014-02-05 08:56:42.640---   1----   2014-02-05 08:56:55.727---   2
2014-02-05 08:56:42.640---   1----   2014-02-05 11:37:46.493---   2
2014-02-05 09:19:18.167---   1----   2014-02-05 08:56:55.727---   2
2014-02-05 09:19:18.167---   1----   2014-02-05 11:37:46.493---   2
2014-02-05 08:56:47.163---   1----   2014-02-05 08:57:00.737---   2

please help when intvalue value change between 1-2 new row inserted
and out time or enter time repeated with above time
i need when changed intvalue enter or out time must be null
here is my query

SELECT yuyi.[timestamp] enter,yuyi.[intvalue],yuyi.[carrierid],yuyi.[lastname],azx.[timestamp] out,azx.[intvalue],azx.[carrierid],azx.[lastname]
FROM [aeosdb].[dbo].[view_eventlog_online] as yuyi join dbo.view_eventlog_online as azx on
yuyi.carrierid=azx.carrierid where azx.eventtype=5 and yuyi.eventtype=5 and yuyi.intvalue=1 and azx.intvalue=2
and(azx.timestamp>=CAST( GETDATE()as date)) and (yuyi.timestamp>=CAST( GETDATE()as date)) order by azx.carrierid,yuyi.carrierid
Sean Lange
Sean Lange
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16539 Visits: 16992
gokturk413 (2/5/2014)
enter------------------------------intvalue--------out----------------intvalue
2014-02-05 08:56:51.230 -- 1----2014-02-05 08:57:05.990--- 2
2014-02-05 08:56:49.320--- 1----   2014-02-05 08:57:03.490---   2
2014-02-05 08:56:45.097---   1----   2014-02-05 08:56:57.840---   2
2014-02-05 08:56:42.640---   1----   2014-02-05 08:56:55.727---   2
2014-02-05 08:56:42.640---   1----   2014-02-05 11:37:46.493---   2
2014-02-05 09:19:18.167---   1----   2014-02-05 08:56:55.727---   2
2014-02-05 09:19:18.167---   1----   2014-02-05 11:37:46.493---   2
2014-02-05 08:56:47.163---   1----   2014-02-05 08:57:00.737---   2

please help when intvalue value change between 1-2 new row inserted
and out time or enter time repeated with above time
i need when changed intvalue enter or out time must be null
here is my query

SELECT yuyi.[timestamp] enter,yuyi.[intvalue],yuyi.[carrierid],yuyi.[lastname],azx.[timestamp] out,azx.[intvalue],azx.[carrierid],azx.[lastname]
FROM [aeosdb].[dbo].[view_eventlog_online] as yuyi join dbo.view_eventlog_online as azx on
yuyi.carrierid=azx.carrierid where azx.eventtype=5 and yuyi.eventtype=5 and yuyi.intvalue=1 and azx.intvalue=2
and(azx.timestamp>=CAST( GETDATE()as date)) and (yuyi.timestamp>=CAST( GETDATE()as date)) order by azx.carrierid,yuyi.carrierid


Hi and welcome to the forums. I would love to help but you seem to have forgotten to post any information that would let me help. Please take a few minutes and read the first article in my signature for best practices when posting questions.

_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search