Forum Replies Created

Viewing 15 posts - 10,936 through 10,950 (of 13,469 total)

  • RE: urgent help

    if the files are "in use", could it be that someone renamed database "D1" to another name?

    With the select * from sysdatabases, Can you check the filename column and...

  • RE: viewing who has seen the data

    a DML trigger tells you who CHANGED data...doesn't help with trying to find who SELECTED data.

    a DDL trigger tells you who CHANGED a table structure, , so it again does...

  • RE: table Variables as Parameters

    Carl, your example is for SQL 2008, right? I had previously understood that in 2008 you could use the table variables for parameters, and when i tested your code, it...

  • RE: Using a UDF to provide a value for an insert statement

    functions almost always need to be preceded with the owner/schema

    so either of these should work:

    Insert into newtable (trainingType, otherCols)

    values (dbo.fnType(@varcharType), OtherValues)

    or

    Insert into newtable (trainingType, otherCols)

    select dbo.fnType(@varcharType), OtherValues

  • RE: Contains() won't search certain words

    yes, there is a file that contains all the "noise" words that will be ignored.

    on my dev machine, you it is named "noiseENG.txt or noiseENU.txt , and resides in the...

  • RE: Looking for simple example of connecting to a 2nd SQL 2005 server

    glad i could help out; good luck on your project.

    when you have time, you should add how to add other types of linked servers to your snippets of code; it's...

  • RE: Looking for simple example of connecting to a 2nd SQL 2005 server

    that's easy; the views sysservers or sys.servers hold all the linked server information, so something like this would work fine;

    if exists(select * from sysservers where name='MyLinkedServer')

    BEGIN

    exec sp_dropserver 'MyLinkedServer','DropLogins'

    END

  • RE: Looking for simple example of connecting to a 2nd SQL 2005 server

    this might help too; sometimes you want an alias for the other server instead of it's real name:

    EXEC master.dbo.sp_addlinkedserver @server = N'MyLinkedServer',@srvproduct = N'', @datasrc = N'STORMSQL\SQL2005', @provider = N'SQLOLEDB';

    --...

  • RE: Looking for simple example of connecting to a 2nd SQL 2005 server

    hope this helps; here's a clean, simple example.

    on my network, from my local dev machine ,there is a named instance on another server that i can connect to via SSMS,...

  • RE: Not able to create sp

    you'll get much more out of this doing it yourself. there is more than one error in your code. Don't be afraid of making changes to it.

    Like almost all forums,...

  • RE: Using linked server (Access db)

    i think Carolyn's right; for reference, this is the exact syntax i use to connect to an access database; if the last command, sp_tables_ex works, you are set up correctly,...

  • RE: Not able to create sp

    kiranjanga2 (6/23/2009)


    error is below.

    (EXECUTE cannot be used as a source when inserting into a table variable.)

    there's your error. change your table variable to a temp table instead.

    looks like the lines...

  • RE: replace space ' ' from column

    the REPLACE command is what you want:

    SELECt Replace(columnname,' ','') As Columname from YourTable

    it might be hard to see, but the command is singlequote-space-singlequote for WHAT to replace, and is two...

  • RE: Forum best practice - quoting code

    Tom i don't think noncode is a valid descriptor; i think you need to use plain or text.

    i saved this from a post previously so i had the valid tags...

  • RE: converting lowercase to uppercase

    pradeep's suggestion for a trigger to uppercase the input would work, and you could force only the upper case values to be inserted with a slightly different constraint:

    Create table Patient...

Viewing 15 posts - 10,936 through 10,950 (of 13,469 total)