Forum Replies Created

Viewing 15 posts - 8,146 through 8,160 (of 13,469 total)

  • RE: Add ROW_ID group by Name

    if you are stuck with SLq 2000, you have to use a temp table; there's no other way around it.

    here's a fine example from Jeff Moden that i copied years...

  • RE: Database Mail not being sent

    if you run this query, do you see the mail item that failed? if it's not failing, maybe a spam filter is intercepting it?

    select * from msdb.dbo.sysmail_event_log lg

    inner join...

  • RE: Detach trigger code

    in that case I'd recommend not using a trigger at all.

    with or without the trigger you could do two things that i can think of:;

    1. skip the trigger and have...

  • RE: Detach trigger code

    sp_send_dbmail is safe to use in a trigger;

    sp_send_dbmail is asynchronous, so it returns without errors immediately...your trigger would not wait for it.

    the only way i've encountered so far that it...

  • RE: Case when statement

    TSQL CASE is not the same as other programming languages...

    in SQL, CASE is used to return data...to make logical decisions, you have to use IF.ELSE

    How can I accomplish this?

    IF...

  • RE: Looking for a word occurence count in a rowset scenario.

    ok how about this: it's simply doing a REPLACE on the original phrase, and using datalength to get the differences:

    No Tally, so i think it'll be faster than anything so...

  • RE: DDL creation issue

    glad i could help!

  • RE: SQL Help

    ok, you want the reverse...you have a bigint field, but want preceding zeros.

    the max bigint value is 9,223,372,036,854,775,807

    9223372036854775807

    |______19 digits___|

    123456789012345678

    that's 19 digits.... assuming you want up to 18 preceding zeros, you...

  • RE: fill datagridview with 5 million record & transactions

    Sjeef (2/8/2011)


    why would you go into reading line per line and insert that into the dataview.?

    put the result of your sqlstatement into a dataset

    dim myds as dataset = new dataset("sqlstmt","sqlconenction")

    then...

  • RE: Suggestion on Foreign Key Constraint

    zubairmasoodi (2/8/2011)


    Thanks for your quick reply

    Cannot truncate table 'UserInfo' because it is being referenced by a FOREIGN KEY constraint.

    No, the constraint will not let you delete the Country because it...

  • RE: SQL Help

    Ram this seemed a little too straight forward...simple CONVERT commands seem to work fine for me...what am i missing on your question?

    With tblA(CustomerKey,CustomerID)

    As

    (

    SELECT N'000098878787',N'284005' UNION ALL

    SELECT N'000089898989',N'284005' UNION ALL

    SELECT...

  • RE: DDL creation issue

    so your script is using a hardcoded path, and sometimes the path does not exist, right?

    i'd build the path to the files based on the existence of data i can...

  • RE: finding occurences of select *

    doh i didn't even think about if there were any math functions in the bodies; good catch; i'm not sure on the commented comments...

  • RE: finding occurences of select *

    i think i got it...try my updated post, which assumes that same function. does that get you where you wanted to be?

  • RE: finding occurences of select *

    the second part to test for EXISTs is not so easy;

    looking at our code base, we have a couple of different styles for people using EXISTS:

    IF exists(select specificColumnName

    ---

    IF exists(

    select *...

Viewing 15 posts - 8,146 through 8,160 (of 13,469 total)