Forum Replies Created

Viewing 15 posts - 61 through 75 (of 133 total)

  • RE: Lost SQL Server registrations

    i used to have this problem when my network password changed at my previous company - doesn't seem to happen where i am now though ...

    cheers

    dbgeezer

  • RE: Check if a file exists ...

    or you could use this

    declare @result int

    declare @exists bit

    exec @result = sp_MSget_file_existence 'C:\myfile.txt', @exists = @exists output

    print @exists

    cheers

    dbgeezer

  • RE: Append tables to view

    another idea might be to design/alter your tables to store all the records in a single table with a column that gives the month/year.

    if you altered the tables it may...

    cheers

    dbgeezer

  • RE: Dumb SQL question....

    i was going to suggest:

    SELECT su.sysuser_firstname, su.sysuser_lastname, sug.sysuser_id, sug.sysusergroup_id

      FROM sysuser_sysusergroup sug, sysuser su

      WHERE sysusergroup_id != '1'

      AND sug.sysuser_id = su.sysuser_id

      ORDER BY su.sysuser_lastname, su.sysuser_firstname

    for info != is the same as 'not equals...

    cheers

    dbgeezer

  • RE: Converting a varchar to real??

    as does:

    declare @ch varchar(10)

    set @ch = '23.467'

    select cast(@ch as real)

    cheers

    dbgeezer

  • RE: use exec or sp_executesql to build SQL dynamically?

    yes it does

    sp_executesql has more chance of using a cached execution plan whereas exec will not

    cheers

    dbgeezer

  • RE: Truncating the Log File

    check out the 3rd or 4th post down in

    http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=24&messageid=113369#bm113437

    do a backup and then shrink.

    the size of the transaction log will grow the 'busier' your database is. it should be...

    cheers

    dbgeezer

  • RE: Select from system object from the msdb database

    Whether it's secure or not is entirely your decision. You're the DBA. Select permission will stop him from screwing anything up but will more than likely show him things he...

    cheers

    dbgeezer

  • RE: Casting Time String

    if you can change the format of the input date this will work:

    select convert(datetime, '20040503 08:38:15.333', 13)

    13 is the correct codepage not 101 (mm/dd/yyyy)

    cheers

    dbgeezer

  • RE: Select from system object from the msdb database

    i don't know what do you think ?

    you could limit him futher to just the sysjobs(*) tables ...

    cheers

    dbgeezer

  • RE: Select from system object from the msdb database

    ask him what he needs it for.

    it's more than likely he'll be checking for the existence of a stored procedure or table. either give him read only access (once you've...

    cheers

    dbgeezer

  • RE: catch 22 query

    Point taken. Sorry about the messing about but I didn't have time to add any ddl. In future I'll make sure I post enough details.

    cheers

    dbgeezer

  • RE: catch 22 query

    Hi Dave,

    could you edit your posts please to remove the query. my boss told me he doesn't want any of the structure of the database on newsgroups.

    thanks

     

    cheers

    dbgeezer

  • RE: catch 22 query

    hmmm that one gave me a few errors - i did however fix it in the meantime with the following. the key was the inner select and then the ugly...

    cheers

    dbgeezer

  • RE: catch 22 query

    okay - this is the query i have

    had to remove the query - sorry

    your suggestion to add the max(Sequence) (bold) gives the following error

    "An aggregate may not appear in the...

    cheers

    dbgeezer

Viewing 15 posts - 61 through 75 (of 133 total)