Forum Replies Created

Viewing 15 posts - 4,726 through 4,740 (of 8,731 total)

  • RE: Creating Buckets For Sales Data

    Another option, just in case that you want to have your information returned in a different way.

    WITH Groups(GroupID, GroupDesc) AS(

    SELECT 1, 'Count Less Than 5K' UNION...

    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 to classify items in a database under two or more classifications

    Here's an example. I changed the code provided by Ed, not because of it being wrong, but because I don't like columns named simply ID and don't like identities 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: Migrating a 2005 dts package to 2005

    This article might help you:

    https://www.virtualobjectives.com.au/sqlserver/dts_sql2005.htm

    I hope that you already have the DTS Designer Components installed.

    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 to improve that query?

    Eirikur Eiriksson (7/10/2015)


    Puzzles me though that the last condition will never be hit as it is a subset of the first one, typo perhaps?

    😎

    It's more an optic illusion, as those...

    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 to shortening this sql code?

    It's possible, to do this using dynamic sql.

    The main problem is to know which are the possible values for INVENNO and what column name will they represent. If you 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: How to improve that query?

    For indexing, you could use something like this:

    CREATE NONCLUSTERED INDEX IX_Orders_Cover1

    ON dbo.Orders(Type, Status)

    INCLUDE (Value, Discount)

    The Type and...

    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: Migrate databases from SQL 2000/2005/2008 directly to SQL Server 2012/2014

    Using a 2008 Evaluation version would give you 90 days to complete the migration without having to pay a license.

    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: Import data from MSSQL to MYSQL

    Have you tried the import/export wizard to create an SSIS package and use that on your SQL job?

    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 to improve that query?

    That's probably the best way to write it, I'd just add and additional condition for Type IN(3, 4).

    Why do you want to change it?

    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: Query Performance tuning for cursor

    This procedure can be changed into set-based code. I just don't want to risk posting an incorrect solution and getting blamed for that as I don't have any sample data...

    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: Migrating oracle queries to SQL server.

    sgmunson (7/10/2015)


    Luis Cazares (4/22/2015)


    This can be done with a recursive CTE. You can find many examples on the internet.

    It should be something like this:

    WITH RCTE AS(

    select T1.a1, T1.a2, T1.a3,

    ...

    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: SSIS: handle '' as a NULL doing conversion for dates

    I can't remember if this is the exact syntax, but it should be something like this:

    TRIM( ENT_DATE] )=="" ? (DT_DATE)NULL(DT_DATE) : (DT_DATE)(SUBSTRING(ENT_DATE],1,4) + "-" + SUBSTRING(ENT_DATE],5,2) + "-" +...

    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: Variable declared for inserting the records is setting to empty from second execution onwards.

    This stored procedure is full of problems. The RBAR (Row By Agonizing Row) is extreme and I'm having some problems figuring out what you're trying to do.

    You need to find...

    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: Stored procedure never finishes running from SSRS report manager

    Have you checked that your connection settings are the same in both SSMS and SSRS?

    Have you used something to check where's the problem such as profiler or extended events?

    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: Validate only single date filed in the file in ssis

    p.shabbir (7/9/2015)


    You can also define that column as a date in the connection properties for the file and get the error in there.

    Either way, you're reading the whole file and...

    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 - 4,726 through 4,740 (of 8,731 total)