Forum Replies Created

Viewing 15 posts - 1 through 15 (of 52 total)

  • RE: help wit "IF" sub query

    It may not be the bet way to do this, but the following may help: (Set variable @a to 1 and you will get 1 row, leave it...

  • RE: Best Way to Calculate Age

    for me 1 & 2 return the correct age as I have had a birthday this year. For a birthday later in March then only Option 2 gets it...

  • RE: stepping into sprocs with VS2005, what to use for a bit datatype?

    you could try 'true' or 'false'. I don't know if this will work but...

  • RE: Retrieve all rows from 2 tables, but they don't have a common key ?

    This does the trick:

    select isnull(a.SerialNo,b.SerialNo) as SerialNo

    ,a.Country as 'TableA.Country'

    ,b.Country as 'TableB.Country'

    from Tablea a

    full join Tableb b on a.SerialNo = b.SerialNo

    order by isnull(a.SerialNo,b.SerialNo)

  • RE: advanced (for me) SQL Query :)

    select vvm.External_Value

    from v_valueconfigurationItem vvc

    join v_valuebrand vvb on vvc.Brand = vvb.Text

    join v_valuemapping vvm on vvb.ObjectId = vvm.InternalValue

    Where vvc.Brand = 'Hewlett Packard'

     

    ought to work

     

    S

  • RE: Please confirm

    if you wish to view the data that has been added to the table but not yet committed you will need to execute a "dirty read" ie. select * from...

  • RE: Auditing

    Why not use the following in a trigger?

    create trigger <name>

    after Insert, Update

    as

     

    If update(Your Columm)

        begin -- do your auditing

        end

    else

    return

     

    Then you can audit only for those columns you are interested...

  • RE: Table Datatype

    yes you can

    You can use it in the same way as a temporary table or a permanent table.  there are limitations of table variables (see BOL for details) but they...

  • RE: Error in VB script used in SISS package ??

    try

     

    Set fso = CreateObject("Scripting.fileSystemObject")

     

    and see if it works any better I don't think you need to reference the Server

     

    S

  • RE: What is difference between != and operators ?

    According to Books Online, and an Execution Plan, there is no functional difference between the two expressions.  However <> is the ANSI 92 compliant version, so I suppose it is...

  • RE: Linking rows

    Hi,

    Thanks for that, it helped me a lot.  Sorry for the tardy acknowledgement.

     

    S

  • RE: Linking rows

    sorry,

    That was the expected result set - I am trying to generate the final (Linked) column.  This is very much a small result set - as I say, we are...

  • RE: Help with this query plz?

    I'm sure someone with a bigger brain than me could come up with a better solution, but the following does the trick.  you could turn the loop into a function...

  • RE: Error converting varchar to float

    I may be missing something, but I would convert to a decimal with a precision of 5 decimal places, so you end up with something like this:

    set nocount on

    declare @myTable...

  • RE: TSQL - Inner Join

    This works in a fairly unpleasant sort of way:

     

    declare @id int

    select @id = min(id)

    from #tab1

    while @id is not null

    begin

     insert into @tab

     select  top 2 a.Name,b.Company

     from #tab1 a join...

Viewing 15 posts - 1 through 15 (of 52 total)