Viewing 15 posts - 481 through 495 (of 595 total)
BBx is an implementation of Business Basic. Note that there isn't a Mid() function. Substrings are obtained using an array-like notation. First number is the starting position, second (optional) number...
November 5, 2004 at 6:03 am
Are you logged into the server locally, or are you trying to restore the database from a client workstation? When you browse for folders during a restore, the drives that...
October 29, 2004 at 8:45 am
Here's some code I use. It requires creating two UDFs, dbo.fGetToken and dbo.fGetTable. UDF dbo.fGetTable references dbo.fGetToken.
All of this boils down to being able to execute a query like this:
SELECT m.*...
October 28, 2004 at 10:23 am
The problem is, There is two tables A and B. Both table has two fields F1 and F2. 96 records in A. A.F2 will be unique. 1 record in...
October 22, 2004 at 6:58 am
Another option is to modify the search string and use a single query.
For example, compare these two SELECT statements:
SELECT * FROM history WHERE name LIKE 'ABC%' -- pattern matching
SELECT...
October 22, 2004 at 6:36 am
You could do something like this:
DECLARE @tblname sysname, @colname sysname
SET @tblname = '<table to check>'
SET @colname = '<column to check>'
IF (SELECT COUNT(*)
FROM sysobjects t JOIN syscolumns c ON...
October 21, 2004 at 7:02 am
As the others have said, this is best done (if you really need to do this) by the client application. That said, you could do something like following. Be advised...
October 19, 2004 at 11:51 am
If you right click on the icon with the red dot and select MSSQLServer - Start from the menu, what happens?
October 13, 2004 at 9:14 am
You can't. After executing sp_grantlogin, run sp_defaultdb.
October 12, 2004 at 7:49 am
Try this:
exec sp_MSforeachtable "print '?' SELECT Count(*) FROM ? "
Another simple way is to run the following script, which generates all of your SELECT statements. Then, cut and paste the...
October 8, 2004 at 6:15 am
>>MD 3205362126 GB 3205362
>>Would you say that's 32GB?
Close enough. Technically speaking, 1KB=1024 bytes, 1MB=1024KB=1048576 bytes, 1GB=1024MB=1073741824 bytes. So 3205362126 MB actually equals 3130236 (rounded). You would divide by 1024 instead...
October 8, 2004 at 5:35 am
About your only option left is the DECIMAL data type:
SELECT SUM(Cast(FileSize AS Decimal(38))) AS MB,
Cast(SUM(Cast(FileSize AS Decimal(38))/ 1000) as Decimal(38)) AS GB
FROM o_file
WHERE volid = 16 AND groupid...
October 7, 2004 at 1:06 pm
Debbie, are you using SQL Server 2000? BigInt is new to SQL Server 2000 and is not available in earlier versions of SQL Server.
I tested the following without any...
October 7, 2004 at 12:48 pm
I made some slight modifications, and it works for me. Note that when using variables with this stored procedure, you don't need quotes around object names. Also, an INSENSITIVE cursor...
October 7, 2004 at 12:42 pm
You need to cast to bigint BEFORE summing:
SELECT SUM( Cast(FileSize AS bigint) ) AS MB,
SUM( Cast(FileSize AS bigint)/ Cast(1000 as bigint)) AS GB
FROM o_file
WHERE volid = 16...
October 7, 2004 at 12:25 pm
Viewing 15 posts - 481 through 495 (of 595 total)