Forum Replies Created

Viewing 15 posts - 8,851 through 8,865 (of 13,460 total)

  • RE: How to use sp_send_dbmail to multiple users?

    the parameter @recipients for msdb.dbo.sp_send_dbmail expects a semicolon delimited list of recipients; there's no limit to the # of recipients, since it is a varchar(max) definition;

    so something like...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Running SQL Script - Make certain text mandatory

    I think this is data input validation that needs to occur on the asp page, and not at the server or even SQL server; a simple javascript alert is all...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: The most bizarre SQL issue ever

    maybe there is a database trigger that is causuing the issue, and not one on the table itself?

    --db level triggers

    select * from sys.triggers where parent_class_desc = 'DATABASE'

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: How to know what user created a table?

    if it's not in the default trace, which onyl keeps track of "whodunnit" information on DDL stuff for a limited time, and you do not have any other traces in...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: The most bizarre SQL issue ever

    I agree the issue is going to be the trigger....show us your audit trigger code; if both fields are money or decimal types, the error raised cannot be from the...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: parameters = NULL

    parameter sniffing.

    an execution plan is created when the procedure is created, and the SQL engine makes an assumption that since the default values are NULL, the best execution plan should...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: BULK INSERT a file produced from a UNIX machine - SQL 2005

    ok, I just realized that the shortcut command you needed was for {slash L}, not {slash R]

    ROWTERMINATOR =

    vbCrLf = CHAR(13) + CHAR(10) = \n

    vbCr = CHAR(13) = \r

    vbLf =...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Using xp_cmdshell

    why not just call the file directly? why do you have to do the cd command, when you know where the file is anyway?

    create table #Results (

    ID int identity(1,1) NOT...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: create role just for read

    Tara-1044200 (8/26/2010)


    can i create a sql role and add some users(50+) and give them only read access to all the databases in the server. What would be the best way...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Drop Table On Linked Server

    i have this CREATE TABLe in my snippets, so i would assume drop table works the same way:

    EXEC sp_addlinkedserver 'SeattleSales', 'SQL Server'

    GO

    EXECUTE ( 'CREATE TABLE AdventureWorks2008R2.dbo.SalesTbl

    (SalesID int, SalesName varchar(10))...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: how to get the results of a subquery as a commaseparated list

    this is completely untested, as you didn't provide the schema or sample data.

    note i'm assuming there is a column "remarksID" so the list of remarks can be ordered....only YOU know...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: TSQL Code syntax problem

    skcadavre (8/26/2010)


    Damnit Lowell! 😛

    we cross post each others same answers just a bit too often 🙂

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: TSQL Code syntax problem

    i don't think the CREATE USER command allows variables; you'd have to switch to dynamic SQL instead:

    declare @groupname varchar(50),

    @sql varchar(1000)

    SELECT @groupname =...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: find columns with null value

    scottichrosaviakosmos (8/26/2010)


    i have a table and i am writing a procedure. my table has a unique column eg:u_column .

    Now, i want to know on which u_column its which columns are...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: How to programmatically determine the default SQL Server collation for a Windows locale?

    you want to read the windows registry to get the collation before the installation, i think?

    I'm only sure of how to get it afterwards....maybe you could run a script to...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 15 posts - 8,851 through 8,865 (of 13,460 total)