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 MikeeOK 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: Recht
  • Order by date
  1. Recht

    Parsing BINARY Data to VCHAR

    %4E%6F%74%69%66%79%20%70%61%79%72%6F%6C%6C%20%6F%66%20%6E%65%77%20%65%6D%70%6C%6F%79%65%65 Notify payroll of new employee
  2. Recht

    Parsing BINARY Data to VCHAR

    I am not sure what is up with the conversion to nvarchar, I see data like: ????????†††††††??????????????? I should be seeing data like: "Notify payroll of new employee" I must be doing something wrong still!
  3. Recht

    Parsing BINARY Data to VCHAR

    Think there might be some lag in the posting Catadmin couldnt reply to my post (this is the original post) and so created a new post here: http://www.tek-tips.com/viewthread.cfm?qid=1096304&page=1 Thank you for the assistance so far, I will try your last example in a short while and try...
  4. Recht

    Parsing BINARY Data to VCHAR

    What I find intertesting is that the NULL (marked with red) character does'nt prevent you from converting it back, but it does seem to limit amost every client I have played with's abiltity to show the characters after it." You hit the nail on the head. Thats what I was trying to find a way to...
  5. Recht

    Parsing BINARY Data to VCHAR

    Good reply from Catadmin I've used CAST and CONVERT to set a variable, not on the variable itself. Set @Var = Cast(MyValue as DataType) and Set @Var = Convert(Datatype, MyValue) But, until you mentioned it, I had never tried it directly. I just tested in in QA and didn't seem to have a...
  6. Recht

    Parsing BINARY Data to VCHAR

    Please correct me if this is wrong: Because the data is stored in binary, it takes 2 characters for each ASCII letter. In 0xFFFFFFFFFF30303030303030303031202020202020202020202020202020200A00 The 0x is ignored as it just indicates the data is in Hex. The FF is translated as ÿ the 30 is...
  7. Recht

    Parsing BINARY Data to VCHAR

    I don't get a good result with this, I must be missing something: declare @b varbinary(8000) set @b = 0xFFFFFFFFFF30303030303030303031... select cast(@b as nVarchar(4000)) The data as it sits in the table is already set as a 175 width binary column. (Column Name=FixedColumnData...
  8. Recht

    Parsing BINARY Data to VCHAR

    QA truncates the data at the 00 for me, it appears to be a terminator internally. Catadmin suggested: Try using PATIndex or CharIndex to locate your 00 value, then use Substring() to pull the first half of the string into one variable and the second half of the string into a second variable...
  9. Recht

    RE: Parsing Binary Data to Varchar

    It makes sense, I haven't used PATIndex or CharIndex before, but it seems like now is as good a time as any to learn them! Thank you for the help. Just in advance, have you tried using CAST on a variable?
  10. Recht

    Parsing BINARY Data to VCHAR

    I need to parse the following data which is stored in a BINARY format as VARCHAR...
  11. Recht

    SQL Copy 1000 rows per table to new table

    Maybe I posted in the wrong area. I am using MS SQL 2000. I have 254 tables in the database Each of them has over 1000 rows of data. I want to use the first 1000 rows from every table and create a new database with those rows. I could use: set rowcount = 1000 select * from database..table...
  12. Recht

    Duplicate records

    Stumbled across my old documentation and also found this one: /* ** This file will delete dupe rows from a table based on a column list. ie., the compound value of the chosen column list is used to determine dupe status and subsequent delete status. We construct some dynamic SQL and use the...
  13. Recht

    SQL Copy 1000 rows per table to new table

    Is there an easy way to copy 1000 rows from every table in the database to a new database. I was thinking about: set rowcount=1000 INSERT INTO [1435530ODR2]..AAPROCQT SELECT * FROM [1435530-R]..AAPROCQT But then I would have to detail all 1700 tables, uggg Thanks in advance. Recht
  14. Recht

    Duplicate records

    Here is what I ended up using with the original database/table names, thanks for all the help. I made all of the T-SQL statements in a red font in the copy I sent out. If anyone has any suggestions or comments please don't hesitate to make them! --BACKUP THE DATABASE!!! Do this before you do...
  15. Recht

    Duplicate records

    Thank you that helps, is there any way to do this without copying the files into a new or temp table? I was thinking about maybe modifying something like this? Declare @min int, @IID int SET @min = 1 WHILE @min <> 0 BEGIN Set rowcount 1 SELECT @IID = (Select Top 1 iID from #Test Group by...
  16. Recht

    Duplicate records

    IDNUMBER proctime imp costlab pricelab ----------- ------------ -------- -------- ------------ 262801 .000000 .0 6.00 6.00 262801 .000000 .0 6.00 6.00 This is a sample of one of the cases where the data is exactly the...
  17. Recht

    Duplicate records

    Sorry for the poor typing, "In the original database the idnumber filed was unique" should read "In the original database the idnumber field was unique
  18. Recht

    Duplicate records

    In this case the duplicates contain all of the same data, so it doesnt matter which rows I delete as long as there is only one row for each idnumber. A little more background might help. A user ran a delete against the database. Over 700,000 rows were deleted and the database became...
  19. Recht

    Duplicate records

    That would give me a list of all of the distinct rows in the database, but I would still need to get rid of the duplicates...
  20. Recht

    Duplicate records

    My brain is mush today, looking for some help deleting duplicate records from a SQL 2000 database. Basically the database name is ODR The table name is pro123 The column name that should contain the unique data is idnumber. I had to merge some data into this database from a recovery, so I...

Part and Inventory Search

Back
Top