Forum Replies Created

Viewing 15 posts - 1,141 through 1,155 (of 1,346 total)

  • RE: how do I set a UDfunction parameter as non-null

    Just have your function deal with a null using coalesce,

    Not knowing what your function does , this will return datein + 10 days.

    Select @output = dateadd(dd, coalesce(@inParam,getdate()),10)

  • RE: SQL statement with parameter and EXEC

    A long article about what your trying to do.

    http://www.sommarskog.se/arrays-in-sql.html

    2 ways to do it.

    Create a function that performs some sort parsing of the string.

    So like

    UPDATE TableX

    SET SomeColumn = @Value

    WHERE ID...

  • RE: Querry

    In EM when you right click on a table there are many options available to you.

    New Table,

    Design Table

    Open Table

    Full Text

    All Tasks

    Cut

    Copy

    Delete

    Rename

    Properties.

    Try all these options out to see what they do....

  • RE: Phone number format reference?

    I don't know of a list that has all the different phone formats.

    But IMHO, I would consider this a presentation layer issue, not a db issue.

     

  • RE: Identifying Fields for Clustered Indexes

    Some consider indexing more of an art than a science, it can be very challenging placing indexes on a table when sooooo many queries can be effected by those indexes.

    The...

  • RE: Return OrderId of row with Max OrderDate per ProductID

    What question are you asking of the database when you wrote your query?

    It appears to me your asking for all product id's for all orders and the order date where...

  • RE: Update Trigger Question

    To add onto noeld's comment,

    You really want to keep auditing as fast as possible, creating a solution as you requested would cause the transaction to be open longer causing...

  • RE: What program can I use to open the file of XML results?

    Not exactly sure what your asking here.

    Are you trying to present this data in a webform?

    Just want to look at it without the xml characters? there really is no way...

  • RE: Need SQL to CAST column as INTEGER

    What is the datatype of the ID column?

    Have you tried

    Select cast(ID as Integer) as ID, Desc AS 'Doman Name' from TBL_A order by 1?

     

  • RE: Reapplying Initial Snapshot

    What do you mean by reapply the Original. There is no original once the snapshot is posted, and transactions are distributed.

    Yes I believe you need to create a new snapshot.

    Also,...

  • RE: SQL statement with parameter and EXEC

    I said what U said.

  • RE: SQL statement with parameter and EXEC

    I have no idea why you would be writing code like this, but the replace function works well here.

     

    CREATE TABLE N (

    ID INT,

    strSQL VARCHAR (1000)

    )

    insert into N (id, strsql)

    select 1,...

  • RE: help comparing 2 tables

    That is exactly what a join is.

    -- Select All items from Table1 where there is no Equal value for column1 in table2

    Select *

    from Table1

    LEFT OUTER JOIN Table2 on Table1.Column1 =...

  • RE: SQL Query Again - Complex

    Insert into AnotherTable(BET_ID,BET_DATE,DRAW_ID,BET_TYPE,BET_NUMBER1,BET_NUMBER2,BET_NUMBER3,BET_NUMBER4,BET_NUMBER5)

    select BET_ID,BET_DATE,DRAW_ID,BET_TYPE,BET_NUMBER1,BET_NUMBER2,BET_NUMBER3,BET_NUMBER4,BET_NUMBER5

    from BetTable

    where BET_NUMBER1  in (@win1, @wind2, @win3, @win4, @win5)

      and BET_NUMBER2  in (@win1, @wind2, @win3, @win4, @win5)

      and BET_NUMBER3  in (@win1, @wind2, @win3, @win4, @win5)

      and BET_NUMBER4 ...

  • RE: help with sql 2000

    --Create temp table  to test out the query

    Create table temp (pk int identity, Test1 varchar(100))

    -- Insert into the Temp Table

    insert into temp (test1)

    Select 'icqrm006520050406142936mxfs100100985-ddpgw000020041209004511mxfs100088798'

    Union All

    Select 'icqrm006520050406142936mxfs100100995-ddpgw000020041209004512mxfs100088328'

    Union All

    Select 'icqrm006520050406142936mxfs100100995-icqrm006520050406142936mxfs100100995'

    -- Run the...

Viewing 15 posts - 1,141 through 1,155 (of 1,346 total)