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

  • Users: hapax
  • Order by date
  1. hapax

    Delete database and ignore complaints

    Well, I usually just go through the GUI, and right-click, Delete Database. But maybe SQL "DROP databasename" works without complaining about foreign keys? I'll have to try that next time, or maybe the sp mentioned earlier in this thread.
  2. hapax

    Delete database and ignore complaints

    Is there a way to just delete a SQL Server database, without it complaining about foreign keys and such? Is there a command to just ignore any issues and just drop the database anyway? I'm always running into this when I'm developing.
  3. hapax

    Need "search by keywords" feature

    I want to store items in a database. The columns for each item will be things like author, title, description. I also want to somehow associate keywords with each item. These will be used for a search feature on a website, to locate items that have certain keywords. Each item can have one or...
  4. hapax

    Storing PDFs in the database?

    Thanks for the info. I guess db size could be an factor? 1000 PDFs at 1MB apiece, would be 1GB extra space to back up every day. Or would SQL Server compress the PDF's size?
  5. hapax

    Storing PDFs in the database?

    For a website, what are the pros and cons of putting PDFs in a SQL Server database, versus just storing them in a web server directory? So far I've only ever put text in a database, but I understand you can also put PDFs, images, etc in there. I need to store about 1000 PDFs for use in my web...
  6. hapax

    How to store multiple categories for a column

    Much thanks to you both. I knew this was a pretty common thing but didn't remember how.
  7. hapax

    How to store multiple categories for a column

    I need to create a table something like this: Patient table ---------- ID Name Categories The thing is, for each of these records there can be multiple Categories. Something like this: ID: 321 Name: Bob Categories: Flu, Diabetes, Cancer How can I do this? I need a separate Categories table...
  8. hapax

    Script out table data

    How can I script out the contents of a table - all the data in all the rows? I'm looking for results similar to what the Database Publishing Wizard produces, but I only need to copy one table not the whole database. I want to recreate a table on a second database. I want to automatically...
  9. hapax

    COM error

    I just got assigned to a new website that uses some COM for backend processing. When I run the code locally on my PC, I get the following error when the code hits the point to instantiate one of the COM objects: “Retrieving the COM class factory for component with CLSID...
  10. hapax

    Convert text to numeric

    Thanks, works
  11. hapax

    Convert text to numeric

    OK, I fixed the misspelling of decimal, but it still doesn't work: SELECT CONVERT(decimal(25,15), CONVERT(text), gam.attribute_detail_text) < @NorthLatLine
  12. hapax

    Convert text to numeric

    I haven't gotten it working yet. Here's my actual line (in a WHERE clause): SELECT CONVERT(decimail(25,15), CONVERT(text), gam.attribute_detail_text) < @NorthLatLine do you see anything wrong?
  13. hapax

    Convert text to numeric

    How do I convert a "text" type value to a "numeric" type, in T-SQL? I tried the following but it throws an error: SELECT CAST(my_text as numeric) Note: The text values are in proper number format, so I don't need to worry about that too much. I just need to convert them to numerics so I can...
  14. hapax

    Return rows where no matching ID exists

    I have the following query: Select * FROM Unit u inner join Event ev on ev.UnitId = u.UnitId But what I really want is something that does the opposite - returns all the records where no ev.UnitId exists for a given u.UnitId. How do I do that?
  15. hapax

    Set Theory for beginning database developers?

    I want a better understanding of what I'm doing when I write SELECTs/DML and how I should design my queries. The books I have read say "this is how you do a join" but they don't really explain the theory or concepts behind what you are doing. I want to understand the theory a little to help me...
  16. hapax

    Set Theory for beginning database developers?

    Can you recommend a good book or article that will give me a conceptual understanding of what I'm doing when I write SQL joins, etc? Something written at a beginner level would help me the most. I'm a junior developer and I'd like to understand more of the overall concepts or theory behind what...
  17. hapax

    Delete items that are found in a second table

    Sorry, I forgot to include NoteSeqNum in the criteria for delete. So the partial SQL should say: DELETE FROM NoteTable WHERE [...a matching NoteId, NoteSeqNum, and NoteTypeID are found in @NoteTempTable] DELETE FROM @NoteTempTable WHERE [...the same...
  18. hapax

    Delete items that are found in a second table

    I have a table named NoteTable. I also have a second temporary table that contains some of the identical data as NoteTable. I want to delete all rows from NoteTable where the same items exist in the temp table, and also delete those same items from the temp table. Example: NoteTable...
  19. hapax

    Return rows with less than max

    The following query... SELECT ItemId, NoteSeqNum FROM NotesTable WHERE ItemId = 6434 AND NoteTypeId = 1 ..returns these results: ItemId NoteSeqNum 6434 11 6434 12 6434 13 I need SQL to return only those items with less than the max NoteSeqNum. So this would be my desired result: ItemId...

Part and Inventory Search

Back
Top