Forum Replies Created

Viewing 15 posts - 1,921 through 1,935 (of 6,486 total)

  • RE: Logged vs non-logged

    I don't know if this will add anything for you - but it helped me when I figured this out. The reason why there is always log activity is...

  • RE: Random 64 Characters alphanumeric String

    here's one way. Not necessarily the most efficient, but it's not bad.

    drop table #matt

    declare @rows_needed int

    declare @length_needed int

    select @rows_needed=1000,

    @length_needed=64

    select top(@rows_needed*@length_needed)

    identity(int,1,1) RN

    ,cast(N as int) N

    ,0 as batchcol

    ,'' as...

  • RE: Random 64 Characters alphanumeric String

    declare @n varchar(64)

    set @n='';

    ;with MyCTE1 as (

    select N, newid() as rid from tally),

    MyCte2 as (

    select top(64) char(n%84+32) randchar from MyCTE1 order by rid)

    select @n=@n+randchar

    from MyCTE2

    select @n

  • RE: AVG Issue

    arun.sas (3/12/2009)


    Hi,

    What you written is correct, but do the round off for the AVERAGE

    Like

    declare @abc table (

    Center varchar(15),

    FCR numeric(8,3),

    DATE1 datetime)

    insert into @abc values('El Paso - NC',0.63,'2008-12-31')

    insert into @abc values('El Paso...

  • RE: Why INSER INTO ... UNION ALL?

    There's a balancing game happening. The union all requires a fair amount of work to merge all of the single rows into a single data set and THEN do...

  • RE: script to see total number of records in all the tables in one db

    or: use the Disk Usage by Table report. Besides the rowcounts it will also give you the space usage stats for each table....

  • RE: Pivoting Data Without Aggregation

    Also glad we could help.

    One parting thought - the code you're using is the "old-style" method for pivoting data (what was used before the PIVOT command in 2005 or when...

  • RE: How to change column list order before "Union All" ?

    riga1966 (3/9/2009)


    Cos if you have 40 columns you don't want to scroll down

    to verify the stream. You want to see the stream at the top

    as a header.

    Trusting SSIS to "guess"...

  • RE: Group By clause

    Kit G (3/9/2009)


    I'm new to SQL myself and I might be missing something here, but from the first few posts it looks like you're saying that GROUP BY doesn't always...

  • RE: SQL Inner Join VS. Access Inner Join

    It's the difference between Access' DATE() function and MSSQL's Getdate() function.

    Remember - getdate() returns the current date and time whereas DATE() only returns current date.

  • RE: Group By clause

    At this point though - if the group by and the select don't match, can't match and won't match, I prefer to switch away from the aggregate altogether. In...

  • RE: Group By clause

    All right - if you don't make the SELECT match the GROUP BY, then sure, you will end up with multiple instances of the same combination in the the SELECT...

  • RE: Group By clause

    Brandie Tarvin (3/9/2009)


    Bob Hovious (3/9/2009)


    I have colleagues who use GROUP BY clauses without aggregation in place of a SELECT DISTINCT. The results appear to be the same. I've always used...

  • RE: Pivoting Data Without Aggregation

    The only way you pivot things right now is to use some form of aggregation. Since the data is essentially just groups of one, using MIN or MAXC would...

  • RE: "Answered" Posts

    As someone else cleanly pointed out, this is not a FAQ with a single solution per listing... it's a forum. The good folks that are here can instantly see...

Viewing 15 posts - 1,921 through 1,935 (of 6,486 total)