Forum Replies Created

Viewing 15 posts - 11,746 through 11,760 (of 13,460 total)

  • RE: Why do people need to do this?

    clearly any data without an arbitrary number next to it is worthless! everyone knows that! how else do you know who's number 1, or to give a goals to numbers...

    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: Comparing procedures on different servers

    two things i think, but i could't get mine to work yet either.

    4 part naming conventions are the limit.

    select name FIVER.AHOG.dbo.sys.procedures is wrong

    its probably FIVER.AHOG.sys.procedures not what you had....i tried...

    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: Deleted files not freeing up space

    I'm not familiar with your application, but here's a best guess: if the "files" deleted are really tables in SQL, the space isn't released unless you shrink the database.

    can you...

    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: Need help to write sql statement

    must be an incomplete example...all your code that is commented out in your case statement returns c.SerialNumber1 NO Matter what....maybe you could show us a bit more?

    Case

    when a.DocumentId=...

    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: someone dropped tables

    try this; it gets the current default trace file, and gives the objects/created/altered/deleted.

    this might help you:

    [font="Courier New"]

    -- obtain file name for Default Trace

    DECLARE @TraceFileName  NVARCHAR(256)

    SET @TraceFileName = (SELECT path FROM sys.traces...

    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: Validating all the columns in a record

    ok this nippet, based on using some FOR XML statements goves a SQL statement you could execute that looks like this:

    SELECT * FROM MYSTAGE WHERE 1 = 2 ...

    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: Can I use Calced field in same query?

    paste your real full Select statement here...it looks like you have a column name with a space in it, so it needs to be wrapped in brackets, ie [commision cost]

    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: Need to change type of result column.

    your order by has to be the same...simply order by the same casting you did to get teh field itself:

    ORDER BY Tools.UUCBIM, cast(Tools.JOBNOF as varchar(12)), Tools.FITEMF

    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: Fully justified text

    everything you posted (that showed up...some stuff got snipped out)

    was related to a RTF field being justified. Are you trying to do the equivilent to raw text, or asking...

    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: Validating all the columns in a record

    wouldn't you simply identify the offending rows like this?

    SELECT *

    FROM YOUR STAGINGTABLE

    WHERE isnumeric(col1) = 0

    OR isdate(col2) = 0

    OR len (Row1.col3)>...

    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: Can I use Calced field in same query?

    yeah replace"big query here" with your full SELECT...CASE...WHERE... statement that you are using...you had pasted just the cASE section as your example.

    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: How many times is function invoked in where clause?

    Oh, I'm sure I've got tunnel vision on the issue, instead of understanding....my knee jerk reaction was that an IF statement would automatically void schemabinding, but that's clearly not...

    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: Can I use Calced field in same query?

    it's not obvious, but what you want to do is stick your query into a subquery, and use the where statement outside:

    [font="Courier New"]SELECT MySubQueryAlias.*,

    (MySubQueryAlias.New_Sell_price2

    - MySubQueryAlias.commision_cost)

    / MySubQueryAlias.New_Sell_price2 AS MYRESULTS

      FROM...

    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: How many times is function invoked in where clause?

    well it doesn't complaina s i expected it to;

    here's the way i thought it had to be, and then the way it thought would not be allowed with an "IF"...

    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: Default vs Customer-Specific Descriptions

    i ended up doing it a different way...i got a sub select of all default values cross joined against the customers, and then used a COALESCE to get the updated...

    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 - 11,746 through 11,760 (of 13,460 total)