Forum Replies Created

Viewing 15 posts - 3,421 through 3,435 (of 13,460 total)

  • RE: Subscription Emailing report when it shouldnt....or when its not desired

    dndaughtery (5/21/2013)


    I have a datadriven subscription that uses a stored procedure.

    The code is below:

    declare @ReturnValue int

    exec @ReturnValue = s003pSRC.sp_Par_Rate_Compare_Report_Subscription_Condition

    select @ReturnValue ReturnValue

    I have run the sp in ssms 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: How To DISTINCT COUNT with Windows Functions (i.e. OVER and PARTITION BY)

    YSL I think i'd tackle it by changing one of the tables into a simple GROUP BY, that returns the distinct count inside it;

    something like this is syntactically correct, but...

    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: Count Words in Text Field and/or Column (frequency of use)

    at three pages and growing, sometimes it's hard to track down everything.

    this article has the Tally Table Definition and lot of usage examples:

    http://www.sqlservercentral.com/articles/Tally+Table/72993/

    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 Native Cleint and PB

    adeel.imtiaz (5/21/2013)


    Dear Gurus,

    How to the apply the ‘Auto Translate’ property of the SQL Native client (OLE DB) connection string in Power Builder 12.5 ?

    Thanks

    Malik Adeel Imtiaz

    I saw your other post...

    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: Very large table - performance issues

    Abu Dina (5/21/2013)


    The 2.6 billion total is after the insert of the 400 million.

    cool to have such big table, I'm actually a bit jealous, because it presents a lot more...

    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: Very large table - performance issues

    yeah i would have thought of statistics as the issue as well;

    ok we know it takes 20% of the rows int he table , + 500 rows to trigger auto...

    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: Trying to fire this off, but only if there are results...

    i think using EXISTS is a little better, and is what I would typically do:

    --does ANY data match the criteria?

    IF EXISTS (SELECT

    ...

    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: select records from a table where the records belong to fist clienname when ordered in ascending order of clientname

    also, something like this, with a simple subquery would work as well:

    SELECT * FROM MyTable

    WHERE clientName IN (SELECT MIN(clientName) FROM MyTable)

    ORDER BY clientName ASC;

    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: select records from a table where the records belong to fist clienname when ordered in ascending order of clientname

    are you familiar with Parameters yet?

    DECLARE @Client varchar(50)

    SET @Client = 'A123';

    --SELECT @Client = MIN(clientName) FROM MyTable;

    With MyCTE (clientName,col2,col3,col4)

    AS

    (

    SELECT 'A123','val1','val2','val3' UNION ALL

    SELECT 'A123','val4','val5','val6' UNION ALL

    SELECT 'B234','val7','val8','val9' UNION 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: Permissions problem running bcp

    here's an example of EXECUTE AS with a super user:

    now even as a super user, if you are trying to touch network shares or special folders , you might still...

    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: Import Excel File to SQL Server

    Very doubtful the below suggestion will work, as any 64 bit SQL machine requires the new ACE drivers.

    There are no 64 bit JET drivers, so unless you explicitly installed...

    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: Speed up updates by disabling indices

    terry999 (5/20/2013)


    Hi

    I need to update several tables which have the same field its a shopid.

    e.g.

    Update orders set Shopid =300 where shopid =3

    Shopid is part of indices.

    Will it make a...

    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 round,FLOOR

    the round function has an optional parameter for the # of decimal places;

    the Absolute value function converts any number to positive:

    /*

    -13599.99 as 13600

    162157.36 as 162157

    7415781.64 AS 7415782

    */;With MySampleData([myval])

    AS

    (

    SELECT '-13599.99' UNION...

    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 call JAVA class file in sql trigger

    Minnu (5/20/2013)


    sorry,

    bit communication GAP,

    i want to call .java files in sql trigger....

    Is it possible...?

    No you cannot, not directly,

    you have to call the operating system via xp_cmdshell to call 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: creating table for fiscal year

    softwareeng2010 (5/20/2013)


    hi all

    i want to create table for fiscal year in sql server 2012.

    the fields are :

    1-ID

    2-StartDate

    3-EndDate

    but i have some problems with ID column ,i want to set it for...

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