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 strongm 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: bmacbmac
  • Content: Threads
  • Order by date
  1. bmacbmac

    Help searching within this Json file

    Hi Everyone, I have the following test.json file: { "imageRoot": "https://path/", "name": "Test", "documents": [ { "imageUrl": "D0205936.tif", "json": { "indexingRecordId": "281972", "bookType": "OPR", "bookNumber": "14"...
  2. bmacbmac

    How to import plain text from Word doc to SQL

    Hello... I have about 25,000 Word Docs where I would like to import just the text data from each file. Reading other forums, I have tried: create table Documents (DocName nvarchar(40), DocContent Varbinary(max)) INSERT INTO Documents SELECT...
  3. bmacbmac

    SQL 'For json' query for over 100,000 records - truncating results

    Hello! I have over 100,000 records in SQL that I need exported to json. My query is: SELECT documentinfo.irecordid, (select tempparties.* from tempparties WHERE tempparties.irecordid = documentinfo.irecordid and tipartytype = 1 FOR JSON AUTO) AS first, (SELECT tempparties.* from tempparties...
  4. bmacbmac

    Inserting XML data into SQLServer returns only NULL values

    Hi there, I have the following data in an xml file: <?xml version="1.0" encoding="utf-16"?> <documents> <document ArchivedFileName="40243702\6665414.tif" DocumentId="6665414" FileSize="304790" OriginalFileName="ptmcdfd.tif" DocumentTypeName="8" FileNumber="40243702"...
  5. bmacbmac

    Help with RegEx to find non alphanumeric characters

    Hi. I have a table full of names. I am trying to find all names that contain a non alphanumeric character, but I want to exclude spaces, dashes - , and ampersand &. I am trying this: select * from mytable where name like '%[^a-zA-Z0-9 -&/]%' However, I am getting names returned like...
  6. bmacbmac

    Import 800 access .mdb files to SQLServer

    Hi! I have 800 little MDB files that I need to import into SQLServer 2008 R2. I'm really hoping I don't have to do the data import wizard 800 times, but I can't find much of a T-SQL solution. I'm hoping there is some sort of insert script I can run for each MDB file. Any ideas? Thanks!
  7. bmacbmac

    Identify The number of occurrences of a given field

    Hello... I have the following data: create table #temp (instrumentID varchar(25), saddition varchar(50), block varchar(10), Lot varchar(10), LotLength int) insert into #temp values ('aa11', 'SP1', '5', '9', 1) insert into #temp values ('aa11', 'SP1', '5', '10', 2) insert into #temp values...
  8. bmacbmac

    Fill empty row with 1+ data from row above

    Hello, I have the following table / values: create table #temp (counter int, imageid int, newpage int) insert into #temp values (1,400, 1) insert into #temp values (2,400, NULL) insert into #temp values (3,400, NULL) insert into #temp values (4,400, NULL) insert into #temp values (5,400...
  9. bmacbmac

    Using @variable in a While statement

    Hi Everyone, I have the following table: create table August2018 (counter int identity(1,1), County varchar(25), Locates int, Billed varchar(1), ToBill varchar(1)) Insert into August2018 (county, tobill) values ('Bellingham', 'x') Insert into August2018 (county, tobill) values ('Adams'...
  10. bmacbmac

    Using the same scripts over and over again

    I work with about 75-100 databases. I find myself typing the exact same select statement(s) several times per day in various databases. They are pretty short: select * from table1 t1 join table2 t2 on t1.recordid = t2.recordid join table3 t3 on t2.nameid = t3.nameid Is there some sort of...
  11. bmacbmac

    SQL error XML Parsing - Equal Expected

    Hello, I have a table (Subs2) with the following data: Textlist S~U~BRANCH CREEK 19-28-3~1019-7~Y~N~~~~~~~~~~~~ S~U~13TH STREET SPORT PARK~13SSP~Y~N~~~~~~~~~~~~ S~U~77-SUNSET MOBILE HOME PARK - DOUGLASS~77SMHP~Y~N~~~~~~~~~~~~ I am trying to parse out the fields (with ~ as the delimiter) to...
  12. bmacbmac

    Remove long spaces in middle of string

    Hi. I have data in a table like this: NW 35 6 6 55 PLAT ID 111 T176 BERKS I'd like to remove the long strings of spaces in the middle of this string, but I dont' want to remove the single space between words. I thought about just replacing double...
  13. bmacbmac

    How to set a variable - perform an action - and then set the variable to + 1

    Hello. Trying something like this. I am trying to set a @variable to 1 so I can update some records to FOLDER1. At the end of my script I would like to set the @variable to + 1 so I can set the next records to FOLDER2, etc. How can I set a starting @variable and then add + 1 to it? When...
  14. bmacbmac

    Varchar column containing numeric and alphanumeric - trying to select where values between numbers

    Hi. I have a table with numeric and non numeric: declare @temp table (Data varchar(20)) insert into @temp values (NULL) insert into @temp values ('10') insert into @temp values ('T') insert into @temp values ('11') insert into @temp values ('5') insert into @temp values ('P') I'm trying to...
  15. bmacbmac

    Decreased column size in a table but table size grew

    Hi! I have a table temp with path varchar(1000). I reduced the path size with: alter table temp alter column temp varchar(500) After I did this the table size actually grew. I reduced again to varchar(4000 and the table size grew again. Is there another action I should take after...
  16. bmacbmac

    How to hashbytes SQL information for one record spanning multiple rows

    Hello. Running SQL 2008. I have the following sample data: create table #temp (irecordid int, name varchar(100)) insert into #temp values (2373691, 'HURT, CYNTHIA') insert into #temp values (2373691 , 'HURT, STEVEN') insert into #temp values (2378322 , 'SUNSET CUSTOM HOMES, ') insert into...
  17. bmacbmac

    Help building sp_executesql script

    Hi. I have a table create table searchlist (list varchar (100)) Which contains about 100 items I need to search in 75 databases. I can run something like this: select t1.list from MyDB1..files t1 join searchlist t2 on t1.list like '%' + t2.list + '%' And I receive results just fine...
  18. bmacbmac

    Update column based on sum value of another column

    Hello. This is a little difficult to explain.... I have a table with the following table: create table mytable1 (counter int, pages int, Folder varchar(100)) insert into mytable1 (counter, pages) values (1, 12) insert into mytable1 (counter, pages) values (2, 13) insert into mytable1...
  19. bmacbmac

    Join tables on CASE

    Hi. I have two tables: create table #mytable1 (lot varchar(3), addition varchar(25)) insert into #mytable1 values ('9', 'ANDERSON ADD') create table #mytable2 (lot varchar(3), addition varchar(25)) insert into mytable values ('1', 'ANDERSON ADD') insert into mytable2 values ('9', 'ANDERSON...
  20. bmacbmac

    Help with parsing XML 8000 character limit

    Hi Everyone, I have a table create table mytable (counter int, Images varchar(8000)) The counter column just contains a numerical counter. The Images column contains a pipe delimited list of file names: 00001.TIF|00002.TIF|00003.TIF|00004.TIF 00005.TIF|00006.TIF I am trying to spit the...

Part and Inventory Search

Back
Top