Forum Replies Created

Viewing 12 posts - 496 through 507 (of 507 total)

  • RE: Problem with Dynamic SQL

    I actually had to solve this kind of problem a couple of weeks ago. I was modifying some package type software that always sends string type 'WHERE' clauses to...

  • RE: CSV file format export and leading zeroes.

    Rather than using the LEN function to determine the number of times

    to replicate your leading zeros, it might be simpler and easier to read

    like this:

    SELECT RIGHT('000000000' + CONVERT(VARCHAR, ),...

  • RE: Article on Importing Text

    Thanks. This one is very helpful. I hadn't thought about using OpenDataSource. It's not the post/article I was thinking about. The example was opening a text...

  • RE: Which one to compare 1'st string or integer in a where clause for better performance

    I normally use a set based solution with 2 passes for an UPSERT.

    Something like:

    UPDATE Tbl1

    SET Tbl1.SomeData = Tbl2.SomeData

    FROM Tbl1

    INNER JOIN Tbl2 ON

    Tbl1.PK = Tbl2.PK

    INSERT INTO Tbl1

    (PK, SomeData)

    SELECT Tbl2.PK,...

  • RE: how to find the parent

    If your data is always numeric and always only has 1 decimal it may be simpler to convert the data to numeric data types and then compare.

    Something like:

    SELECT ColumnName

    FROM Table

    WHERE...

  • RE: SQL Server 2005 Scripting

    Thanks. I tried it before and didn't notice an option for 1 file per object. Maybe I just missed it. I'll try it again.

    Todd

  • RE: SQL Server 2005 Scripting

    Thanks guys. This helps some. Is there any way to have each object script in a separate file?

    Todd Fifield

  • RE: Foreign keys good or bad practice?

    Wow! I never thought my first post on this forum would evoke so many passionate responses.

    I still think that my points on the type and number of applications accessing...

  • RE: sorting strings

    Here's a simple little function that will strip off the leading numeric values and return an INT that you can sort by. If the numeric leading digits aren't all...

  • RE: Formula in SQL query

    Your problem may with the the data types. SQL Server is not very friendly with divides of INT / INT.

    This will return 0

    DECLARE

    @Expense INT

    , @Income ...

  • RE: SET TRANSACTION ISOLATION LEVEL SERIALIZABLE

    The easiest way I've seen to handle this problem does not involve any sort of serialization. There should be a control table that contains the next number to use....

  • RE: Foreign keys good or bad practice?

    This is really a matter of what the database was created for. If there is only 1 front end application doing all of the inserts and deletes, there is...

Viewing 12 posts - 496 through 507 (of 507 total)