Viewing 15 posts - 481 through 495 (of 2,645 total)
CREATE TABLE testvisit (
primarydoc varchar(50),
client_id int,
visitdoc varchar(50),
doc_id int,
...
March 3, 2023 at 2:10 am
@jonathan-2 AC Roberts or anyone, do you know if there is a chance to ORDER BY in alphabetical order whatever is a column? Right now they are in a...
March 3, 2023 at 1:09 am
@jonathan-2 AC Roberts or anyone, do you know if there is a chance to ORDER BY in alphabetical order whatever is a column? Right now they are in a...
March 3, 2023 at 12:23 am
I believe it's acceptable to use either singular or plural names for database table names,
Acceptable, perhaps. But can you name any major RDBMS that uses singular...
March 2, 2023 at 8:28 pm
reduce the length to
The numbers should begin with 11. The minimum length of the number should be 10 The maximum length of the number should be 15 Need...
March 2, 2023 at 7:50 pm
I believe it's acceptable to use either singular or plural names for database table names,
Acceptable, perhaps. But can you name any major RDBMS that uses singular table names...
March 2, 2023 at 7:17 pm
DECLARE @RowsToGenerate as int = 10000000
SELECT DISTINCT TOP(@RowsToGenerate) x.Num
FROM (SELECT LEFT('11' + CONVERT(varchar,(CONVERT(bigint,ABS(CHECKSUM(NEWID()))))) + CONVERT(varchar,(CONVERT(bigint,ABS(CHECKSUM(NEWID()))))) ,10+T.RandNum) Num
...
March 2, 2023 at 7:03 pm
Hubert Blaine Wolfeschlegelsteinhausenbergerdorff Sr. won't even be getting his abbreviated name on your database.
March 2, 2023 at 5:30 pm
Definitely remove the word "Table" from the end of your table names. You'll also have Joe Celko coming in and giving you a hard time if you don't!
I believe it's...
March 2, 2023 at 4:44 pm
I don't understand why you would have indexes (apart from maybe a clustered one) on a table with only a few rows?
March 1, 2023 at 5:00 pm
I think the first index to try is indexing table4
You could give it a clustered primary key on (PP_key, AG_key)
or
CREATE NONCLUSTERED INDEX [IX_table4_1] ON [dbo].[table4] ([PP_key]) INCLUDE ([AG_Key])
February 27, 2023 at 12:46 am
That's a bit of a strange naming convention. You would normally call the column t3_Key not t1_Key.
February 27, 2023 at 12:34 am
If t1_key is a primary key to #table1 then when it joins to #table3 on t1_Key it can only return up to 6 rows from #table1 as #table3 only has...
February 26, 2023 at 8:23 pm
I thought I'd write a test to compare the performance of both methods:
Set up some test data using dbo.fnTally with about 25,000 rows of data:
February 24, 2023 at 12:28 am
I believe that it's a lot more efficient to use a windowed function here. Since we don't know whether the idPointsrv is monotonically increasing, I've coded it in a...
February 23, 2023 at 11:48 pm
Viewing 15 posts - 481 through 495 (of 2,645 total)