Forum Replies Created

Viewing 15 posts - 3,436 through 3,450 (of 3,543 total)

  • RE: Worst Security hole I have ever seen

    Double Wow!

    I have never granted any rights to public (and never will) but checked my servers using tim's code (great code Tim) to be sure (OK! phew!).

    SQL security is a...

  • RE: distinct output require

    select count(distinct a.candidateid) as 'candidates'

    from skillset a

    inner join skillset b on b.candidateid = a.candidateid and b.skill = 'oracle'

    where a.skill = 'xml'

    select count(distinct candidateid) as 'candidates'

    from skillset

    where skill = 'oracle'

    Edited...

  • RE: Generate Next Key from Stored Procedure

    Great topic. Always tried to find good way of incrementing id numbers. I still use non identity int columns (primary key) for my id's and set by using

    select @id =...

  • RE: Sending emails with CDOSYS

    This means that the mail server you are using does not allow forwarding of SMTP mail via a gateway. There are articles on the MS site referring to this subject...

  • RE: Job Error. Need help ASAP.

    Sounds like your server is trying to connect using Named Pipes. Use Client Network Utility on the server to create alias to other server and make sure network library is...

  • RE: Job Error. Need help ASAP.

    Sounds like your server is trying to connect using Named Pipes. Use Client Network Utility on the server to create alias to other server and make sure network library is...

  • RE: Select statement syntax

    or

    select prspct_id,min(eventdate) from prospects group by prspct_id

    not sure which is best for performance though!

  • RE: Job Error. Need help ASAP.

    Sounds like your server is trying to connect using Named Pipes. Use Client Network Utility on the server to create alias to other server and make sure network library is...

  • RE: Job Error. Need help ASAP.

    Sounds like your server is trying to connect using Named Pipes. Use Client Network Utility on the server to create alias to other server and make sure network library is...

  • RE: disply only two rows using the follwing structrure

    try

    select b.question_set_head,

    b.question_set_tail,

    b.question_no,

    b.frame_file,

    b.no_of_options

    from route_detail d

    inner join question_bank b

    ON b.question_set_head = d.question_set_head

    AND b.question_set_tail = d.question_set_tail

    AND b.question_no = d.question_no

    WHERE d.route_number = 4

    and (select count(*) from route_detail where question_set_head = b.question_set_head and question_set_tail...

  • RE: disply only two rows using the follwing structrure

    select TOP 2 b.question_set_head,

    b.question_set_tail,

    b.question_no,

    b.frame_file,

    b.no_of_options

    from route_detail d

    inner join question_bank

    ON b.question_set_head = d.question_set_head

    AND b.question_set_tail = d.question_set_tail

    AND b.question_no = d.question_no

    WHERE d.route_number = 4

    If you want a random selection then that will involve...

  • RE: Denormalised -> Normalised

    Or, if you can produce the data in singles using some form of CR/DR id, e.g.

    SELECT Prd.IDPrd, 'CR' AS 'CRDR', G1CR.IDPrdG1, G2CR.IDPrdG2,G3CR.IDPrdG3

    FROM #Product Prd

    INNER JOIN #ProductG1 G1CR ON Prd.IDPrdG1CR =...

  • RE: Denormalised -> Normalised

    You can use case statements to remove unwanted data and replace with zeros or as in the following blanks

    SELECT Prd.IDPrd,

    (CASE WHEN G3CR.RptPrd = 1 THEN CONVERT(varchar,G1CR.IDPrdG1) ELSE '' END)...

  • RE: Denormalised -> Normalised

    Please clarify re don't see all the products. When I run the sql I get one line per row in Table - Product.

    Can u list the results from your test...

  • RE: Query help...Reqd

    Will this do the trick

    select s.salesman,s.date,

    (case when (s.amount + isnull((select sum(amount) from Sales where salesman = s.salesman and date < s.date),0)) > l.Limits

    then (l.Limits - isnull((select sum(amount) from Sales...

Viewing 15 posts - 3,436 through 3,450 (of 3,543 total)