Viewing 15 posts - 1,306 through 1,320 (of 5,588 total)
How's this? (comments in the code)
;
WITH cte AS
(
-- get the columns we actually need
-- add a row number that restarts whenever the ind_id changes
-- order the row number by the...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
May 24, 2011 at 7:32 pm
The CROSS JOIN is what you're looking for. Here's an example:
-- For information on how a tally table works, please see the article
-- 'The "Numbers" or "Tally" Table -...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
May 24, 2011 at 12:38 pm
And assuming that the order number won't always start at the same position, this will handle extracting it.
;WITH cte AS
(
-- get the position of the first numeric character
SELECT OrderNumLine, pos...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
May 24, 2011 at 12:10 pm
What's up with all the old threads being resurrected lately? I've seen several this week already... 🙁
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
May 24, 2011 at 8:46 am
So, do we need to recalculate the IsCorrect column with all of the rules that you provided, or just use it's current right/wrong value to update? If the latter, the...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
May 24, 2011 at 7:49 am
From PM from the OP:
In the Direction column for IN its '1' for OUT its '0'.
Yes, I want to update the current IsCorrect column with 1(right) and 0(wrong)
Below is the...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
May 24, 2011 at 7:36 am
jcrawf02 (5/24/2011)
...Brain exploding.....can't ..think...anymore...!!!!!Gah!
*Achoo!!!
There, all better.
Thanks Paul!
I think when Paul starts teaching, that most of us get that way. Maybe we need to start bugging him for more articles???...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
May 24, 2011 at 7:30 am
I went iPad.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
May 23, 2011 at 8:33 pm
Thanks for the feedback.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
May 23, 2011 at 3:29 pm
Check out this article: Loading XML Data into SQL Server (SQL Spackle)[/url]
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
May 23, 2011 at 3:27 pm
Would you mind sharing with us so that we (and anyone that stumbles across this in the future) know what actually worked for you?
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
May 23, 2011 at 2:25 pm
If I understand this right, here's two methods for accomplishing this:
1:
SELECT PKeyItem,
ItemName,
IsUserItem = CASE WHEN EXISTS...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
May 23, 2011 at 2:24 pm
So that someone in the future that stumbles across this thread knows, can you post your procedure here so that it can be referenced?
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
May 23, 2011 at 2:14 pm
Grant Fritchey (5/23/2011)
jarid.lawson (5/23/2011)
Excellent. I just IM'ed my wife to add it to the list / budget. I'll give it a go soon.
I can help you with the wife, it's...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
May 23, 2011 at 1:30 pm
Why doesn't the GUI work? Is it generating an error?
The T-SQL code to run is:
ALTER TABLE <YourTable> ALTER COLUMN <YourColumn> DATETIME <NULL?>
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
May 23, 2011 at 1:27 pm
Viewing 15 posts - 1,306 through 1,320 (of 5,588 total)