I have a view with a datetime field and I need to eliminate rows that occur within 2 seconds of the first. So for example:
ID AcctID EntryTime
1 1 1/2/2010 10:00:00.000
2 1 1/2/2010 10:30:00.000
3 1 1/2/2010 10:30:00.500 *
4 1 1/2/2010 10:30:01.200 *...
George, thank you for the quick response. I bet that is exactly what happened, now I know where to look.
Yes, we do store our dates as DateTime, but this is a special case where we are dealing with a feed that has dates entered as text.
I use the Convert function as follows (a little example):
SELECT CONVERT(datetime,MyDateField,101)
This has always worked. Now if I wanted the British format, I'd put a 103 in the end. That also worked in the past.
BUT the weird thing now is that the CONVERT function is expecting MyDateField...
I need to copy several million rows of data from a linked server into a database table. I am a little hesitant to just
INSERT INTO xxx (...)
SELECT (...)
FROM
Is this the best way? Are the Export/Import tools more efficient than the above simple query? What about Bulk Insert? I have never used...
I am trying to find the most efficient way to pivot the first two values for every "group by" in a recordset. For example, here is my table:
Account Form Date Score
1 A 1/8/07 89%
1 B 2/7/07 95%
1 A 8/3/07 72%
1 A 12/1/07 87%
2...
The only problem with the +'e0' is if the column does happen to contain scientific notation. The ISNUMERIC by itself would work great on a value of '1e3', but if you turned it into '1e3e0' then you've just invalidated your once-numeric value. I guess you just need to know your data. In my...
gmmastros, Wow that's great! Who would have thought to make in scientific notation first, nice idea. Thanks!
SQLDenis, I was originally thinking along the same lines, but the NOT LIKE '%[a-z]%' does not catch the case of a single dash "-". This value still cannot be converted to real (but can...
I have an nvarchar column that is sometimes used to hold numeric data and I wish to pull that data out as real and changing text values to zero. So I wrote a query something like the following:
SELECT CASE WHEN ISNUMERIC(TextField)=1 THEN CAST(TextField AS real) ELSE 0 END
FROM MyTableI am...
I have a very large table that is basically structured like this:Category Score Type
1 90 0
2 3 0
2 87 1
3 65 0Notice that the Category 2 has two records (of type 0 and 1). What I need to do is select a recordset that excludes all 0-type...
I am a software developer, and I have been given the additional task (opportunity?) of being in charge of scheduling/prioritizing projects for my team. I am temporarily using an Outlook calendar to track everyone's projects and timelines, and am looking for a more permanent solution.
I haven't...
Hello, I am new to ASP.NET and I am using a TemplateColumn in a datagrid as follows, but the width property seems to do nothing (really a pain when the image is large):<asp:TemplateColumn HeaderText="My Image">
<ItemTemplate>
<asp:HyperLink ImageUrl='<%#...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.