Forum Replies Created

Viewing 15 posts - 256 through 270 (of 314 total)

  • RE: A record exists in table

    This is how I have done it.

    If Exists (Select 1 from TableName where ColumnName = @s_ParameterName)

    Begin

      Select 'Exists'...Keep doing what Exits Part

    End

    Else

    Begin

     Select 'Not Exists'..Keep doing Non Exists Part

    End

    Thanks

    Sreejith

  • RE: text file with inserts and updates

    If you have valid SQL statements in the the text file you can execute it by using one of the ways:

    1.Set up a DTS to load the Text file in...

  • RE: SQL Mail not working

    Is the SQL Agent set to startup using a domain account? IF you so you need to logon to SQL Server with that account and configure "OUTLOOK" profile. xp_sendmail uses...

  • RE: Transaction logs Bigger Than Data files

    why was the transaction log build that way? Need to find the reason from the "consultants". Do you have long running Xaction? How is the Xaction log set up. If...

  • RE: Controlling Jobs

    Joe,

    Have you thought about what will happen if the "REINDEX" within the loop takes 2 hours? SQL will issue the REINDEX and wait for it to be completed so your...

  • RE: Changing Font for query output

    I don't think there is a way to do that using xp_sendmail. I am interested to see if any one comes up with the idea.

     

  • RE: Query dfinition help

    You can use subselect too:

    Select * from table1 where PERMIT_ID not in (SElect PERMIT_ID from table1  where table1.PERMIT_EVENT_DT  is null)

    Thanks

    Sreejith

  • RE: Strings in sql queries

    FYI 1 lak is 100 K.100K should not take long to process.

     

  • RE: Need help with complex query

    Can you post your query.. Thant might help.

  • RE: This View is Shocking ! Can it be Improved ??

    It will really help if you can summarize the data (specially if you have 10 mil + rows).

    Thanks

    Sreejith

  • RE: Begin Transaction

    did u try running the the sp with the first parameter manually and then run the send call manually and see if you have the appropriate "Commit" or "Rollback Tran"?

    That...

  • RE: How convert UNICODE integer to date

    Can you tell me what "1157472771" should translate to? Cos u cannot convert that to date.

    Thanks

    Sreejith

  • RE: Case Statement in Where Clause

    This should work.

    create PROCEDURE GetPriceRange

    (@Range varchar(4))

    as

    Begin

     Declare @PriceFrom decimal(10,2),

      @PriceTo decimal(10,2)

     Select @PriceFrom = Case   when @Range = '100' Then 100

             when @Range = '300' Then 200

             when @Range = '500' Then...

  • RE: Case Statement in Where Clause

    I Forgot to add Declare part.

    create PROCEDURE GetPriceRange

    (@Range varchar(4))

    as

    Begin

     Declare @PriceFrom decimal(10,2),

      @PriceTo decimal(10,2)

     Select @PriceFrom = Case  when @Range = '100' Then 100

         when @Range = '300' Then 200

         when @Range = '500' Then...

  • RE: Case Statement in Where Clause

    Try this:

    create PROCEDURE GetPriceRange

    (@Range varchar(4))

    as

    Begin

     Select @PriceFrom = Case  when @Range = '100' Then 100

         when @Range = '300' Then 200

         when @Range = '500' Then 400

         when @Range = '700' Then 600

         when @Range...

Viewing 15 posts - 256 through 270 (of 314 total)