Forum Replies Created

Viewing 15 posts - 7,606 through 7,620 (of 13,460 total)

  • RE: Help needed with SQL command

    c.reusch (5/10/2011)


    Hello,

    I have a table:

    AccountNo, Period, Amount

    100, 11/02, 100

    100, 11/03, 110

    100, 11/04, 120

    110, 11/02, 50

    110, 11/05, 70

    Now I want to have the latest datasets (No. 3 and No. 5). 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: single column data spit into multiple columns to another table

    the only way i think it's going to work is if you know each element is fixed width, then you can use a substring function to pull out each element.

    I've...

    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: Order of Tables in a Query

    I've heard the same as tyson price, that for SQL server, the order of the joins don't matter, because the optimizer will change the order based in the execution plan...

    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: Date issue

    something like this should work:

    SELECT distinct TOP (100) PERCENT

    FUTURA.dbo.V_ANSCHRIF.ANS_NUMMER AS STORE,

    FUTURA.dbo.V_ANSCHRIF.ANS_NAME1 AS STORE_NAME,

    FUTURA.dbo.V_ANSCHRIF.ANS_PLZ_ZUSATZ AS NUMBER_OF_POS_IN_STORE,

    POLLING.NUMBER_OF_POS_POLLED,

    POLLING.LAST_DATE_OF_SALES,...

    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: some questions ??

    Sean Lange (5/9/2011)


    BitBucket - You need to know about this site.

    This is the perfect link for a response to this thread.

    😀

    Personally, my favorite resource of all time!

    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: Server change

    sounds like they have already beein imported; maybe you ran the script twice accidentally.

    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: Server change

    there's no need to restore master on another server if you are migrating logins.

    you would only restore master on the same server if you were doing disaster recovery.

    simply...

    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: Delete Validation of Master Record

    so no business logic? just if a record exists, refuse deletion?

    in that case, you don't need to do anything, really...just try and delete, and if it fails due to 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: delete tables w/ 0 rowcount

    something like this looks like it will work to me:

    I'm gneerating a list of tables that are either the HEAP index or the clustered index shows zero rows

    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: sp_WhoIsActive , quick question from newbie...

    John I downloaded the proc and put it on my dev server that i know is fairly busy, and even with those two bits turned on, I couldn't get 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: Complicated join...

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


    I'll let you figure this on out... or correct lowell's typos :w00t:. Yes uncalled-ish for ;-).

    😀 only uncalled for when it's not true!

    anyway, fix the syntax issues in...

    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: Complicated join...

    mikeincape (5/9/2011)


    Ahhh Ha!

    Ok.... Runs fine on my server. Must be from using the express version on my local pc...

    [fist pump] YES!!!!

    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: Server change

    SKYBVI (5/9/2011)


    Should the logins be transferred before or after the restoration of system and user dbs.

    Regards,

    Sushant

    the order really will not make any difference, as long as both are completed before...

    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: Complicated join...

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


    It's definitely possible, but if he could run my create db code, then I don't see why it would fail there (never seen that before).

    The only thing I can...

    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: Complicated join...

    mikeincape (5/9/2011)


    Yes... This gives me the dataset I need. Thanks!... Still getting that weird error though... Any Ideas?

    Ninja's is going to kick me for repeating what he already proved wrong...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!

Viewing 15 posts - 7,606 through 7,620 (of 13,460 total)