Forum Replies Created

Viewing 15 posts - 316 through 330 (of 530 total)

  • RE: Joining Two Queries into one table

    Use UNION with two normal joins.

    
    
    SELECT A.*, B.*, null, ...
    FROM A INNER JOIN B
    ON A.ID_FIELD = B.ID_FIELD
    UNION ALL
    SELECT A.* , ......
  • RE: Triggers vs. stored procedures and other questions

    Just some suggestions / remarks.

    1. You can get the time someone spent in a certain state just from inserting the 'starttime' for each state by using a query like the...

  • RE: encrypted passwords

    Yep, that's the easiest and safest way. No passwords sent in the clear over the network. CryptoAPI gives you everything you need.

    Unless you need to be able to decrypt the...

  • RE: date problem with SQL 2000

    Did you check the query plan? It might be possible that SQL Server decides to convert your datetime column to a string, before doing the comparison. Not only does this...

  • RE: Customer or Customers?

    The queries wouldn't get that much more complicated. Just add an additional WHERE clause to select the correct type when joining.

    You are correct with your remark for the Foreign keys....

  • RE: Customer or Customers?

    As you mentioned yourself, naming conventions are a personal thing. The best advice is to define/choose a naming convention and stick to it.

    For me, singular names work best, and I...

  • RE: Am I crazy?

    Jeremy, I certainly am no expert in performance tuning queries, but keep in mind that SQL Server will try to optimise stuff. Probably, the query of rdfozz will get optimised...

  • RE: first date of a specified week

    Use the following formula

    
    
    DATEADD(dd, 1 - DATEPART(wd, GETDATE()), GETDATE())

    Fiddle around with the '1 minus' part and SET DATEFIRST to determine what the first day of the...

  • RE: GROUP BY & SUM question

    I'm probably missing something, but your initial query seems to be correct to me.

    Are you sure that this is not due to the data in your tables. Maybe there is...

  • RE: DTS and Lotus NotesSQL

    One of the pre-conditions of the NotesSQL ODBC driver is the fact that an installation of either Lotus Notes (the client) or Lotus Domino (the server) is installed on the...

  • RE: outer join problem - sql 92 syntax

    Here goes nothing. I started from your first alternative solution, and changed / corrected the 'inner join' problem as I stated in my previous post.

    I don't know if this solves...

  • RE: outer join problem - sql 92 syntax

    One remark I would like to make (from BOL) is that the order in which you specify the tables IS important when using LEFT or RIGHT inner joins.

    I did not...

  • RE: right string function and convert

    The CONVERT function from integer to char right pads the resulting string with spaces.

    The conversion to varchar doesn't do this, since it stores only the 'meaningful' characters.

    Why did it work...

  • RE: Concurrent use of Stored Procedures

    This is a typical concurrency issue that you often find in 'normal' programming. Just copycatting the semaphore or mutex idea from there, I would construct a table containing one record...

  • RE: Help needed...error in page display

    Shouldn't you add Request.Querystring("Pagenum")?

    Are you sure that the 'PageCount' that is calculated in the database is correct? I.e. 1 if there are less than (or equal to) 50 records, 2...

Viewing 15 posts - 316 through 330 (of 530 total)