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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by malexanian

  1. malexanian

    Are Innerjoins Updatable??

    I think dvannoy means using an inner join within a view to create a dynaset. These are not necessarily updateable... It depends on the join and on the particular field. Look it up Books Online. Let's just say SQL Server is much more restrictive than Microsoft Jet.
  2. malexanian

    HELP with a Left Join, maybe I need a double Join??

    Outer is optional if you already supply Left. You need a cross join. A cross join of image and cat will get you a record for every possible combination of image and cat. Then you left join that onto image_cat to pull the third field in: SELECT i.imageID, c.catID, ic.image_catID FROM...
  3. malexanian

    If..else..in Update Statement?

    Jiminy jillickers! How did I miss that glaring FROM clause? I hit the same wall when I migrated from Access SQL: In SQL Server, your UPDATE statements can only update one table at a time. Check Books Online for the proper syntax. In general: UPDATE <table-to-be-updated> SET a = b, c =...
  4. malexanian

    multiple product column into one row

    We will use VBA to generate a tab-delimited string. Since I don't know which version you are using, I will use DAO (I haven't used the ADO stuff in Access itself yet; it's been a while). Note the use of the CurrentDb object... I don't think anything after 97 has this; you may have to modify...
  5. malexanian

    Query Help -- Groups, joins, and calculations

    The visitor and order calculations are separate and must be done separately. Use subqueries: SELECT r.ref, r.keyword, ( SELECT COUNT(*) FROM tbl_visitors WHERE visitor_ref = r.ref AND visitor_date >= '9/10/2002' AND visitor_date < '9/21/2002' )...
  6. malexanian

    If..else..in Update Statement?

    Your if line has quotes around it. I think that's it.
  7. malexanian

    Contains sql and ASP

    That is not what an ASP querystring is. The Response.QueryString object is a string representing arguments submitted from a form on a web page. This has nothing to do with SQL Server.
  8. malexanian

    Easy SQL Query Question

    Instead of these inefficient dateparts, take advantage of the fact that dates in Access are stored in terms of days from 1/1/1900. WHERE r.date_time >= #9/1/2002# AND r.date_time < #9/16/2002# AND fpart(r.date_time) Between #1/1/1900 07:00:00# And #1/1/1900 23:00:00# The...
  9. malexanian

    If..else..in Update Statement?

    In the jsp page that receives the submitted form, build the SQL string. However, don't pass everything to the SQL Server. Place the if else logic inside the jsp page. Instead of what you proposed: String sql = &quot;UPDATE tbl SET if (a) { b, c } else { d, e }&quot; Do: String sql =...
  10. malexanian

    multiple product column into one row

    How are your coding skills? Would you prefer T-SQL in SQL Server 7.0 or VBA in Access? There are fairly simple solutions to both.
  11. malexanian

    Faster way to delete rows

    It may be faster if you drop all indexes (especially clustered ones) before the delete and rebuild the index afterwards. Maintaining the clustered one during the delete is the worst because the records are physically reordered for EVERY record deleted.
  12. malexanian

    Can DTS update columns in a table when importing a text file

    Short answer: DTS can't. Long answer: You can write a procedure, either in SQL Server or outside it, that examines the file and determines if a column has been added. If it has, trigger a stored procedure that ALTERs your TABLE to add the column.
  13. malexanian

    There is no SQL Service in the Services Panel

    The services don't show up even when the windows are open? Weird... When in doubt, reinstall.
  14. malexanian

    using local variable in remote queries; anyone...?

    Instead of using OPENROWSET, why not link the remote server? Then you can reference the remote db as if it were on your local instance. Check Books Online for info on linking servers.

Part and Inventory Search

Back
Top