Time Stamp / DISTINCT conflict.
In my following SQL query, I want to display records order by Date and Time. But it is conflicting with DISTINCT clause at the begining. When I remove TimeIssue from Order By, the query runs fine. I also want to know how to optimize the performance of this query.
SELECT Distinct TmainEntry.DateIssue, TmainEntry.IndemNo, TmainEntry.PermitNo, TVisitorComposition.A12I, TVisitorComposition.C12I, TVisitorComposition.C5I, TVisitorComposition.A12F, TVisitorComposition.C12F, TVisitorComposition.C5F, TMainEntry.TotalVisitors, TMainEntry.NumVCam, TMainEntry.BookingType, TFees.EntryFee, TFees.VehicleFee, TFees.GuideFee, TFees.CameraFee, TFees.TotalFee, TMainEntry.ServiceCode
FROM TMainEntry, TVisitorComposition, TEntryDates, RoundsInfo, TFees
WHERE TMainEntry.PermitNo=TVisitorComposition.PermitNo and TMainEntry.PermitNo=RoundsInfo.PermitNo and TMainEntry.PermitNo=TFees.PermitNo and TmainEntry.DateIssue between ' 01-sep-2006' and ' 30-nov-2006' and TMainEntry.PermitStatus<>'C'
ORDER BY TMainEntry.DateIssue, TMainEntry.TimeIssue;
With DISTINCT, each ORDER BY item must also apppear in the SELECT list.
What is displaying the error? It doesn't look like an Oracle error. These normally begin with something like "ORA-", for example,
SQL> SELECT DISTINCT 'x' FROM dual ORDER BY dummy;
SELECT DISTINCT 'x' FROM dual ORDER BY dummy
ERROR at line 1:
ORA-01791: not a SELECTed expression
Similar Messages
-
Skipped seconds in time stamp loop
Hi all,
I have a two 6024E cards which I am synchronizing via a RTSI cable. I
have an 860mHz Dell dimension with 512 MB of RAM. I am simply logging
analog signals from the cards to a text file on a 1s timebases. The
problem is that the output data file shows a time stamp is missed every
once and a while. I have tried adjusting the rate of sampling and
number of samples, but there always appears to be a hiccup in the
timestamping. I even tried hardware timing with a timed loop and one of
the on-board counters. The hiccups were even more frequent then. Maybe
the code needs to be more efficient, but I am stumped. I attached the
data logger vi. I appreciate any input.
Thanks,
dewey
Attachments:
acquire_ver5a.zip 1433 KBHello Dewey,
A couple recommendations for your program:
You are manually generating a timestamp for your signals using an
elaborate algorithm that I haven't really taken the time to
understand. I might be easier, more efficient, and more accurate
to just acquire your data as a Waveform data type from the DAQmx Read
Analog VI instead of acquiring data as an array of doubles. The
Waveform data type includes a built in timestamp that you could parse
out and log to file instead of calculating your own timestamp using the
Tick Count (ms) VI. Take a look at the LabVIEW Help and there is
a section under File I/O about Writing Waveform Data to a File Using
Storage VIs.
I would also highly recommend you remove any Wait or Wait for Next ms
Mutlitple VIs from your program. You are already configuring the
sampling rate of your continuous acquisition earlier in your program
using the DAQmx Timing (Sample Clock) VI. This is configuring the
DAQ tasks to use the hardware clock to use the onboard sample clock of
Dev1 for your acquisition. With the sample clock timing
configured, the NI-DAQmx driver will automatically take care of the
speed of execution of your while loop based on the rate you specify in
the DAQmx Timing VI. By manually including waits in your while
loop, you are conflicting with the timing parameters you set up in your
DAQ task. This could lead to buffer overflows, missed samples,
and otherwise non-deterministic sample timing. I would suggest
taking a look at the LabVIEW DAQmx shipping example Multi-Device
Synch-Analog Input-Continuous Acquisition.VI which can be found in the
NI Example Finder (Help >> Find Examples) in the following
category: Hardware Input and Output >> DAQmx >>
Synchronization >> Multi-Device.
I hope these suggestions help!
Regards,
Travis G.
Applications Engineering
National Instruments
www.ni.com/support -
Time stamp, progress play bar missing from player
For some reason, the time stamps and play bar are missing
from my videos when I view them online, though they are there when
I view locally.
Rather, I should say they work intermittently.
Link
to site
Any ideas?
Here's a copy of my .fla
Also, if there's a better way to view the videos, perhaps
some sort of preloader, I'm all ears!
I'm running Mac, Flash CS3.
thanks much!It's still very intermittent for me, and more importantly, my
client. I'm totally stumped. One page I've never gotten the
progress bar and time to show up.
This page never shows
the bar/time
Does anyone see anything in the code that looks like it would
be causing the conflict?
Any ideas would be greatly appreciated. -
Hi all,
i am working on a scenario...
it is file based..no mapping and bpm can be used.
I need to pick up file through xi and append it and put in the target with time stamp to it.
we can achieve this if mapping or bpm is allowed.....
But,in file processing we can use only one option at a time.....
I found a way:
scenario one: files will be appened and kept in a temparory folder
using another scenario we will pick up the appeneded file and add time stamp and keep in target structure...
but i dont think this is advisable...
please suggest me any other ways to achieve this...(can run operating system command be helpfull??)
thanks in advance..
Regards,
Kiran.HI,
Yes you are right, Appending and adding Time Stamp will not be possible simultaneously.
Refer - this could help you
Dynamic Filename with TimeStamp
Dynamic Filename with TimeStamp
/people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping
But some how you have to use mapping for it. Then if its allowed to use the mapping then as you have suggested, should have to go for two scenarios. No alternative,
Probably also you can try with Customized Adapter Module for this.
Thanks
swarup -
Changing time stamp format in the file receiver adapter file name
Hi all,
How can we change the standard date time stamp from
filename_yyyymmdd-hhmmss-mil
to
filename_yymmdd_hhmmss
i.e., I want "underscores" instead of "hyphens" and also I do not want the MilliSeconds.
I read in the forums that I have to use the combination of variable substitution and mapping functions to do this, but not sure how exactly.
Can the experts help me with this please?
Many thanks.Hello Ramesh,
You can make this possible using runtime filename creation using UDF.
Please go though the below steps.
Message mapping:
Create an UDF and include the piece of code that captures the Filename and Timestamp from source side via ASMA.
Modify them according to our requirement by adding the <Timestamp> at the end of <filename> with _.
Map the UDF to any of the top level node so that the modified filename will be available for the target communication channel
UDF Code is:
try {
String filename = "";
String timestamp = "";
DynamicConfiguration conf1 = (DynamicConfiguration) container
.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key1 = DynamicConfigurationKey.create( "http:/"+"/sap.com/xi/XI/System/File","FileName");
DynamicConfigurationKey key2 = DynamicConfigurationKey.create( "http:/"+"/sap.com/xi/XI/System/File","SourceFileTimestamp");
filename = conf1.get(key1);
timestamp = conf1.get(key2);
filename = filenametimestamp".xml";
filename = filename.replaceAll( "-" ,"_" );
conf1.put(key1,filename);
return filename;
catch(Exception e)
String exception = e.toString();
return exception;
Click on Advanced tab and check the Option u201CSetAdapterSpecificMessageAttributesu201D in addition to that check the attribute that are required to be captured during run time. In our case File Name and Source File Time Stamp are required to be checked
In the receiver communication channel Mention u2018 * u2018as File Name Scheme.
Click on Advanced tab and check the Option u201CSetAdapterSpecificMessageAttributesu201D in addition to that check the attribute u201CFile Nameu201D which will carry the modified value in the UDF .
i hope this will help you.
Monica -
VOICE MEMOS and Wrong Time Stamps in Itunes
I've noticed that my voice memos in the new iTunes 11.1.3 (8) have incorrect time stamps all over them now. This is a real problem for me, since I need the dates that the messages were recorded. I just tested this out by recording a new one today (2/11/14) on my new Iphone 5s. It showed up dated 8/13/12 2:13pm. My phone has the correct date on it, so what gives?
Any solutions out there?
Not to mention the fact that there are NUMEROUS DUPLICATES of previous memos that have become weird artifacts in my iTunes library each time I've backed up my materials. AND the new iTunes setup makes it incredibly hard to *actually remove data* from my system. I am concerned my private material is no longer private, but being archived elsewhere for meta-data purposes.
C'mon, Apple. You're really slipping.I see all timezones, have you tried setting the time/date manually? I'd do than, then pop an email to support.
Norwegian and a BB/PB user. Read what I mean, not what I spell. -
Jabber Voicemail Incorrect Time Stamp
I just noticed the the time stamp on my voicemails in Jabber v9.0.1 Build 12296 have the incorrect time stamp. They are all one hour behind. I confirmed that this does not happen in any of the following:
Jabber v9.0.5
CUPC v8.6
Jabber for Mac v8.6.1
Is this happening to anyone else?did you get this sorted out? Im having the same problem with Jabber v9.1.5, CUC 9.1.2 and cucm 9.1.2. Both cuc and cucm use the same NTP time source. Time looks fine on the handsets and from the cli..
-
Transfer time stamp from text file into MS Access thru Labview
Hello everyone,
I am Cruz; Long time listener, First time caller.
I am currently monotoring data being collected by an oven. The data is stored in a text file. I am using Labview to take the data from the textfile and place it in an MS access DB for manipulation. The first three columns of the text file are the time stamp of data. When i transfer the data into Access i cant get the first three columns to display as a time stamp. Can have some pointers on what how to get the first three columns to display correctly.
Additional info:
the text file is a 1D array that gets overitten with every new mesurement tanken. the transfer to Acces is to not loos any of the information and to better manipulate the data into forms and such.
Running Labview 2010
attached is code and text file.
Any help is greatly appreciated.
Attachments:
Oven test other.vi 16 KB
datalog032010003.txt 1 KBYour first mistake is reading the file as DBL. Your first three columns are obviously not numeric values. Did you ever look at the output array? Read it as strings. Second, you would need to combine those first three columns to create an actual time stamp before you write to the db. Unless of course you have one column for date, one column for time, and one column for AM/PM. I would not recomend that type of structure in the db.
-
Bug report: Time stamp misalignment in recent list
Bug report: With the new compact design, go to recent pivot, tap on a conversation, press back button to go back to recent, notice the time stamps to the right of the list have moved even more right, with text being cut off the screen.
Using Lumia 1020 with Cyan and 8.1.1 DP.I figured this would be the best place to post it so that an Apple representative might see it.
Actually it's not as likely to be seen here since there are so many posts for any Apple rep to have to scan. The best way to report an issue to Apple is through the feedback pages or, if you're a member of Apple's developer program, through the bug reporter.
Regards. -
Any ideas on which data element to be used for select-options for timestamp on the screen so that a user is able to f4 help too.
i am using data element 'tzntstmps' but i am not getting f4 help for it.Hello Trivenn
I do not think it makes sense to search for any other timestamp data element which might be part of a search help.
TZNTSTMPS = UTC Time Stamp in Short Form (YYYYMMDDhhmmss)
How could such a search help look like? A calendar control combined with some kind of "time control"?
You may facilitate the entry of time stamps in such a way that if the user enters only a date in the LOW field (e.g. 20080422 without time) you change it AT SELECTION-SCREEN (PBO of your selection screen to 20080422000000).
Correspondingly, you change a date value (e.g. 20080422) at the HIGH field into 20080422235959).
If, however, the user enters already a complete timestamp you do not change anything.
Regards
Uwe -
How do I add a time stamp to the moving "Major Grid Lines" of a Waveform Chart?
Hello
I am using LV 8.5.1
I am using a Waveform Chart and I have turned on the "Major Grid LInes" using the properties tab of my waveform chart. (properties-->scale->grid lines)
When the code executes, I want to attach a time stamp to each moving yellow grid line.
So as the grid lines move from right to left, there is an associated time stamp for each.
Can someone help!
thanks
J
Solved!
Go to Solution.
Attachments:
how do I add time to the yellow grid lines.vi 16 KBhova2010,
If you right click on your graph and go to X Scale >> Style >> and then choose one of the 3 styles on the far left you shoul see timestamps for those grid lines.
Ben Sisney
FlexRIO V&V Engineer
National Instruments -
How to get the most current file based on date and time stamp using SSIS?
Hello,
Let us assume that files get copied in a specific directory. We need to pick up a file and load data. Can you guys let me know how to get the most current file based on date and time stamp using SSIS?
Thanks
thx regards dinesh vvhi simon
i excuted this script it is giving error..
Microsoft SQL Server Integration Services Script Task
Write scripts using Microsoft Visual C# 2008.
The ScriptMain is the entry point class of the script.
using System;
using System.Data;
using Microsoft.SqlServer.Dts.Runtime;
using System.Windows.Forms;
namespace ST_9a6d985a04b249c2addd766b58fee890.csproj
[System.AddIn.AddIn("ScriptMain", Version = "1.0", Publisher = "", Description = "")]
public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
#region VSTA generated code
enum ScriptResults
Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
#endregion
The execution engine calls this method when the task executes.
To access the object model, use the Dts property. Connections, variables, events,
and logging features are available as members of the Dts property as shown in the following examples.
To reference a variable, call Dts.Variables["MyCaseSensitiveVariableName"].Value;
To post a log entry, call Dts.Log("This is my log text", 999, null);
To fire an event, call Dts.Events.FireInformation(99, "test", "hit the help message", "", 0, true);
To use the connections collection use something like the following:
ConnectionManager cm = Dts.Connections.Add("OLEDB");
cm.ConnectionString = "Data Source=localhost;Initial Catalog=AdventureWorks;Provider=SQLNCLI10;Integrated Security=SSPI;Auto Translate=False;";
Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.
To open Help, press F1.
public void Main()
string file = Dts.Variables["User::FolderName"].Value.ToString();
string[] files = System.IO.Directory.GetFiles(Dts.Variables["User::FolderName"].Value.ToString());
System.IO.FileInfo finf;
DateTime currentDate = new DateTime();
string lastFile = string.Empty;
foreach (string f in files)
finf = new System.IO.FileInfo(f);
if (finf.CreationTime >= currentDate)
currentDate = finf.CreationTime;
lastFile = f;
Dts.Variables["User::LastFile"].Value = lastFile;
Dts.TaskResult = (int)ScriptResults.Success;
thx regards dinesh vv -
How to print date & time stamp on photos?
How to print date & time stamp on photos?
Three methods:
File>process multiple files>labels. Be sure to uncheck "same as source", or the originals will be overwritten. It is best to work on duplicate files, esp. while learning.
Use the horizontal or vertical type tool to add the information manually to each picture file
If the same information is to be applied to several pictures, e.g. a copyright notice, use of a brush made in PSE is very efficient -
How to get system time format in time stamp
Hello All,
I have one problem regarding Time stamp. I want system time stamp format in Time control. If my system date/time format change then automatically my time stamp format should also change.If my system Time stamp format is hh:mm:ss AM/PM dd/mm/yy so in my LabVIEW time stamp format should also same. If System time stamp format hh:mm:ss AM/PM mm/dd/yyyy so in my LabVIEW time stamp format should also same.
So Please help me its a very important for my automation application.
Thank You.
Vinal Gandhi
Kudos are always Welcome.... :-)
Vinal Gandhi, CLD
Software EngineerHi Vinal,
have you tried the FormatDateTimeString function with a standard string indicator and the "%c" formatcode as described in the help instead of the generic timestamp indicator?
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome -
How do i find out the tables (data)effected in a schema after a particular time stamp
how do i find out the tables (data not structure)effected in a schema after a particular time stamp?
pls email in [email protected]You can't do that. That would be a real security risc.
/KAj
Maybe you are looking for
-
I am trying to stop programs from opening automatically when I turn my computer on. I tried system preferences>users and groups>login items...then I deleted them itunes and emial from the list but it did nothing. They continue to open up every time
-
ERROR when triyng to create a task to assing to an user
Hi everyone, I am triyng to instanciate a BPEL Process,i.e,create a task and assing it to an user. I am using this code: String xml = "<ns1:DocumentReviewProcessRequest xmlns:ns1=\"http://xmlns.oracle.com/bpel/Review\">" + // " <soap:Header/>\n" + //
-
I have read the topics and tried the tricks and still have black backgrounds on my photoshop graphics. After saving for web & devides as png8 with transparency I have a checkerboard pattern behind my graphic. I am using the magic wand tool, selecti
-
Need to deactivate structural auth. check for a custom Report
Hi all experts: I have a report that is based on PNPCE logical database and it displays work hours for a project, all non-sensitive information. We would like a wide range of users to have access to this but since this is based on PNPCE logical data
-
Hello all, I have Requirement like record the results for a inspection-lot .and for it i am using a BAPI : BAPI_INSOPER_RECODRESULTS but after successful execution of the program when i check the table QAMR. the inspection lot number is not updated t