Forum Replies Created

Viewing 15 posts - 3,241 through 3,255 (of 13,460 total)

  • RE: Sql Server doesn't use the right index

    John Mitchell-245523 (6/25/2013)


    Lowell (6/25/2013)


    also, i see a scalar function in the selection, so that will substantially slow things down...it looks like it's just formatting the data as 6 chars, maybe...

    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: Sql Server doesn't use the right index

    also, i see a scalar function in the selection, so that will substantially slow things down...it looks like it's just formatting the data as 6 chars, maybe 201306?

    lose the function...

    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 connect SQL SERVER 2012 EXPRESS ADVANCEd to a PROGRESS database ?

    you could easily add a linked server and connect to that.

    since you specifically mentioned 2012, you are probably running 64 bit, and so you need 64 bit progress drivers...

    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: SP producing an impossible error

    does the proc insert potentially multiple rows?

    is the proc generating a unique key value? a bad join in a SELECT statement could pass the not exists, but make...

    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: Data from two different databases

    Trainacomin (6/24/2013)


    I'm new to the forum so I hope this is the right place to ask this question.

    I have a production and an archive database. I want to create...

    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 records that match two criteria

    Matthew Darwin (6/24/2013)


    Try this:

    SELECT IDXMRN, Problem, Code FROM Diagnosis

    WHERE Code = '305.1'

    OR LEFT(Code, 3) = '491'

    Or have I completely missed the point, and you want the IDXMRN where there is...

    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: Does anyone have any script to view the creation date of an object in Transaction Replication in SQL 2008 R2, example an article (table)

    Jose do you mean object creation/modification, like what is available in sys.objects?

    SELECT

    name,

    create_date,

    modify_date

    FROM sys.objects

    ORDER BY

    modify_date DESC

    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: Script Out Database Mail Settings?

    mrrobsewell (6/24/2013)


    I love Powershell

    [void][reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo");

    $Server = "ServerName";

    $srv = New-Object -TypeName Microsoft.SqlServer.Management.SMO.Server $Server

    $srv.Mail.Script();

    That's interesting; i bet with some enhancements, that could do the same thing my script was;

    i see quite a few...

    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: SQL Linked Server to MySQL Problem

    I can certainly help here; my example here, at least for me, works fine, except i cannot get 4 part statemetns to work; i only see to get openquery stuff...

    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: Generate a table with all possibilities.

    maybe like this?

    With PossibleValues(ID,Val)

    AS

    (

    SELECT 1,'-1' UNION ALL

    SELECT 2,'0' UNION ALL

    SELECT 3,'a' UNION ALL

    SELECT 4,'b' UNION ALL

    SELECT 5,'c' UNION ALL

    SELECT 6,'d' UNION ALL

    SELECT 7,'e' UNION ALL

    SELECT 8,'f'

    ),ColumnLimits(ID,ColumnName)

    AS

    (

    SELECT 1,'Column1' UNION ALL

    SELECT 2,'Column2'...

    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: SQL express how many databases of 10 GB of space

    the theoretical limit is 32767, but i think it has more to do with disk space and memory capacity.

    http://msdn.microsoft.com/en-us/library/ms143432.aspx#Engine

    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: Global temporary tables as MYSQL named locks

    i think you could fix it easier with a design change;

    each attempt to contact, whether successful or not, inserts into a new table; a view gets added that shows 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: How can automate report from sqlserver to be sent on email everyday.

    tnnelzo (6/20/2013)


    It is always from the first day of the current month....to the current day

    and b.date_entered >=cast('2013-06-01 00:00:00.000' as datetime)

    and b.date_entered < cast('2013-06-20 00:00:00.000'as datetime)

    and when the month ends...

    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 can automate report from sqlserver to be sent on email everyday.

    tnnelzo (6/20/2013)


    Hello lowell,

    Here is the querry i run everyday,

    Select day(b.date_entered)Day_D, sum(a.despatched_qty), sum(a.val) from scheme.dgtable1 a, scheme.dntable3 b

    where a.order_no = b.order_no

    and a.product like 'Machines%'

    and b.date_entered >=cast('2011-05-01 00:00:00.000' as datetime)

    and b.date_entered...

    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 can automate report from sqlserver to be sent on email everyday.

    tnnelzo (6/20/2013)


    Thank you for your help...however i want to send this report in excel ..is there any way i can do that? thanks you so much.

    well, it depends.

    have you set...

    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 - 3,241 through 3,255 (of 13,460 total)