Forum Replies Created

Viewing 15 posts - 7,636 through 7,650 (of 13,469 total)

  • RE: Complicated join...

    something like this, maybe?

    SELECT

    cl.RecordStatus,

    cl.ActiveClient,

    cl.SystemEffective,

    cl.Firstname,

    cl.Lastname,

    cl.MiddleI,

    cl.SSN,

    cl.ClientID,

    cl.City,

    cl.State,

    cl.Zip,

    cl.HomePhone,

    ...

  • RE: Server change

    for migrating logins, there's a script directly from microsoft you'll want to search for:

    sp_help_revlogin

    there are different versions for SQL 2000 and sql 2005, maybe a different one for 2008/2008R2, which...

  • RE: Delete Validation of Master Record

    you could define the optional ON DELETE CASCADE options of the foreign keys to do the delete (or setting to NULL) automatically for you, but i'm not sure what the...

  • RE: Hexadecimal value to Decimal value

    i don't get 287121 from the conversion.

    /*--Results

    0x4100014259841

    */

    select 0x410001,CONVERT(INT,0x410001)

    the problem is without the 0x to identify that it is HE, you'd need to know/infer that the 410001 is hex...

  • RE: SQLRally Orlando 2011!

    I'll be there as well;

    I'm also attending Grant's pre-conference sessions on Wednesday.

  • RE: Creating a new View - Combining columns

    Ninja's_RGR'us (5/9/2011)


    CASE

    WHEN axxia01.dbo.nmnomtrn.nt_addesc = 'N'

    THEN axxia01.dbo.nmnomtrn.nt_trdesc,

    Remove the comma at the end of that last line

    yep i created the SQL without testing...

  • RE: Creating a new View - Combining columns

    good job explaining what you wanted;

    try this SQL below adn see if this gets the data you were looking for:

    SELECT

    dbo.nominal_narratives.narr,

    dbo.nominal_narratives.nt_seqnum,

    dbo.nominal_narratives.nt_accode,

    axxia01.dbo.nmnomtrn.nt_addesc,...

  • RE: Custom Sort Order / Casting Date to Text

    i would order by datetime, and never convert.

    you could use the COALESCE function to get the order you want i think; that would be the easiest:

    ORDER BY COALESCE(ArrivalDate,BookingDate,DepositDate)

  • RE: CREATING TRIGGER

    hemanth T (5/7/2011)


    Hi Lowell,

    I tried your code for my trigger.It is working fine.

    Thank you for your valuable suggestion.

    Hemanth

    ....................................................................................................................................................

    Glad it helped you build your trigger!

    Understanding the relationship between the INSERTED...

  • RE: "Subquery returned more than 1 value" error when querying linked server

    darn; i was guessing you were appending a WHERE statement...

    ok how about the REPLACE?

    this section:

    Replace(URL.URL,'{0}',RTRIM(CL.ClientID)) as LOB_CompanyRecord,

    uf Url.URL has one row, but CL.ClientID has multiple rows, that oculd cause the...

  • RE: "Subquery returned more than 1 value" error when querying linked server

    something is missing;

    the error raise typically occurs when you assigning a variable' like SELECT SomeVar = SomeOtherField,

    or in a WHERE statement... WHERE SomeVar = SomeOtherField,

    JOINS on field = otherfield...

  • RE: Any SQL Server 2008 R2 Best Practices Documents

    Most best practices for previous version of SQL are still valid, of course, so don't limit your searches jsut to 2008 R2.

    there's several series of articles here on SSC for...

  • RE: Generate login account scripts for a specific database

    i think if you connect to a specific database and run this it might do what you are after:

    select 'EXEC sp_help_revlogin ' + name

    from sys.database_principals

    where type_desc IN ('SQL_USER','WINDOWS_USER')

    and...

  • RE: execute trigger problem

    sounds like a problem with the trigger; paste it here and we can give you some better input on identifying the issue.

  • RE: Table valued Function Performance

    this is the lsit of tables used int he query; can you try this update statistics command?

    UPDATE STATISTICS [CWT] WITH FULLSCAN

    UPDATE STATISTICS [Calendario] WITH FULLSCAN

    UPDATE STATISTICS...

Viewing 15 posts - 7,636 through 7,650 (of 13,469 total)