Forum Replies Created

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

  • RE: Asp.Net Datagrid Issue

    Thanks all...the issue was resolved, by turning warnings off.

    What was peculiar about this issue was that we were only getting this error 10% of the time, and were...

  • RE: using variables in stored procedure

    Use Dynamic SQL.

  • RE: Asp.Net Datagrid Issue

    Thanks..we already did that. Seems like somehow, despite this we are getting 2 record sets returned sometimes. I'm apt to think some session setting is off depending on the...

  • RE: CASE statement help

    Whats your ddl ?

  • RE: split Name

    easy enough......

    Update yourTable

    Select FirstName=Substring(replace(NameCol,'.',','),1,charindex(', ',replace(NameCol,'.',','),1)-1),

    SecondName=Substring(replace(NameCol,'.',','),charindex(', ',replace(NameCol,'.',','),1)+2,len(NameCol))

  • RE: split Name

    too many commas...

    declare @table table

    (

    NameCol varchar(500)

    )

    insert @table

    select 'Bugs, Bunny'

    union

    select 'Elmer, Fudd'

    union

    select 'Daffy, Duck'

    declare @result table

    (

    first_name varchar(100),

    last_name varchar(100)

    )

    insert @result

    Select FirstName=Substring(replace(NameCol,'.',','),1,charindex(', ',replace(NameCol,'.',','),1)-1),

    SecondName=Substring(replace(NameCol,'.',','),charindex(', ',replace(NameCol,'.',','),1)+2,len(NameCol))

    from @table

    select * from @result

    HTH

  • RE: Test databases

    pubs,northwind comes free with all versions of SS2k.

  • RE: GROUP BY help with datetime criteria

    Something like...

    declare @shift_factor table

    (

    shift varchar(2) unique,

    count_to_day int

    )

    insert @shift_factor

    select 's1',0

    union

    select 's2',0

    union

    select 's3',-1

    select * from @shift_factor

    print datepart(hour,getdate())

    declare @shift_data table

    (

    some_date datetime,

    some_money money,

    shift varchar(2)

    )

    insert @shift_data

    select'02/10/06 6:44pm',15,'S2'

    union all

    select '02/10/06 11:23pm',25,'S3'

    union all

    select '02/11/06 2:23am',45,'S3'

    union...

  • RE: Cast wrong

    What's the entire statement ? There's nothing I can see wrong with the way you cast this.

    test as follows...

    select cast((id/id)*100 as numeric(10,2))

    from syscomments

  • RE: Displaying a recordset from a stored procedure

    Bind the recordset to a Dataset...bind the Dataset to any of these...DataList, Datagrid, DataView etc. Check out http://www.4guysfromRolla.com they have some good examples.

    HTH

  • RE: Create date of an object

    Yes, I had a similar issue a while back. Database crashed..and developers needed create date to know what they worked on( they didn't use source control!). The simple...

  • RE: Query for last 85 records in database

    ddl = data definition language

    basically your table structures etc...

    Glad it worked 🙂

  • RE: Do I need to fill a dataAdapter before inserting new records

    Create an xml string of the fields you want to insert. Call a stored procedure that passes a text variable of your xml to the server.

    HTH

  • RE: Query for last 85 records in database

    Your ddl would be helpful...

    but..something like....

    select top 85 [identity_field],*

    from table t

    order by [identity_field] desc

    HTH

  • RE: xp_sendmail - empty subject

    Rupert ..if you can't get xp_sendmail to run...try using xp_smtpmail . You can get it at http:///www.sqldev.net . I find it to be far more reliable...

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