Forum Replies Created

Viewing 15 posts - 481 through 495 (of 595 total)

  • RE: Help to create a BASIS (BBX) command to SQL Server

    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...

  • RE: Mapped drive is not visible in windows 2003 server standard edition

    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...

  • RE: Using IN in a where clause from ASP .net

    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.*...

  • RE: NULL not showing from right table if LEFT JOIN using.

    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...

  • RE: changing where clause operator dynamically

    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...

  • RE: query a Column of a table based on its ordinal position

    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...

  • RE: How to get all combinations of records from a table

    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...

  • RE: Unable to get into SQLServer--I need a bit more time testing it on my PC, can I get more time??i

    If you right click on the icon with the red dot and select MSSQLServer - Start from the menu, what happens?

     

  • RE: sp_grantlogin

    You can't. After executing sp_grantlogin, run sp_defaultdb.

     

  • RE: Count all Rows in all Tables

    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...

  • RE: Error Message

    >>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...

  • RE: Error Message

    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...

  • RE: Error Message

    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...

  • RE: cursor query does not work

    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...

  • RE: Error Message

    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...

Viewing 15 posts - 481 through 495 (of 595 total)