Forum Replies Created

Viewing 15 posts - 13,996 through 14,010 (of 14,953 total)

  • RE: Date Addition

    Having StatusID and Active in your Where clause is getting rid of any rows that would have 0 in them. You need to move those to the Join clause,...

  • RE: Table Constraints

    If you really want to do that, then have the insert proc use the current season only. That's a simple select statement for that column.

    But I have to ask,...

  • RE: Row_Number and Union query

    ganesh.salpure (4/28/2008)


    Also about the solution...

    "

    If you want to avoid that, either have the front end do the paging, or create a "permanent temp table" that includes some sort of connection...

  • RE: Date Addition

    create table dbo.Numbers (

    Number int identity (0, 1) primary key,

    Junk bit)

    go

    insert into dbo.Numbers (junk)

    select top 10000 0

    from sys.all_objects s1

    cross join sys.all_objects s2

    go

    alter table dbo.Numbers

    drop column junk

    go

    select dateadd(day, number, '1/1/1900')

    from dbo.Numbers

    That...

  • RE: user definition function parameters -database name- use

    If you only have a finite number of pre-defined databases, you could use an IF statement to accomplish this.

    CREATE FUNCTION fnGetKur(@date datetime,@exchange varchar(5),@type tinyint,@dbname varchar(30)) RETURNS float AS

    BEGIN

    DECLARE...

  • RE: Date Addition

    Numbers table is great for that kind of thing, but I also keep a Dates table. Good for things where you need special data in date ranges, like holidays...

  • RE: SSIS / DTS Export Slow when run from job

    I have a similar situation. An SSIS package that, when run in the dev studio, runs just fine and takes a couple of minutes, but when run as a...

  • RE: using regular expressions

    Glad you got it working.

  • RE: SQL Server management Studio using UDP 1434 and TCP 1433

    I've sometimes had to define an ODBC data source in Windows Control Pannel to force the use of a specific port. Have you tried that?

  • RE: using regular expressions

    Did you try the CTE version I just posted? It returns procs that don't have parameters, just leaves those columns null.

  • RE: Primary key vs NOT NULL unique key..

    It depends on how you want to use them.

    You can have both on the same table, just so long as only one of them is clustered.

  • RE: How to create one XML file for one employee having multiple records in table..

    Take a look at "For XML" in Books Online. That should give you what you need.

  • RE: pulling information about stored procedures without parameters quesy

    Check the reply I just added to your other thread (where you originally asked about regexes). That should give you what you need for this query as well.

  • RE: using regular expressions

    I'm not sure.

    I just tried running your exact query (just copy-and-paste into Management Studio), and it ran perfectly on my server.

    Try this:

    ;with Params (ParameterName, ParamType, Max_Length, [Precision],

    [Scale], Is_Output, OID)...

  • RE: Row_Number and Union query

    SELECT empid1,name1,joindate from emp where empid2=3

    union

    select empid2,name2,joindate from emp where id1=3

    Could be replaced with:

    ;with

    CTE1 (EmpID, Name, JoinDate) as

    (selectempid1,name1,joindate

    from emp

    where empid2=3

    union

    select empid2,name2,joindate

    from emp...

Viewing 15 posts - 13,996 through 14,010 (of 14,953 total)