Forum Replies Created

Viewing 15 posts - 16 through 30 (of 95 total)

  • RE: List all the departments that don’t have any employees

    Ian Massi (10/31/2008)


    I would group by department having count(*) = 0.

    won't the count be equal to or greater than 1 always? if the count is 0, then it doesn't exist

    I...

  • RE: Can I run a second proc independent of the first proc?

    just throwing this out there...

    1. you pass the 4 variables to the SP

    2. SP then calls a batch file via xm_cmdshell

    3. batch file uses the 'start' command to spawn a...

  • RE: UPDATE...WHERE EXISTS

    UPDATE User

    SET AccountStatus = 'Disabled'

    WHERE EXISTS

    (SELECT * FROM User a

    INNER JOIN sheet1$ b

    ON a.emailaddress = b.Emailaddress)

    I would also like to address the mis-use of EXISTS.

    SELECT * FROM User...

  • RE: Solution of SQL Injections

    I have a question.. lets say you have to use a dynamic query. how about you modify the dynamic query string like this

    eg.

    incoming query: " select * from test1 where...

  • RE: how to save a blob to harddisk?

    can you tell your query to save to a file instead of a grid/text and just select what you need? may wanna turn off the (rows affected) stuff

  • RE: How much it is feasible to store the photograph of Visitor in table?

    [...]With the database of pictures, database security and rules allowed for control of who could see which pictures. Could even audit that access through a trace. Can't really...

  • RE: CSI -are they for real?

    and cracking passwords are so much easier on TV and in real life.. ZOMG! i got the first letter of the 20char password, only 19 more to go!

    ~46*20 != 46^20

  • RE: select count

    first thing that comes to mind is to unpivot to turn the columns into rows then group and count. I've already had issues with getting pivot/unpivot syntax correct, so I...

  • RE: SELECT queries

    an example would be something like this

    table1(iUserID, FirstName, LastName)

    1,Jon,Smith

    2,Jim,Smith

    table2(iUserID,Address)

    1,1234 Mocking bird ln

    2,2345 Baltic ave

    if you want to 'link' the two tables together to see who has what address

    select t1.FirstName, t1.LastName,...

  • RE: Query Tuning in TSQL

    Milu (10/1/2008)


    bcronce,

    Can you please clear me what you are trying to say??

    luvs,

    Milu.:)

    Merge joins are very effcient for large joins where they are pre-sorted. Many times doing large joins where you...

  • RE: regarding primary key

    the logic behind it is that column1 in tablea as a PK and column1 in tableb as a PK are different because the tables are different.

    the 'fullname', if you...

  • RE: how to get a stored procedure value in C#.net?

    zomg!! don't store passwords.. wtb some hash and please pass the salt.

  • RE: Stored Procedure that runs hourly to assign Day (timezone) values in database

    I got mixed up in my thoughts. I was picturing someone selecting a day on a calendar. If you had a calendar on the client side and you transfer everything...

  • RE: Cant show correct duplicate data using MAX function

    you probably have somthing in your table like this

    1,5

    2,3

    if you take the max of each coloumn, you get 2,5 not 2,3

  • RE: Insert performance

    if it's reopening, then that means the connection handling is inside the loop and this should be outside the loop.

Viewing 15 posts - 16 through 30 (of 95 total)