Forum Replies Created

Viewing 15 posts - 5,446 through 5,460 (of 13,460 total)

  • RE: SQL CLR Issue - TimeZoneInfo Class

    the key is to look in the Output window for the issue:

    i built a new project with your code, changed it to External and tried to deploy.

    i had the wrong...

    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: Database mail configuration

    Manie the key is the specific error messages you see in msdb.sysmail_faileditems.

    take a look at the data from this SELECT statement:

    are all the err.[description], basically the same? what is 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: Zeroing out bad block?

    bad idea. bad bad.

    first, don't do anything like take the database offline or anything without expert advice; Gail Shaw monitors this forum frequently..

    run DBCC CHECKDB('db name') WITH NO_INFOMSGS, ALL_ERRORMSGS and...

    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: Foreach vs set for Database mail stored proc. Is it possible to send many messages with 1 statement?

    there's no way, as far as i know, to use dbmail in a set based mode;

    sending individual emails is one of the places I think a cursor is no problem....

    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: HTML Report using T-SQL

    you simply want to use a case statement;

    something like this:

    ---

    N'<th>Total Space(in GB)</th>'

    + CASE

    WHEN [FreeSpace] <= 90.0

    THEN N'<th><span style="color:#FF0000";>Free Space(in GB)<//span></th>'+

    ...

    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: cannot resolve collation conflict for equal to operation

    i'm guessing that the cross database call to a date formatting function is the culprit. the otehr database has a different collation.

    try this (collating the function value) as the first...

    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: Need Stored procedure for getting all dates falling on saturday for the given year

    although this solution will require a table scan, since the function on the column Name makes this non-SARG-able, this will work too:

    select * from YourTable where DATENAME(dw,TheDate) = 'Saturday'

    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: Attach Database failed for server 'M3'

    If I was ever dropped into this kind of situation, I'd hire Gail as a consultant - by - remote in a heartbeat, even if the money came out...

    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: Having issues using BCP command to create file

    also consider that it sounds like you can skip bcp completely;

    sp_sendmail has the option to include commad delimited results, including headers as an attachment.

    here's a code sample:

    EXEC msdb.dbo.sp_send_dbmail

    ...

    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: Having issues using BCP command to create file

    latingntlman (5/29/2012)


    Thanks, Lowell.

    I went with option one and after some tweaks, I have my temp table. Now, I'm getting ready to exec EXECUTE master.dbo.xp_cmdshell but I can't find this anywhere....

    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: Having issues using BCP command to create file

    bcp doesn't add headers, so you have to do it manually.

    here's two examples i keep onhand for that:

    --BCP to get headers

    --Version 1: global temp table

    --note i'm making sure my headers...

    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: Help with table constraints

    can't see a reason for the calculated persistent column;

    here's my prelim version of your schema, based on what you posted:

    by making the column not null, with a foeign key,...

    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: Limiting the records?

    well it looks like it can be done without the cursor and also without the dynamic SQL;

    this SELECT is the section that would be doing the INSERT;

    how many rows does...

    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: Limiting the records?

    well the details are certainly different now that the DDL is posted.

    the DDL details you posted is doing an Insert, not an update, and it's not joining on five...

    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: Limiting the records?

    Charmer (5/29/2012)


    GilaMonster (5/29/2012)


    Charmer (5/29/2012)


    i googled for checking 'update top' command....but it is like "update top 100 table set column = value "...

    Yup, that's the command.

    oh....but i am not sure how...

    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 - 5,446 through 5,460 (of 13,460 total)