Forum Replies Created

Viewing 15 posts - 121 through 135 (of 359 total)

  • RE: How can I pass parameters or variables into SQLCMD?

    i have provided you an example of one i did for work, you use this as an example t achieve your task.

    Create proc [dbo].[CSV_EXPORT] ( @path varchar(255))

    as

    /*

    Ref: TASK1082

    Name: Export_to_csv.sql

    Version: 1.0

    Author:...

  • RE: getting Email addresses from Text

    its not much better but here is another way that retrives any email address if its the last test in your string and has a space.

    select reverse(substring(reverse(Email_Address),0,charindex(' ',reverse(Email_Address))))

    from DBO.Email_Checker

  • RE: Need a Stored procedure

    i agree with Sean, however, this bit of SQL will do what you ask the reults are not that cracking though.

    create proc ping_test (@host varchar(100))

    as begin

    declare

    @exec varchar(1000)

    set @exec='EXECUTE master..xp_cmdshell...

  • RE: Need a Stored procedure

    do you really need to do this with SQL? what is the purpose of the ping? are you just checking to see if a server is pingable? perhaps a vbs...

  • RE: SQL ADVANCE COPY/MOVE AND RENAME FUNCTIONS

    Yes you can achieve what you want all from SQL, look up xp_cmdshell, you can use this to execute DOS commands to move and rename your files

  • RE: Using Openrowset to query Excel spreadsheet

    I had a similar issue to you i will see if i can find my old post for you, i was using 64 bit PC the problem is if you...

  • RE: Fire Trigger when stored procedure is created or modified.

    Here you go mate here is one i created to do exactly what you ask, dont forget to create the log table its in the comments, this SP will log...

  • RE: Merge issue

    Great thanks will give that a try 🙂

  • RE: Merge issue

    Yup thats right the update bit works fine its just the if not matched i cant get to work, if exists in source but not in target then insert into...

  • RE: Today's Random Word!

    crookj (1/2/2013)


    Daniel Bowlin (1/2/2013)


    In the immortal words of Uniblab

    "Back to work (click), back to work (click). Everybody ( click) work, work, work, work (click), work, work (click)."

    In the immortal words...

  • RE: Continually running SQL Trace

    Do you have any reason why you want to run these traces all the time? What do you want to achieve ? What's your task?

  • RE: Best way to sync two databases?

    are you looking for a ongoing solution or are you looking to do a one off sync? if its a one off then take a look at redgate software. Alternative...

  • RE: Alternative to xp_cmdshell

    do you have to do it through SQL server? why not use a VBS script and MS task scheduler

  • RE: Different execution plan between SQL and SP

    Its ok mate thank you for your help, its now working with the better execution plan.

    I re updated statistics a second time and this as appeared to Fix the issue...

  • RE: Different execution plan between SQL and SP

    Yup i still have the same issue

    if i run the SP like

    Exec SP_NAME parameter_value with recompile

    the SP run fine and uses the good execution plan

    if i run it with

    Exec...

Viewing 15 posts - 121 through 135 (of 359 total)