Forum Replies Created

Viewing 15 posts - 13,321 through 13,335 (of 14,953 total)

  • RE: Implicit conversion from data type datetime to varbinary is not allowed

    Strange. I've never written a query with parentheses on the select list.

    As a matter of fact, I just tried it, and I got a syntax error. Here's what...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: exporting sql query to xls file

    In SSIS, you would create a Data Flow Object, create a connection to the database and define its source as the proc, then a destination, which would be the spreadsheet....

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Queries that use tables from 2 different connections

    Glad I could help.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Theoretical question about importing from Excel using SSIS

    Matt Miller (6/17/2008)


    I've done something like that with DTS a few times. For better or worse - I found it easier to have DTS handle the importing of a...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Lgging from Subplans v Maintenance Plans

    One way to log them is to use the SQL Server Agent job properties. Under Notifications, you can have it write data to the Windows log. Is that...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Theoretical question about importing from Excel using SSIS

    It should be easy enough to do in DTS. I haven't done that (I have in SSIS), but I'm sure it can be done. I have done similar...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Delete rows in one table based on another table

    You can do that a couple of ways.

    delete from dbo.Table1

    where Path in

    (select Path

    from dbo.Table2)

    delete from dbo.Table1

    from dbo.Table1

    inner join dbo.Table2

    on Table1.Path = Table2.Path

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: How do I execute a proc from a C# console app?

    I'm not familiar with C#, but I bet there's something in it comparable to the VB "SQLConnection" object. If you can find something like that, that should do it...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Assign seqnumber to a column

    I'm not sure I'm following your requirements correctly, but it looks like something that could be done with a modified running total query. There's an article about how to...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: create database script with corresponding data files

    create database MyDB

    on primary, secondary, tertiary

    That will create the database MyDB on the primary, secondary and tertiary filegroups. You'll have to use your actual filegroup names, of course, and...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Transferring Databases

    To move the database files around in a T-SQL script, you'll need to use xp_cmdshell. That allows you to issue commands like "copy" or "move" to the file system,...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Export XML with multi-language data

    Have you tried changing the data type from varchar to nvarchar?

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Implicit conversion from data type datetime to varbinary is not allowed

    On the parentheses thing, do you mean:

    insert into t (col1, col2, col3)

    select col1, col2, col3

    from t

    If that's what you mean by putting the columns in parentheses, yes, this is the...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Get date of last Sunday of every month

    In doing some tests on this, I found something I consider quite interesting.

    Datepart(Day, date)

    Datepart(Month, date)

    Datepart(Year, date)

    Datepart(Hour, date)

    Datepart(Minute, date)

    are all considered deterministic by SQL Server, but

    Datepart(Weekday, date)

    is not.

    Neither are:

    dateadd(day, '12/30/1899', date)%7

    cast(date...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: exporting sql query to xls file

    SSIS can do that.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 15 posts - 13,321 through 13,335 (of 14,953 total)