Forum Replies Created

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

  • RE: Client id which are link to any trading code

    in general, you'll see two ways to do this.

    you can use a

    SELECT * FROM TABLE1 WHERE [Client ID] in (SELECT [Client ID] FROM TABLE2 WHERE Trading_Code IN('ZBwhatever') )

    or you...

  • RE: 16 digit unique number

    i misread the original post;

    here's a sample from my snippets where someone wanted a unique alphanumeric, in order, ie AAA001 thru ZZZ999;

    the nubmer gets generated based on an identity.you could...

  • RE: 16 digit unique number

    how about an Identity using a bigint column that starts with the first 16 digit number ?

    create table #example( bigintID bigint identity(1000000000000000,1) primary key,

    morestuff varchar(30) )

    also why must it be...

  • RE: How to deploy a encrypted procedure on the client machine.

    remember SQL encryption is not all that strong, even in 2005, a simple Google search will allow anyone that can run a TSQL script see the un-encrypted text of something...

  • 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...

  • 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...

  • 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...

  • 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=...

  • 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...

  • 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 ...

  • 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]

  • 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

  • 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...

  • 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)>...

  • 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.

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