Forum Replies Created

Viewing 15 posts - 3,016 through 3,030 (of 3,543 total)

  • RE: SELECT from all tables in the database

    create table #temp (tablename varchar(250),[col_name] varchar(250),[col_date] datetime)

    exec sp_MSforeachtable @command1 = "insert into #temp select '?',[col_name],[col_date] from ? where datepart(year,[col_date]) = 2003"

    select * from #temp

    drop table #temp

  • RE: How old are you?

    quote:


    think it gets easier...

    Just more frustrating!


    Ah! but they're not teenagers yet

  • RE: How old are you?

    quote:


    babysitting is much harder then working


    And it doesn't get easier the older they get...

  • RE: How do I show row data as a single field?

    SELECTa.fk,a.dat+ISNULL(', '+b.dat,'')+ISNULL(', '+c.dat,'') as combined_dat 
    
    FROM(SELECT fk,MIN(pk) as pk FROM tablea GROUP BY fk) x
    LEFT OUTER JOIN (SELECT fk,MAX(pk) as pk FROM tablea GROUP BY...
  • RE: SQL aggregates including missing dates

    quote:


    I shouldn't reply when I don't have enough time to think about what I'm writing


  • RE: SQL aggregates including missing dates

    Two things,

    Firstly, the where clause is restricting your selection based on invoices when it should be on temp_date_table, eg

    where tt.invoice_date between '9/1/2003' and '9/30/2003' 

    Secondly,...

  • RE: "Ghost Cleanup"? Configuration?

    To confirm your observations, found this on TechNet

    quote:


    When you delete rows, pages, or extents in your database, SQL Server can mark...

  • RE: White Board, Flip Chart, or Notepad?

    Another nice topic Andy. I have used all types in different ways in different situations. I must admit I tend towards whiteboards for their versatility and either tranfers the contents...

  • RE: xp_cmdshell fails and returns 255

    Ummm, forgot about that. Either use a separate connection or check to see if your logic can be changed.

    In some of my apps I do similar where I do multiple...

  • RE: Receiving Results Set in Body of email

    Without seeing the proc code, it looks like it sends the contents of the @body parameter as the body of the email and not the results of the query.

    xp_sendmail is...

  • RE: Bulk Insert from CSV problem

    As far as I know bulk insert and bcp will not remove quotes. DTS gives you the choice. Alternatively write a query after the bulk insert to update columns removing...

  • RE: ODBC Connection failure.

    Also suggest SP4, I know it fixes some comms errors but not sure about link failures.

  • RE: select the 1st or the last row in a group

    Do you want each last day of each month or the last entry for each month?

    e.g if date is

    saleDate salesAmount

    2003-01-31 35.92

    2003-02-28 77.23

    2003-03-28 145.88

    do you want it to show

    2003-01-31 35.92

    2003-02-28 77.23

    2003-03-28...

  • RE: using a script to move data

    Let me see if I have got it this time. You are currently exporting each mdb from each client to excel on a common share that sql can see as...

  • RE: using a script to move data

    No sure if I understand fully but why not change access db's tables to linked tables and update sql direct. Do not understand where Excel comes into this though.

Viewing 15 posts - 3,016 through 3,030 (of 3,543 total)