Viewing 15 posts - 6,796 through 6,810 (of 8,731 total)
You're welcome.
It might look simple, but I want to be sure that you understand how does it work. Do you have any questions?
February 27, 2014 at 3:09 pm
I created a file that includes exactly this:
"2/27/2014 13:30"
My test connection has Text qualifier: "
And it previes like this:
2/27/2014 13:30
I added the Derived Column with the following expression:
(DT_DBTIME)DateTest
And inserted into...
February 27, 2014 at 1:44 pm
What's the data type for the column on the connection?
February 27, 2014 at 11:58 am
Maybe some calculations like this?
DECLARE @Datedatetime = '2014-02-25' --Test with any date
SELECT @Date,
CASE WHEN DAY(@Date) > 26 THEN DATEADD( DD, 26 - DAY(@Date), DATEADD( DD, DATEDIFF( DD, 0, @Date), 0))
ELSE...
February 27, 2014 at 11:41 am
I'm giving you 2 solutions depending on the format you want.
WITH SampleData (PERSON, [DATE], [MINUTE]) AS
(
SELECT 1125,'27/01/2014',70
UNION ALL SELECT 1125,'27/01/2014',3
...
February 27, 2014 at 11:03 am
JohnFTamburo (2/27/2014)
This approach opens up systems to SQL injection attacks if the database is utilized by any interactive programming.
Can you explaing how is this vulnerable to SQL Injection? It...
February 27, 2014 at 10:49 am
A Table Valued Parameter could be a good option. If you have your @p_ItemID as several items separated by commas (or another delimiter) you could use a splitter as well....
February 27, 2014 at 10:47 am
Bulk insert is to insert values from a file.
You need to identify if the problem is the source or the destination. How long does it take the query to execute?...
February 27, 2014 at 10:40 am
Are you connecting to a 2008 server? I don't remember if it'll work with a 2005 server but with 2000 it won't.
February 27, 2014 at 9:15 am
MyDoggieJessie (2/27/2014)
You could create a simple scalar function and call that as needed (or take the code from this to use as well)
No, don't do that. Scalar functions are...
February 27, 2014 at 9:00 am
How would you calculate hours for Mr. Patrick Liw? You only have one row for him. You can't calculate the time, you could give an arbitrary value using LEFT JOIN...
February 27, 2014 at 8:42 am
Sean Lange (2/27/2014)
dwain.c (2/26/2014)
Sean Lange (2/26/2014)
I made a slight modification to Dwain's that worked well for my purposes.
Can't say I see that much of a resemblance but it is always...
February 27, 2014 at 8:32 am
Are you looking for something like this?
ORDER BY MAX(DateUsed) OVER(PARTITION BY ObjectName, UserName)
February 26, 2014 at 5:03 pm
I'm not sure if it will help but it makes me wonder. Why are you using SELECT...INTO instead of INSERT INTO? That might be part of the problem.
February 26, 2014 at 4:22 pm
You need to do an explicit CONVERT to use the string literal.
I changed your code a little bit to remove the +1
CREATE TABLE Test(
DayDate DATE,
DayNumber AS (DATEDIFF( DD, CONVERT( DATE,...
February 26, 2014 at 4:12 pm
Viewing 15 posts - 6,796 through 6,810 (of 8,731 total)