Forum Replies Created

Viewing 15 posts - 1,126 through 1,140 (of 13,445 total)

  • RE: finding store proces that need to be recompiled

    if we are talking about checking if an object is no longer valid because columns or tables were renamed , dropped, etc,

    i've got this script i posted here on SSC...

  • RE: sp_send_dbmail sending duplicate emails to user

    i've seen the same on my side, with the default of one retry; an email with to: 'goodemail@somedomain.com;bademaul@somedomain.com' results in goodemail getting two emails.

    first thing to do is review who...

  • RE: How to sort columns.

    i would think youll start with a case expression, and then order by the tagname anyway as the second condition;

    how do you get the value "tagor1", for example? uis that...

  • RE: What is the best to remove xp_cmdshell calls from t-sql code

    i leave xp_cmdshell disabled by default , and have processes enable it, perform bcp via xp_cmdshell, and then disable again.

    you could perform bcp from a command line SQL job, and...

  • RE: Creating a Dynamic Temp Table

    how about not using #temp, but creating the table in tempdb instead? then it will still exist.

    DECLARE @cmd nvarchar(4000) = '

    SELECT schema_name(schema_id) As Schemaname,

    object_id,

    Name as TableName

    INTO tempdb.dbo.StagingTable

    from msdb.sys.tables...

  • RE: Send Multiple query results as multiple csv files in a single email

    SQL!$@w$0ME (4/1/2016)


    Thanks Lowell. Can you please provide the code for 'CLR_ExportQueryToCSV'.

    below is an updated version of it, i posted the original version of it on http://sqlclrexport.codeplex.com/ years ago.

    SQLCLRExport.zip

  • RE: Oracle BETWEEN DateTime statement

    you posted in "working with oracle", so i thought you were using oracle.

    if this is SQL server, then you would just stick with dateformats that are universally converted;

    you said you...

  • RE: Powershell To Get Active Directory Users And Groups into SQL!

    Ray Herring (4/1/2016)


    andre.quitta (3/31/2016)


    when I tried to run the code in Powershell, I got the following error.

    [font="Courier New"]Import-Module : The specified module 'ActiveDirectory' was not loaded because no valid module...

  • RE: Oracle BETWEEN DateTime statement

    pretty sure you have to use oracles TO_DATE function, especially because you are passing a string,and also using UK date formats.

    WHERE DateCreated BETWEEN

    TO_DATE('01/01/2016 00:00:00','dd/mm/yyyy hh:mi:ss')

    AND TO_DATE('31/01/2016 00:00:00','dd/mm/yyyy hh:mi:ss')

    the problem...

  • RE: Send Multiple query results as multiple csv files in a single email

    you'll need to have a separate process save each query to disk on the server, and then the email will not have a query, only attachments.

    i currently use a CLR,...

  • RE: Update trigger

    vijay_uitrgpv (4/1/2016)


    Thank you very much Lowell.

    Do we need to mention every column which is being updated in IF UPDATE statement ?

    Is there any way out if any column is updated...

  • RE: Update trigger

    great job posting your code and your work!

    The thing about triggers, is that they have a pair of psuedo tables named INSERTED and DELETED.

    Thos tables have the before and...

  • RE: User Account Control Restrictions message

    i cannot remember the exact error , it says something about UAC,and it's bit me in the past.

    i believe it's because you need to add the user in TWO...

  • RE: Need help with SQl syntax

    I think using a pattern like this will work: its saying the first two characters are A-Z, and then anything after that.

    Select top 100 RxClaims.prescriberId

    from MHPDW.TransferDB.[dbo].[RxClaims] RxClaims

    WHERE

    RxClaims.prescriberId LIKE...

  • RE: sqlcmd export tables with triple pipe

    yes it does.

    i export html from a database, via bcp, and need to use characters that are not going to appear in the data, becuase the classic terminators like CrLf,...

Viewing 15 posts - 1,126 through 1,140 (of 13,445 total)