Forum Replies Created

Viewing 15 posts - 16 through 30 (of 272 total)

  • RE: Please Provide me suitable solution

    For these kinds of highly detailed specifications, my hourly rate is $300.00/hr (USD) open ended.

  • RE: Insert into two different tables

    You could set up an insert trigger on the first table.

    But what you probably really want is to insert into both tables within a single transaction using...

  • RE: Date Conversions

    Great question.

    SQL noir: Things aren't always what you expect.

  • RE: creating SP help needed

    Days in a month (assumes current month):

    DECLARE @ThisDate DATE = GETDATE()

    select datepart(dd,dateadd(dd,-1,dateadd(mm,1,dateadd(mm, datediff(mm, 0, @ThisDate), 0)))) -- Number of days in the current month

    It looks like...

  • RE: Backups

    I fell victim as well and answered tempdb, but I learned something.

    I don't feel so bad seeing that lots of folks answered the same.

  • RE: Master Keys

    These sorts of questions always make me wonder if what I think I know is correct.

    Why would there more than one "master"? Seems like a simple question, but what...

  • RE: txt import

    Steve Jones - SSC Editor (5/24/2012)


    Steve Cullen (5/24/2012)


    Just my opinion, but I think bcp would be simpler for this. The fixed width format file can be generated quickly from...

  • RE: txt import

    Just my opinion, but I think bcp would be simpler for this. The fixed width format file can be generated quickly from a staging table and a novice won't...

  • RE: parse string

    Jeff Moden (5/15/2012)


    pnpsql (5/15/2012)


    thanks to all , now i do it my way can you please help to shorten this code

    declare@STRvarchar(20)= '[p]a]a]s]s][p'

    declare@posint

    select@pos= charindex('[',

  • RE: How to change NULL into a value when executing a FETCH

    RBarryYoung (5/15/2012)


    Jeff Moden (5/15/2012)


    RBarryYoung (5/15/2012)


    Eugene Elutin (5/15/2012)


    jonas.kasper (5/15/2012)


    Yes I do...

    I am creating a job that will send emails every morning showing different data that has occured during the last day....

  • RE: Need help creating case statements from a query.

    Why don't you simply join to the lookup table?

    Why do you need a case expression at all?

  • RE: Need help creating case statements from a query.

    Just because we can generate a case statement, doesn't mean we should.

  • RE: Need help creating case statements from a query.

    If I read your question correctly, you want to generate the query. I've setup the table :

    CREATE TABLE EmploymentStatus (ID int PRIMARY KEY NOT NULL IDENTITY(1,1),

    ...

  • RE: Data question?

    You can filter dates and exclude null values.

    ... WHERE dateordered IS NOT NULL

    AND (shipped_on BETWEEN @Start AND @End)

  • RE: Add a new user

    You could use the Create Data Reader User template. It will create a login, set a default database, create the user and add db_datareader privileges.

    In the view menu, select...

Viewing 15 posts - 16 through 30 (of 272 total)