Viewing 15 posts - 5,146 through 5,160 (of 7,619 total)
SELECT *, DATEADD(HOUR, HourPlanned, DATEADD(DAY, DATEDIFF(DAY, 0, lnDateDone), 0))
FROM (
SELECT lnDateDone = '2014-04-09 13:22:31.544', HourPlanned = 14
) AS test_data
Edit: Corrected calcs and added test data.
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
April 27, 2015 at 2:03 pm
I think (hopefully) all the conditions except a NULL (incoming) @Gender can be handled by:
(@Seeking IS NULL OR p.Gender = @Seeking) AND p.Seeking = @Gender
What "matches" do you want to...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
April 27, 2015 at 9:51 am
Don't add an id as a PK, just use MsgDate and MsgTime as the (nonunique) clustering keys. That's how you'll lookup and process this data anyway.
I can't imagine how...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
April 24, 2015 at 3:46 pm
I'd consider clustering by only customer_id, unless the selects themselves order by both customer_id and thing_id.
I'd also use a lower fillfactor for these indexes, maybe starting somewhere between 80% and...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
April 24, 2015 at 2:08 pm
Do you really search this table by NoteType without specifying a CreateDate range? Could you specify CreateDate range?
This table should be clustered on CreateDate, not on identity; this is...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
April 24, 2015 at 1:58 pm
CELKO (4/24/2015)
Of course there is, since you can cast the number to a string any time you want, although you'd never need to compute a check digit that's already...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
April 24, 2015 at 1:23 pm
You could also do searches for similar jobs and see what their job descriptions look like. After all, one of the greatest documents in history, the "Declaration of Independence",...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
April 24, 2015 at 8:13 am
CELKO (4/23/2015)
Getting back to check digits, the encoding has to be in a string because the weights are assigned by position. There is no concept of a position in an...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
April 23, 2015 at 4:36 pm
CELKO (4/23/2015)
I might need to search by only a single element, particularly the one for English-language. Or to find books by a specific publisher.
The ISBN is atomic; it...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
April 23, 2015 at 3:38 pm
I believe the code needs slight corrections to prevent a match on part of the code value rather than whole value, as demonstrated below:
CREATE TABLE #ids(id int, codes varchar(30))
CREATE TABLE...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
April 23, 2015 at 2:46 pm
CELKO (4/23/2015)
ISBN is displayed with dashes for human convenience, but it's actually composed of elements .. again, under the rules for 1NF, each of those should be stored...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
April 23, 2015 at 1:32 pm
Bill Talada (4/23/2015)
ScottPletcher (4/23/2015)
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
April 23, 2015 at 12:14 pm
Lynn Pettis (4/23/2015)
ScottPletcher (4/23/2015)
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
April 23, 2015 at 11:31 am
Stripping out delimiters should never eliminate information from the data. If you need to, you can set a tinyint code that reflects the meaning of the delimiters. I'm...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
April 23, 2015 at 11:00 am
If you remove the "AND jh.step_id =0" you can see the steps that have completed.
But "step 0" can't be posted until the whole job completes, since that is the job...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
April 23, 2015 at 10:42 am
Viewing 15 posts - 5,146 through 5,160 (of 7,619 total)