Viewing 15 posts - 3,496 through 3,510 (of 4,085 total)
Peter Brinkhaus (11/11/2011)
drew.allen (11/11/2011)
Peter Brinkhaus (11/11/2011)
No need for a string splitter. Also Cadavre's solution can be simply modified to leave out the false positives:
Your solution is not SARGable. If...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
November 11, 2011 at 12:49 pm
Peter Brinkhaus (11/11/2011)
No need for a string splitter. Also Cadavre's solution can be simply modified to leave out the false positives:
Your solution is not SARGable. If you care at...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
November 11, 2011 at 10:49 am
Adi Cohn-120898 (11/11/2011)
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
November 11, 2011 at 10:38 am
Cadavre (11/11/2011)
Try this: -
SELECT DATEADD(DAY, DATEDIFF(DAY, 5, @calenderDate) /7 * 7, 5)
This doesn't work for dates falling on Saturday, it will give you the current Saturday rather than the previous...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
November 11, 2011 at 10:00 am
shalini72011 (11/10/2011)
I have a requirement to check why the Trd_Linked column is getting 'N' for legal 206337
UPDATE #Rpt SET Trd_Linked = 'N' --setting default value...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
November 10, 2011 at 12:18 pm
Dan Williams-449672 (11/10/2011)
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
November 10, 2011 at 9:29 am
BrainDonor (11/9/2011)
INSERT INTO TestResult(Total)
SELECT CONVERT(VarChar,Count(*) + 1)
FROM dbo.TestData
WHERE 1=1
+ ' of ' +
(SELECT CONVERT(VarChar,Count(*) + 1)
FROM dbo.TestData
WHERE 1=1);
The posted code is missing a paren.
It's looking for records where
WHERE 1...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
November 10, 2011 at 9:20 am
You can also use nvarchar(max) which replaces ntext.
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
November 10, 2011 at 7:44 am
It's best NOT to use BETWEEN when using datetime ranges. You should use the following instead
WHERE YourDate >= StartDate
AND YourDate < EndDate
This will prevent you from double counting any...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
November 9, 2011 at 3:09 pm
I assumed that Table A was a staging table of some kind and that the OP was trying to move data to Tables B and C.
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
November 9, 2011 at 11:45 am
The other option is to use the OUTPUT clause to return ALL of the new IDs rather than just the LAST new ID that you would get with scope identity.
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
November 9, 2011 at 11:32 am
There are problems with your data model that make this problem more difficult. Specifically, it allows conflicting values. For example,
SELECT '7','Nov 16 2011 12:00AM','Nov 16 2011 11:59PM','Available' UNION...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
November 9, 2011 at 7:21 am
Welsh Corgi (11/8/2011)
I probably won't be able to use this for the SSIS Excel Worksheet as Dynamic Headers followed by the Output from a CTE.
If SSRS is a possibility, it...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
November 8, 2011 at 9:29 am
Dan Williams-449672 (11/8/2011)
any ideas or am i heading down the wrong road?
You're definitely headed down the wrong road, but without easily consumable sample data and expected results, you're unlikely to...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
November 8, 2011 at 9:08 am
You're probably running into problems, because the standard way to do beginning of time period calculations is to use date 0 ('1900-01-01') as the foundation of the calculations. This...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
November 8, 2011 at 8:26 am
Viewing 15 posts - 3,496 through 3,510 (of 4,085 total)