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 Wanet Telecoms Ltd 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. Schaeffrcc

    BCP Issues

    I am using BCP to dump a Temp Table out to a .CSV file every night. the BCP works great for the most part and 5000 records get dumped just fine but approx 900 records get dumped to the .CSV as just the deliminator. Here is my BCP statement EXEC master..xp_cmdshell 'bcp "adult.dbo.clients"...
  2. Schaeffrcc

    Like statement?

    I have a Query that pulls a subset of data into a temp table and then has to look for field that contain a Char. it looks like below: UPDATE clients SET clients.client_city = Null WHERE (((clients.client_city)=" ")); Now I also want this statement or another one to update the field to Null if...
  3. Schaeffrcc

    Optimization Locks up database

    We are running a standard SQL maintenance plan and it looks like the optimization job is running a xp_sqlmaint on the master database. I hope this helps, Thomas.
  4. Schaeffrcc

    Optimization Locks up database

    I have a SQL 7.0 Server that serves up 4 databases. For the last month we have been having problems on Sunday nights when we run our DB optimization job the DBCC command ends up locking the database on one of the 4 databases. On Monday morning we end up having to kill the Optimization Job to...
  5. Schaeffrcc

    2 Questions about BCP

    I have a SP that updates 3 tables in SQL with data from approx 7 others. This works great and I have a .Bat file that runs BCP to export them out to a ~ delimited .CSV File. This also seems to work good but I have a problem. The Dates in SQL look like MM/DD/YYYY or MM/DD/YYYY HH:MM:SS PM but...
  6. Schaeffrcc

    Update 1 table from 2 others

    The code from zhavic posted works great but now I am having a problem whan I put it into a Stored Procedure in SQL, if there is a NULL value in any of the 3 fields Client_Last_name, Client_First_Name, or Client_Middle_Name then it makes the whole field a null value. I was thinking if I could do...
  7. Schaeffrcc

    Truncating Data Fields to insert into table

    I am trying to Automate the moving of data from on Database to another with differnt size Fields. I am fine with the data being truncated down from 50 to 30 Char but do not know how to do it. I get the following error: Server: Msg 8152, Level 16, State 9, Line 60 String or binary data would...
  8. Schaeffrcc

    Select Query to Temp Table then Link.

    SQLSISTER I tied your Syntax and now get the following error. Server: Msg 170, Level 15, State 1, Line 2 Line 2: Incorrect syntax near 'int'. What am I missing? Thanks, Thomas.
  9. Schaeffrcc

    Select Query to Temp Table then Link.

    So I have tried the suggestion and using the following syntax and I get the following error. CREATE TABLE #CaseSeq (Case_Seq int) Select DISTINCT case_table.case_seq INTO #CaseSeq FROM ((agent RIGHT JOIN (client LEFT JOIN client_agent_link ON client.client_seq = client_agent_link.client_seq)...
  10. Schaeffrcc

    Select Query to Temp Table then Link.

    I have a database that has many tables and a massive table that links it all together called Case_History. I have been trying for a while to get the correct data out of this history table because of duplication when Client move from here to there and back I have resigned myself to breaking it...
  11. Schaeffrcc

    Error 1453 - Quota issue?

    I have a SQL server that has been having many problems lately not the least of which is an inability to backup that databases nightly to .BAK files. I have been getting the following error when I do try to back up the database: 1453(Insufficient quota to complete the requested service) I have...
  12. Schaeffrcc

    Earliest Open Date Data

    I have a table that is used to keep history of client movement and most clients have 3 or 4 records in the table. I.E: Table 1 Seq 1 2 3 4 Name Tom Bill Tom Jan Open Date 1/2/2000 1/5/2002 2/5/2002...
  13. Schaeffrcc

    SQL Compatability Change

    We made a change to our SQL 7.0 Server from 6.5 Compatibility to SQL 7.0 compatibility and afterwards we have been having problems with Random Locking on tables in our Application. We have since change the compatibility back to SQL 6.5 but the problems continue. (I do not know if this change...
  14. Schaeffrcc

    Backing out of SQL Replication

    I work for a company that runs 4 Databases on one SQL 7.0 server. We can not upgrade to SQL 2000 because on 2 of our applications, built in PowerBuilder, can not handle the upgrade and are in the process of being rebuild. The current problem we are having is in an attempt to get out Disaster...
  15. Schaeffrcc

    Update Table with Mutiple Joins

    I have been working more on this and had a Select Query woring and in attempting to modify it into a Insert Query I have run into a few new issues. This version does have the Where Clause updated. With the following Script I get the error: Server: Msg 107, Level 16, State 3, Line 2 The column...
  16. Schaeffrcc

    Update Table with Mutiple Joins

    I have been working on this problem my company has to move data from one database to another. I have a Query that I set up in Access to query out all of the data element and update another table. I grabbed the SQL script data and tried to fix it so I could run it in Query Analyzer. Generally...
  17. Schaeffrcc

    Update 1 table from 2 others

    Zhavic, your wisdom is only exceeded by your generosity with it, or in other words that worked excellent. Now for the final follow up question for you or any of our other fine viewers. Now that I have a Query that can update my table with the correct data that I need, is a scheduled nightly...
  18. Schaeffrcc

    Update 1 table from 2 others

    Thanks for that Help "Zhavic", the "+" replacing the "&" solved that error now I get the following error: Server: Msg 553, Level 16, State 1, Line 1 UPDATE over nullable side of outer join query on table 'CaseManager'. Just to try to give you as much information...
  19. Schaeffrcc

    Update 1 table from 2 others

    I am new to Tek-Tips and this has been a very useful site. I am trying to update one table from 2 others Then once updated I planned to use BCP to export the table to a .CSV file. 2 Data Tables -Agent -County 1 Table to be updated -CaseManager This is the Syntax that I have been using...

Part and Inventory Search

Back
Top