Viewing 15 posts - 16 through 30 (of 188 total)
sp_help 'Tablename' should do the work.
Ronald HensbergenHelp us, help yourself... Post data so we can read and use it: http://www.sqlservercentral.com/articles/Best+Practices/61537/-------------------------------------------------------------------------2+2=5 for significant large values of 2
September 15, 2011 at 5:37 am
Is there just one column DATA? Or do you mean 3 columns (or more) which may contain NULL values?
Ronald HensbergenHelp us, help yourself... Post data so we can read and use it: http://www.sqlservercentral.com/articles/Best+Practices/61537/-------------------------------------------------------------------------2+2=5 for significant large values of 2
September 15, 2011 at 5:33 am
I don't have experience with that many tables, and I think it should just be tested in your environment. Also, the number of tables is limited by the server capacity,...
Ronald HensbergenHelp us, help yourself... Post data so we can read and use it: http://www.sqlservercentral.com/articles/Best+Practices/61537/-------------------------------------------------------------------------2+2=5 for significant large values of 2
September 14, 2011 at 11:17 pm
I would make the column NOT NULL and would try to improve your input. Of course you could do this also with a trigger or something, but I avoid myself...
Ronald HensbergenHelp us, help yourself... Post data so we can read and use it: http://www.sqlservercentral.com/articles/Best+Practices/61537/-------------------------------------------------------------------------2+2=5 for significant large values of 2
September 14, 2011 at 3:19 am
I've seen the same issue when on using sql scripts on different machines. Tab settings often differ locally and that's why I would rather use spaces instead of tabs. I...
Ronald HensbergenHelp us, help yourself... Post data so we can read and use it: http://www.sqlservercentral.com/articles/Best+Practices/61537/-------------------------------------------------------------------------2+2=5 for significant large values of 2
September 13, 2011 at 2:34 am
Both of these works, just figure out for yourself if the value fits better as an integer or a float/decimal.
declare @Datetime1 as datetime = getdate(),
@Datetime2 as datetime = dateadd(mi,-20,getdate())
select...
Ronald HensbergenHelp us, help yourself... Post data so we can read and use it: http://www.sqlservercentral.com/articles/Best+Practices/61537/-------------------------------------------------------------------------2+2=5 for significant large values of 2
September 9, 2011 at 4:37 am
tom.weber (9/9/2011)
table 1 named team with columns teamID, name (and some other fields)
table 2 named game with columns gameID, homeTeamID, awayTeamID, date (and some other fields)
I...
Ronald HensbergenHelp us, help yourself... Post data so we can read and use it: http://www.sqlservercentral.com/articles/Best+Practices/61537/-------------------------------------------------------------------------2+2=5 for significant large values of 2
September 9, 2011 at 3:07 am
It's often a good thing if you put your tembdb on a dedicated disk, for such reasons and general performance. Though, I don't know what you expect to what size...
Ronald HensbergenHelp us, help yourself... Post data so we can read and use it: http://www.sqlservercentral.com/articles/Best+Practices/61537/-------------------------------------------------------------------------2+2=5 for significant large values of 2
September 7, 2011 at 8:19 am
Do you get an error when you type
SELECT * FROM fn_name (1,'20110101')?
Ronald HensbergenHelp us, help yourself... Post data so we can read and use it: http://www.sqlservercentral.com/articles/Best+Practices/61537/-------------------------------------------------------------------------2+2=5 for significant large values of 2
September 7, 2011 at 8:17 am
Hmm, the table doesn't have an unique id and or primary key? Or else just right click on the table, select top 1000 rows, delete the top 1000, copy all...
Ronald HensbergenHelp us, help yourself... Post data so we can read and use it: http://www.sqlservercentral.com/articles/Best+Practices/61537/-------------------------------------------------------------------------2+2=5 for significant large values of 2
September 7, 2011 at 8:11 am
Love uh? That's a bit more appreciation than I expected 😉
Ronald HensbergenHelp us, help yourself... Post data so we can read and use it: http://www.sqlservercentral.com/articles/Best+Practices/61537/-------------------------------------------------------------------------2+2=5 for significant large values of 2
May 12, 2011 at 4:05 am
My solution would probably go along these lines:
SELECT TOP 2
*
FROM
(
SELECT TOP 4
ID, name
FROM #A
ORDER BY ID ASC
) A
ORDER BY ID DESC
Ronald HensbergenHelp us, help yourself... Post data so we can read and use it: http://www.sqlservercentral.com/articles/Best+Practices/61537/-------------------------------------------------------------------------2+2=5 for significant large values of 2
May 12, 2011 at 1:27 am
I once had a colleague used Excel who only knew how to use basic arithmetic functions (add, substract, etc) and passed by about any function Excel has and he still...
Ronald HensbergenHelp us, help yourself... Post data so we can read and use it: http://www.sqlservercentral.com/articles/Best+Practices/61537/-------------------------------------------------------------------------2+2=5 for significant large values of 2
May 4, 2011 at 6:44 am
Not sure who you replied to, but it seems like the problem issued here is purely an own constructed identifier. I only suggested two options, while I stay neutral to...
Ronald HensbergenHelp us, help yourself... Post data so we can read and use it: http://www.sqlservercentral.com/articles/Best+Practices/61537/-------------------------------------------------------------------------2+2=5 for significant large values of 2
May 4, 2011 at 6:04 am
It is very likely that the situation you described caused the problem. What you should consider is changing the column ID from what seems INT into IDENTITY(1,1) or UNIQUEIDENTIFIER. I...
Ronald HensbergenHelp us, help yourself... Post data so we can read and use it: http://www.sqlservercentral.com/articles/Best+Practices/61537/-------------------------------------------------------------------------2+2=5 for significant large values of 2
May 3, 2011 at 6:06 am
Viewing 15 posts - 16 through 30 (of 188 total)