Forum Replies Created

Viewing 15 posts - 6,346 through 6,360 (of 13,460 total)

  • RE: Referencing partial primary key? Any way to solve it?

    only if you can put a UNIQUE constraint on that one column of the primary key;

    a foreign key (REFERENCES) can only point to a PK or UQ.

    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: Looping through Databases to fix orphaned users

    I've been using this to generate the 2008 style alter commands, instead of the deprecated? sp_change_whatever

    --USE HDSTEST1100;ALTER USER [hds] WITH LOGIN = [HDS];

    SELECT

    CASE

    ...

    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: Loop through multiple tables

    memymasta (11/23/2011)


    Lowell (11/23/2011)

    Your example involving user and Education tables is really at odds with an email campaign.

    here's a rough example i just sketched out that woudl use a cursor 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!

  • RE: sql 2008 r2 no server name

    the SQL browser service needs to be running, otherwise you'll have to "know" the machine name and instance name if it is a named instance...

    try any of these variations

    ...

    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_OAMethod returns -2147024894

    i know it's not much help, but that error number is an automation error..implying the DLL being called either does not exist or is not registered.

    http://social.msdn.microsoft.com/Forums/en-US/vbinterop/thread/7c5c16d7-4029-4b6f-9a29-55a1c27718b5/

    it kind of make ssense...

    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: User permissions to other login

    crazy4sql (11/23/2011)


    Easiest :-

    Create a group and give required permission.

    Add users A,B..............................Z to this group.

    Easy to manage, Easy to configure security, easy to remove.

    exactly...when UserA or UserB get fired or move...

    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: Loop through multiple tables

    memymasta (11/23/2011)


    Yes, i am aware of that. I am trying to build a mailing service for our customers, using database mail. A weekly report email that needs nested loops 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!

  • RE: View Execution Plans

    Stefan Krzywicki (11/22/2011)


    Anyone have a good way to view and compare execution plans? The display in SSMS is small and I can't view them side by side. Is there 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: Trying to determine fraudulent activity based on numbers dialed

    you probvably need to add more columns to the sample data;

    then you could use something like rownumber;

    here's a rough guess to get us started:

    SELECT * FROM (

    SELECT

    row_number() over(PARTITION BY...

    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 group and rank (with reset)

    a CTE of the posted data:

    WITH MySampleData(acd,R,drv,P,Led,LoadTime,RankingAndGrouping)

    AS

    (

    SELECT 199,183,9,0,1,00:00:53.1540000,1 UNION ALL

    SELECT 199,225,9,0,2,00:00:47.9960000,2 UNION ALL

    SELECT 199,267,9,0,3,00:00:47.8770000,3 UNION ALL

    SELECT 199,309,9,1,4,00:00:47.9990000,0 UNION ALL

    SELECT 199,350,9,0,5,00:00:48.0960000,1 UNION ALL

    SELECT 199,394,9,0,6,00:00:48.5890000,2 UNION ALL

    SELECT 199,437,9,0,7,00:00:48.2370000,3 UNION ALL

    SELECT 199,479,9,0,8,00:00:48.6120000,4 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: Loop through multiple tables

    best guess:

    SELECT .id,

    .firstname,

    [EDUCATION].school

    FROM

    LEFT OUTER JOIN [EDUCATION]

    ...

    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 all from 1 file and top from another

    Ninja's_RGR'us (11/22/2011)


    Yes we do, but a smiley face goes a long way to make that clear on a forum where we don't see your face nor tone of voice.

    how much...

    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: Flat File destination Ignoring decimals

    removing insignificant digits in an export is normal (3.00 is exactly the same as 3), since the assumption is, if you import "3" into a money datatype, it will be...

    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: Conerting a DateDiff Average time from an int to HH:mm:ss

    mnut (11/22/2011)


    Hi Lowell,

    I was hoping to do this in actually in SSRS expression builder. Is this not possible?

    Mike

    of course; the math is the same...integer math or modulus;

    something like

    CINT(Field!Value /...

    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 dcrypt a view

    try connecting via the Dedicated Admin Connection:

    http://msdn.microsoft.com/en-us/library/ms189595.aspx

    I believe all objects are decrypted for you when connecting via the DAC

    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 - 6,346 through 6,360 (of 13,460 total)