Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by GISql

  1. GISql

    ISNULL Problems

    Instead of: CASE "OtherAsset"."otherdescription" WHEN ISNULL THEN "OtherAsset"."othertype" ELSE "OtherAsset"."otherdescription" END Why not use: ISNULL("OtherAsset"."otherdescription", "OtherAsset"."othertype")
  2. GISql

    Sp_server_info & @@version differences

    sp_server_info reads information out of the spt_server_info table in the master database. This table should be updated when installing a service pack, etc. Apparantly this is not correctly done. @@version calls an extended stored procedure master.dbo.xp_msver. This checks the version of files...
  3. GISql

    Autonumbering in update per order

    Hi, I have orders with unique numbers. These orders have orderlines. How can I do an update query to update all order lines in a table to autonumber all lines from 1 to n? Background info: I have orderlines. Some have to be summed and combined to one order line. I get these plus others in a...
  4. GISql

    How to build special where clause based on parameter value?

    Ok, then i think that last option is easier to maintain and debug, but what about performance?
  5. GISql

    dynamic column without building sql string

    Of cource, that makes sense. Just one question: Is this faster than building a string in SQL?
  6. GISql

    Invalid character value for cast specification import error

    Are you using a different setup of your database and the decimal separator has changed from a . to a , or vice versa?
  7. GISql

    How to build special where clause based on parameter value?

    Ok, this is how I do it now. I just want to get rid of the whole "Let's create a nice query in a string and execute this in a procedure as if we can not do this in .Net code" I want a nice stored procedure that is easy to maitain, debug, etc. Not building a sql string. That's what I want a...
  8. GISql

    dynamic column without building sql string

    Why is this not normal? Ok, I can put these in a seperate table, but that's not the problem here. For the article different prices are used in different situations. That's why it's possible to have 5 different prices. The reason why this table is this way does not matter in this case, since the...
  9. GISql

    Better to split procedure?

    Yes, that's what I am doing now, but I was wondering if there is another better way then to use such a big SQL string build
  10. GISql

    How to build special where clause based on parameter value?

    Hi, I have a parameter called @Type. This parameter can have different values, like 'STOP', 'START', etc. Based on this value I have to built different where clauses LIKE when 'STOP' I have to set: "WHERE STATUS = 0", while when it's 'START' I have to set: "WHERE CHECKED_OUT = 0" What is the...
  11. GISql

    Better to split procedure?

    Hi, I have the following question: My SP has a paramter @GROUP_MODEL, and based on this value, a different query will be built, for example: IF @GROUP_MODEL = '1' begin set @sql = 'SELECT MO.MODEL_TYPE AS SORTGROUP_3, ' + 'Max(M.SORTGROUP_2) SORTGROUP_2, ' /*'''0'' AS...
  12. GISql

    dynamic column without building sql string

    Hi, I have a parameter called @version which can be 1, 2, 3, 4, 5 I have 5 columns in my table, price_1, price_2, etc. I have a stored procedure to get a price which has a parameter called @version So depending on the value, I have to get price_1, _2, etc. Right now I build an SQL string and...

Part and Inventory Search

Back
Top