Viewing 15 posts - 6,856 through 6,870 (of 8,731 total)
You shouldn't store lists for delimited values in a single line for a single value. It violates the first normal form.
If you really need this (I suggest to use it...
February 20, 2014 at 8:15 am
I would let the database do the work for me. Just to be clear, a single constraint that involves all 3 columns should be fine instead of 3 unique constraints.
February 19, 2014 at 5:41 pm
There's not enough information on what's happening. The problem is too generic and can't be solved.
For performance problems, check the following article:http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
February 19, 2014 at 4:25 pm
Jim P. (2/19/2014)
phonetictalk (2/19/2014)
February 19, 2014 at 4:06 pm
I'm not sure that your expected results are correct because you say that if you pass "Cooking Candy" as a parameter, you should get "Cooking Waffles". If that's incorrect, this...
February 19, 2014 at 3:53 pm
sql2k8 (2/19/2014)
February 19, 2014 at 3:44 pm
sql2k8 (2/19/2014)
February 19, 2014 at 3:12 pm
It seems correct to me. What's the problem? Can you post sample data (check my signature to know how to do it properly)?
February 19, 2014 at 2:09 pm
tschuler-738392 (2/19/2014)
The string in those fields can start with any Letter not always C or P
None of the solutions given depend on the field starting with C or P. However,...
February 19, 2014 at 12:34 pm
That's why I included a link to BOL. You should check it to know exactly what's happening. Be sure to ask any questions you have after reading it.
Here's an example...
February 19, 2014 at 12:31 pm
You could do it easily with the STUFF function.
Would you need help on how to do it?
February 19, 2014 at 12:28 pm
To get last 7 days of data, you could use some datetime formulas like this:
WHERE DateColumn >= DATEADD( DAY, DATEDIFF(DAY, 0, GETDATE()) - 7, 0)
AND DateColumn < GETDATE()
February 19, 2014 at 12:22 pm
Maybe something like this if you just want to eliminate duplicates while displaying the information:
WITH CTE AS(
SELECT *,
ROW_NUMBER() OVER(PARTITION BY LEFT( Name, CHARINDEX( '.', Name + '.') - 1)...
February 19, 2014 at 11:50 am
It's good to know that it worked for you. Do you understand why does it work and how? Do you have any questions you would like to ask?
For future posts,...
February 19, 2014 at 10:12 am
hunchback (2/19/2014)
Columns in the SELECT clause that are not part of the GROUP BY should participate in an aggregation function.ph.CalculatedTotalTime,
ph.MachGrpCode,
ph.EmpId,
pd.PartCode
Can you post the exact error msg you are getting?
He posted...
February 19, 2014 at 9:33 am
Viewing 15 posts - 6,856 through 6,870 (of 8,731 total)