Forum Replies Created

Viewing 15 posts - 7,531 through 7,545 (of 8,731 total)

  • RE: Need Advise...

    Here are some ideas using T-SQL.

    WITH SampleData(String) AS(

    SELECT 'LAT|BOX|5290113661|BP9744524|PHY|JAI|GREWAL|1|BI|Vacc Bill|MED|191.2||SHI||20131015|50242006001|||||6|116820411||' UNION ALL

    SELECT 'LAT|BARDI|TAMMY|20020 44th|PHY|MARK|MORADI|BI|Vacc Bill|MED|183.0||SHI||20131016|50242006001|||||6|116899590||' UNION ALL

    SELECT 'LAT|ARRE|SONIA|344 RICH|PHY|IAN|HANT|1|BI|Vacc Bill|MED|153||SHI||20131016|50242006|||||3|116786607|')

    SELECT String,

    LEFT( String, CHARINDEX( '|PHY|', String)) AS LAT,

    SUBSTRING( String, CHARINDEX( 'PHY|',...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: How can I handle the following query ??

    There might be several ways to go, but here's an option using a recursive query on a table-valued function. Before implementing this solution, be sure to understand what's going on...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: SQL2008 - Is there alternative to cursor to address my need?

    If you're looking for ideas, this phrase by Jeff Moden might help you.

    First step towards the paradigm shift of writing Set Based code:

    Stop thinking about what you want to...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: SQL2008 - Is there alternative to cursor to address my need?

    If you give the Stored Procedure code and the cursor code, we might be able to give a better solution. You should give DDL and sample data as well to...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Pull value if two tables have entry based on a third table.

    This is just a shot in the dark. It might be wrong but the information you gave is limited. Could you post DDL and sample data as well as expected...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Verifying syntax before running the query

    Why don't you just simply add the top 1? It seems like a good idea.

    SQL Server will ignore other conditions if 1=2 is present, since it will know that the...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Verifying syntax before running the query

    I'm not sure if it's of help, but SQL Server won't throw an error for DateField = '31/31/2013' if the table doesn't exists because it will treat it as a...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Concatenate by Grouping

    It's the same way, but you should read the article (it's not long) to understand how does it work.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Are the posted questions getting worse?

    Ed Wagner (10/28/2013)


    Sean Lange (10/28/2013)


    Luis Cazares (10/28/2013)


    Rating someone on an average for all SQL Server is not a great idea. I could rate myself high on developing T-SQL, but not...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: accurate ticket times

    To get better help, please read the article linked in my signature, it will tell you how to post DDL, sample data and expected results in the way someone can...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Are the posted questions getting worse?

    Rating someone on an average for all SQL Server is not a great idea. I could rate myself high on developing T-SQL, but not on DBA or ETL stuff. It's...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Select and compare doesn't bring correct results.

    Maybe you're facing some problems with NULL values.

    For more information: http://sqlinthewild.co.za/index.php/2010/02/18/not-exists-vs-not-in/

    Example:

    WITH TableA(IP1) AS ( SELECT '10.1.1.20' UNION ALL SELECT '10.2.00.21' UNION ALL SELECT NULL),

    TableB(IP1A) AS (SELECT '10.1.1.20' UNION ALL SELECT...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Fill up position numbers

    Using SQL Server 2005, there's an interesting and really fast way to do it. You should read all the explanation and be sure to understand it before using it. You...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Working with a Very Poorly Designed Database

    lnardozi 61862 (10/25/2013)


    Just a thought - category1 thru category5 could just be computed fields. You already have all the information you need in Score.

    I'm sure that Andrew can't change the...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Are the posted questions getting worse?

    I'm losing faith in humanity here as I've been interviewing some candidates for BI developers at my job. The last one claiming to have 8 years of experience as .NET...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2

Viewing 15 posts - 7,531 through 7,545 (of 8,731 total)