Viewing 15 posts - 8,506 through 8,520 (of 8,731 total)
Please, review the code I sent as there are some errors I didn't see, mainly because I can't test the code. I hope you get the idea of what it's...
August 30, 2012 at 12:52 pm
Matthew Cushing (8/30/2012)
Going to give it a try now, but I'm unsure what this does:ROW_NUMBER() OVER( ORDER BY position_id) + @new_position_id - 1
That's taking the new position_id and adding the...
August 30, 2012 at 12:42 pm
Something like this?
DECLARE @TableTable(
User_ID int,
Phone_Numbervarchar(20),
AddBy_UserIDint)
INSERT @Table
SELECT 1, '0194523638', 0 UNION ALL
SELECT 2, '1122334455', 1 UNION ALL
SELECT 3, '1122334456', 1 UNION ALL
SELECT 4, '1111111111', 2 UNION ALL
SELECT 5, '222222222 ',1...
August 30, 2012 at 11:16 am
That's correct.
It should perform much better, assuming the results are correct.
August 30, 2012 at 10:08 am
Yes, that's why I wanted to know what GetUpLdNextInstance is doing.
I just noticed that I erased the first one on my code by accident. I'm putting it back on now.
August 30, 2012 at 10:01 am
For SQL Server 2000 you should use syscomments table.
You might not need it, but it's a good thing to now.
August 30, 2012 at 9:20 am
I'm sure there's a way to avoid the SPs to obtain the Next IDs, but here's a possible suggestion.
I can't assure it will work, but it can give you an...
August 30, 2012 at 9:11 am
SELECT o.name
FROM sys.sql_modules m
JOIN sys.objects o ON m.object_id = o.object_id
WHERE definition like '%Employee%'
August 30, 2012 at 8:56 am
Something like this?
SELECT CONVERT( varchar(23), GETDATE(), 121)+'000'
If its datetime2 instead of datetime, you can use varchar(26) with no concatenation.
August 29, 2012 at 1:42 pm
You might be able to use something like this:
I'm not sure if it would work as I can't see the DDL, but it can give you an idea.
Update A
SET col1...
August 29, 2012 at 12:43 pm
Try to look for First Normal Form or Database normalization.
Here's a start:
http://www.sqlservercentral.com/blogs/jamesserra/2012/01/06/normalizing-your-database/
August 29, 2012 at 12:20 pm
Phil Parkin (8/29/2012)
Luis Cazares (8/29/2012)
Ideally you should only store the digits and format the phone in the front end. However, you'll need an extra field...
August 29, 2012 at 12:14 pm
How about this? It might be expensive, but it's a solution.
WITH names( fullname) AS(
SELECT 'shah, anki S.' UNION ALL
SELECT 'dogula nanacy' UNION ALL
SELECT 'baskin brian B' UNION ALL
SELECT...
August 29, 2012 at 11:57 am
It should be char or varchar.
Ideally you should only store the digits and format the phone in the front end. However, you'll need an extra field for extension if needed.
August 29, 2012 at 9:43 am
Viewing 15 posts - 8,506 through 8,520 (of 8,731 total)