newid Questions
5
I am getting below error when I run sql query while copying data from one table to another,
Msg 8170, Level 16, State 2, Line 2
Insufficient result space to convert
uniqueidentifier value to c...
Variant asked 12/4, 2011 at 0:10
5
Solved
I know that If I run this query
select top 100 * from mytable order by newid()
it will get 100 random records from my table.
However, I'm a bit confused as to how it works, since I don't see ne...
Acklin asked 12/2, 2011 at 18:27
3
Does the NEWID() function never give me the same ID as it already did? Let's say I select a NEWID() and it returns '1' (just as an example). Will it never return '1' again? Is it impossible?
Runagate asked 28/7, 2013 at 13:37
1
Solved
In a table I have created a new column that's going to hold a randomized alphanumeric string. I've been using the NEWID() function. From my understanding, NEWID should just create a new guid per ro...
Sandhurst asked 21/12, 2016 at 19:46
2
Solved
I am getting odd results when using NEWID() in combination with a persistent computed column. Am I using some function wrong?
Not using persisted when creating the column, and therefore calculatin...
Exurb asked 30/6, 2016 at 10:38
3
Solved
I am trying to create a new data extract from a (badly designed) sql database. The customer requires that I add a distinctidentifier which I am attempting to do using the NEWID() function. Unfortun...
President asked 27/8, 2015 at 15:13
1
Solved
I'm in the middle of doing a bit of research, and I've come across an anomaly that I can't explain (and I've not been able to find anything on Google). Consider the following SQL:
CREATE TABLE MyG...
Incase asked 7/1, 2014 at 14:23
1
Solved
I have a table with about 10 million rows and 4 columns, no primary key. Data in Column 2 3 4 (x2 x3 and x4) are grouped by 50 groups identified in column1 X1.
To get a random sample of 5% from ta...
4
Solved
I have to insert a fake column at the result of a query, which is the return value of a table-value function. This column data type must be unique-identifier. The best way (I think...) is to use ne...
Borodino asked 21/4, 2009 at 13:11
1
Solved
The OUTPUT clause is compatible with SQL Server 2005 but not SQL Server 2000.
How do I convert this command to work in SQL Server 2000?
CREATE TABLE sample
(
ID uniqueidentifier NOT NULL DEFAULT...
Reductive asked 2/5, 2011 at 22:29
1
© 2022 - 2024 — McMap. All rights reserved.