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 Mike Lewis 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: *

  1. Vinodk

    Logging User Statistics in SQL Server

    You can use profiler to track the users ... You can also query from the backend ... Select program_name,hostname, nt_username, nt_domain from master..sysprocesses Where Ltrim(program_name) <>'' You can also use sp_who2 to get the users connected ... HTH, Vinod Kumar
  2. Vinodk

    getting data from two databases

    Use a three part name like database.owner.objectName to fully qualify the table to access. eg. Select * from NorthWind.dbo.Customers HTH, Vinod Kumar
  3. Vinodk

    Loading a table from a flat file.

    DTS is another option you would like to try ... HTH, Vinod Kumar
  4. Vinodk

    Need to remove a dash, Stupid, but I cant remember how!

    Hi, replace is one option available ... Like field = repace(field,'-','') You can use the Case Statement construct also to achieve this (provided you know the length of the string): DECLARE @BadStr VARCHAR(30) SET @BadStr = '6169-90' SELECT CASE WHEN SUBSTRING(@BadStr, 1, 1) LIKE '[0-9]'...
  5. Vinodk

    Replace Apostrophies for Openquery??

    You can surely use quotes with OpenQuery(). If you post us the complete code then we can surely debug the problem. Here is an example that works perfectly. SELECT * FROM OPENQUERY([servername], ' SELECT * FROM northwind.dbo.employees WHERE employeeID = ''1'' ') HTH, Vinod Kumar
  6. Vinodk

    Poss. to get rid of duplicate rows?

    Donot you have an Identity Column. If you have one then you can update the second set easily like Update WordFileLinks SET fileID=a.fileID + 100000 From WordFileLinks a Where [Primary key] > 10000 -- (eg) and fileID < 7000 HTH, Vinod Kumar
  7. Vinodk

    Dividing one field into many and adding them

    Declare @field varchar(50), @loc int Set @field = '4;4;3;65;43;813;345' Set @loc = 3 CREATE TABLE #temp (PkID Int Identity, Id INT NOT NULL) declare @param VARCHAR(8000) Set @param = REPLACE(@field, ';', ' UNION SELECT ') Select @param INSERT #temp EXEC ('SELECT ' + @param) SELECT * FROM #temp...
  8. Vinodk

    Storing the Current System User in SQL Server DB via Form

    Why do you ant to come to your application to do this update? If you are using integrated authentication then you can fire a trigger at the backend for the FundSites that would update the AdminID field. HTH, Vinod Kumar
  9. Vinodk

    Table Identifier Variable

    When using table variables use the declare directive: declare @myTable table (col1 int ... HTH, Vinod Kumar

Part and Inventory Search

Back
Top