Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: drallabs
  • Content: Threads
  • Order by date
  1. drallabs

    group by max date

    I have one table that has multiple id's and associated dates as well as other fields. I would like to query all the id's with the id's latest date entry and include other fields in this query. The following query selects the one id value and its latest date entry: SELECT id, MAX(InspectionDt)...
  2. drallabs

    Remote connection to SQL Express

    I have attempted to remotely connect to a SQL Express database server via SQL Server Enterpricse Management Studio using windows authentication but I get the following error message: "an error has occured while establishing to the server. When connection to SQL Server 2005 this failuer may be...
  3. drallabs

    Combine null and other selection in Where clause

    I have a where clause looking for blanks and nulls in a column e.g., where column is null and column = '' Is there a way to combine these into one where statement? I am looking for either or.
  4. drallabs

    Searching for Invalid Values in a Column

    I would like to find the following occurences of invalid values in a field. The first occurence is I have a field that limits the number of characters to 7. However users sometimes enter values in this field that are 6 characters or less. Is there a way to query these out? The second occurence...
  5. drallabs

    delete an errant database

    I have moved a disk array from an old server to a new database server which has sql databases on them. I restored the databases from backup tapes into new databases. I would like to remove the original databases from the array. The new database has not been connected to these original databases...
  6. drallabs

    lower case

    What SQL syntax would I use to search for only lower case letters in a given field. This is done in SQL 2005. The field should only have upper case. I need to convert the lower case to upper case.
  7. drallabs

    Null

    I just received a database full of tables from an outside source. These tables have multiple fields in each of them. My question is this database allowed nulls in all the fields. Is there a way/script that I can run that would automatically convert the nulls to not nulls. I would like to avoid...
  8. drallabs

    ldf Log File Size Reduction

    I have a database with a log file (ldf) that has grown to 90gb. I would like to reduce this size of this file. Approximately 99% of this file is used. The Shrink command will not reduce it any lower than 90gb. It seems that there are a bunch of transactions in the log file that need to be...
  9. drallabs

    Exporting Data

    Does anyone know if you can prevent a user from exporting a table from a database to another database/format. I would like to prevent users from making copies of the database data.
  10. drallabs

    Dynamic SQL

    The following dynamic sql statement executes the first print statement when the @standid variable is not null. Any ideas, perhaps a dynamic sql qwerk? declare @standid varchar(100) Declare @SQL VarChar(1000) SELECT @SQL = ' SELECT' + @standid + '= standid FROM ' + @TableName + ' where...
  11. drallabs

    Debugger

    I cannot get the debugger in Enterprise Manager to work correctly. I would like to be able to step through a stored procedure but when I set a break point and run the code it the debugger does not stop at the breakpoint. This may help, all of the step buttons, restart and stop debugging are...
  12. drallabs

    dynamic sql in a stored procedure using group by

    can anyone tell me why the following stored procedure errors out? Create Procedure StandEdit_ErrorCheck @TableName VarChar(100) AS Declare @SQL VarChar(1000) --Check for Duplicate Standids SELECT @SQL = 'SELECT standid FROM ' SELECT @SQL = @SQL + @TableName + 'GROUP BY standid ' --GROUP BY...
  13. drallabs

    Parameters

    Can you use a parameter in a stored procedure to select a table? e.g., create procedure pStandEditErrorCheck @standedit char(6) as --Check for Duplicate Standids SELECT standid, count(*) AS Total_Duplicate_Standids FROM @standedit--stand_edits GROUP BY standid HAVING count(*) > 1 return
  14. drallabs

    Controlling Database Size

    I have multiple databases on SQL Server. I loaded data into these database which took up 80GB. A few months later the database was at 120GB. I deleted a bunch of data from the database and only 3GB was freed up. I used the Database Maintenance Plan Wizard to free up space which it did. The...

Part and Inventory Search

Back
Top