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 SkipVought 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. grippy

    How do I turn this statement into an IF NOT EXISTS statement?

    how would it work with this one? I tried adding the except clause to the bottom but SQL doesn't like it on this statement. INSERT INTO Product_SpecificationAttribute_Mapping (ProductId, SpecificationAttributeOptionId, AllowFiltering, ShowOnProductPage, DisplayOrder) SELECT Product.Id AS...
  2. grippy

    How do I turn this statement into an IF NOT EXISTS statement?

    right on it worked! Thanks a bunch for the help!
  3. grippy

    How do I turn this statement into an IF NOT EXISTS statement?

    I've been racking my brain on this and after several google searchs and attempts I can not get this to work. Basically the statement works fine but I want to run it daily and do not want it duplicating the results if they already exist in the table. Let me know if you guys can help me figure...
  4. grippy

    Help should I reinstall Windows Server 2012?? Start menu, charm bars, icons all disappeared

    So I'm not sure what happened but I built a windows server 2012 standard running a web server. Sent it to the data center and everything worked great for 6 months or so. One day it wasn't live so I remote booted it and ever since I've been missing a lot of functions and have been resorting to...
  5. grippy

    Need help on my existing SQL Insert Query

    Thank you for your response. Unfortunately I am not extremely savvy on SQL statements and my knowledge in that subject doesn't get much further than basic inner joins. I googled case statement syntax but am still lost...
  6. grippy

    Need help on my existing SQL Insert Query

    Ok basically what this statement is doing is going through all product names in the product table and finding the years and inserting them into a product specification attribute table. The tricky part is the products are all listed like this: Exhaust system for 92-95 Honda Civic. The...
  7. grippy

    Remote connection issues cant Telnet to 1433

    Hello, I have SQL Server 2012 and I can not for the life of me to get this to remotely connect via ODBC or other. I have disabled the firewall, enabled the TCP and Named Pipes in the SQL Server Manager as well as enabling the Remote Connection check box in SSMS. I made sure the SQL Server...
  8. grippy

    Need some help with my SQL Statement please

    Hey long time to talk haha. So I just discovered yesterday that this statement is leaving something out. For all products that begin with the year 2000 such as 00-04 it does not input the year at all for any of the years. However 01-04 will work just fine. Turns out this affects 4200...
  9. grippy

    Need some help with my SQL Statement please

    Success!!!!!!!!! It worked out great! Thank you sooooo much for your extended help it is very much appreciated!
  10. grippy

    Need some help with my SQL Statement please

    Ok I changed it and it executed successfully but all of the results are not correct. Here is an example of what the product name was: Exhaust System 99-03 Mazda Miata MX5 and it returned 10 results for that one product which were: 2003, 2002, 2001, 2000, 1999, 2000, 3200, 4000, 4200, 5000...
  11. grippy

    Need some help with my SQL Statement please

    With this script it shows all the problem cars as I listed above however it shows 1990, 91,92,93,94,95,96,97,98,99 for some reason? All the years in the attribute name are in four digit format but there are over 250 conflicts with car models that have numbers in them. select * from...
  12. grippy

    Need some help with my SQL Statement please

    Ok I see what its doing. In the Name Attribute it lists everything i.e. 1999 1998 Toyota Tercel 240SX Nissan 2000 2001 Since the design of the site just applies the attribute id to the products. I guess we need some sort of WHERE clause that finds only years from 1900-2099. I would just say...
  13. grippy

    Need some help with my SQL Statement please

    When I run that whole script the syntax is good but once executed it fails with this error: Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the nvarchar value 'SX' to data type int.
  14. grippy

    Need some help with my SQL Statement please

    just ran it with no results looks like we have no problems :)
  15. grippy

    Need some help with my SQL Statement please

    Ok I figured out the problem. It was the double )) in the third statement which just needed to be one ). It returned results that look like: id, name, ymin, ymax 53842, blah blah car 85-90 Chevy blah blah, >85<, >90< So it looks like we are on the right track here! :) I scrolled...
  16. grippy

    Need some help with my SQL Statement please

    That statement has a few errors. Id and Name are underlined from the first Select statement saying invalid column name. Line two name, loc is underlined. Line three just name is underlined. and the very last line with ) as rng the as is underlined.
  17. grippy

    Need some help with my SQL Statement please

    Alright I removed all the extra dashes from the database so the only occurrence would be in the year form i.e. 99-04. I ran the select statement but I am receiving this error: Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the nvarchar value 'SX' to data type int. I...
  18. grippy

    Need some help with my SQL Statement please

    Ok this is way over my head lol. To answer your questions there should only be one dash in every product for the year range. The table Product does have an key field which is Product.Id I copied the sql statement into sql server and before I could execute it there were a few things underlined...
  19. grippy

    Need some help with my SQL Statement please

    It is stored as nvarchar(max). Yes that code looks good but there is one thing missing that I need it to do. The SQL Statement will pick out the 99 and the 03 from 99-03 however I need to have it somehow recognize that it needs to do it for 00 and 01 and 02 as well since it is a range of...
  20. grippy

    Need some help with my SQL Statement please

    also too some product names have cars like Saab 9000 so I don't want it to pull the 00 from 9000 thinking its a year 2000

Part and Inventory Search

Back
Top