Forum Replies Created

Viewing 15 posts - 6,136 through 6,150 (of 13,460 total)

  • RE: How can I get a count of records from one table that have no related record in another?

    i think you want to use the NOT IN operator, right?

    SELECT COUNT(*)

    FROM IncidentRoles

    WHERE IncidentID NOT IN(

    SELECT RoleAssignment.IncidentRoleID

    FROM RoleAssignment

    WHERE IncidentRoleID IS NOT NULL)

    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 help w creating trigger.....

    here's a full working example; like gail said, don't use this for passwords, only for preventing casual review of the raw data:

    CREATE TABLE [dbo].[tbl1](

    ID INT IDENTITY(1,1) NOT NULL PRIMARY...

    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

    Steve Jones - SSC Editor (1/4/2012)


    you are right ,you know ,so if i want to create 2 servers and my servers have different data like google ,but if 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: need to encrypt and store passwords and store in urser table

    yes, there's a suite of optiosn available starting in SQL 2005.

    this is one of my favorite references for getting started in 2005 encryption:

    http://www.databasejournal.com/features/mssql/article.php/3714031/SQL-Server-2005-Encryption-types.htm

    http://www.databasejournal.com/features/mssql/article.php/3483931/SQL-Server-2005-Security---Part-3-Encryption.htm

    the simplest to use is EncryptByPassPhrase:

    --http://www.databasejournal.com/features/mssql/article.php/3714031/SQL-Server-2005-Encryption-types.htm

    -- EncryptByPassPhrase(@password,@DataToEncrypt )

    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: Doing inserts within a select statement?

    erikpoker (1/4/2012)


    Yes it can. Like i just described. Using a scalar-function inside the select like this:

    SELECT

    a.col1,

    getForeignKey(a.col2, a.col3) as foreignKey,

    a.col4,

    a.col5

    FROM table a

    And within the getForeignKey function i can use openrowset 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: I can not figure this out for the life of me. Please help

    on top of what sturner said about doing homeowrk, there's a logical error in there using a while loop.

    it's very possible that a database does not exist for every id...

    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: Quirky Update query...works on server ...fails on PC.

    i tested it on 2K5 and 2K8, with ARITHRABORT on and off in both instances(thinking that might be the issue) , and couldn't get it to throw the error;

    my machines'...

    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

    bijarcity (1/2/2012)


    you know i didn't exactly understand?

    imagine you want to create a search engine like google.

    we have a lot of queries and these queries can't execute in one servers ,so...

    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: stripping comments from the definition in sys.sql_modules

    OK I'm thinking a *little* straighter on how to do it, but i'm not that close.

    i can use a Tally table method to get the comments from the definition of...

    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

    there is a variant of SQL 2008 R2 called "parallel Data Warehouse", you can read a bit more about it here:

    http://www.microsoft.com/sqlserver/en/us/solutions-technologies/data-warehousing/pdw.aspx

    and it uses Massively Parallel processing, which is in theory...

    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: Clustered Index on VIEWs

    DBA Rafi (12/31/2011)


    I knew that when we create a Clustered index on a VIEW. it would be stored in the database as table is.

    My Query is:

    what happened when changes 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: Trigger

    I see the same thing Gail does...that's looking like an ORACLE trigger;

    SQL triggers handle all the rows at the same time,and not for each row via the specially materialized INSERTD...

    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 Editions without SQL Agent

    ByronOne (12/30/2011)


    Are there any SQL editions that don't come with SQL Agent? Specifically does it come with the Compact edition and if not can it be added in anyway?

    Cheers

    Compact Edition...

    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: Problem with a simple Scalar UDF

    i think this minor modification will do what you are asking; instead of returning a datatime, i changed it to returnt eh varchar(10);

    inside it it's using convert twice, once 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: MSSQL Server 2008 R2 not being connected via ip address.

    its not R2 that is the problem, its connecting to the instance.

    since you can connect via name, we know you already allowed remote connections.

    to get to an instance, instead of...

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