Forum Replies Created

Viewing 15 posts - 1 through 15 (of 15 total)

  • RE: query error datetime field

    Thanks, followed the point.

  • RE: query error datetime field

    I want all records with create_date >='03/02/2009'

    The query is ignoring the where clause & returning me all rows from the table

    create_date is a datetime field.

    Thanks

  • RE: if else clause in sql select

    Thank you-I will try the Case statement.

    Regards

  • RE: update cursor

    Thanks-but this will not work

    The cloumns in Tbl3 have to be deleted tnum of tbl2,formatted tnum returned from fucntion & sid of tbl1 & not oid of tbl2

  • RE: update cursor

    Im not aware of the set based method..Can you pls suggest how is that used?

  • RE: record of updates

    any clues on my output clause query-i still cant get the correct sql

  • RE: record of updates

    thanks-this helps

    Another quick question for OUTPUT clause:

    I created the auit table as below

    tbl_audit

    (

    rec_id identity

    type varchar

    date datetime

    old_num varchar

    new_num varchar

    own_id uniqueidentifier

    )

    Running the following code:

    UPDATE dbo.adds SET code = dbo.format_chars(code)

    OUTPUT 'format',getdate(),deleted.pnum,inserted.pnum,own_id...

  • RE: record of updates

    Thanks-but couldnt get the output clause to work.

    I have thought of creating a trigger to insert a row into an log_table for each update on the user_table

    CREATE TRIGGER [log_table] ON...

  • RE: record of updates

    where clause is: where pcode like '%[^a-zA-Z0-9_]%'

    another problem is:first time I Want to run the 2 queries for the entire database & See what 'ids' have been updated but next...

  • RE: Can DatabaseMail attach a formatted Excel file?

    Its a 100% tab & not a spcae between quotes..still all data is coming in one column separated by a space,whereas I want each column of the result query to...

  • RE: Can DatabaseMail attach a formatted Excel file?

    Hi

    As per above suggestions, I tried to use tab as a query separator but still all the query data is coming in the same column..Is there something that I doing...

  • RE: user defined functions & columns

    Create FUNCTION [dbo].[fnRemoveBadCharacter]

    (

    @BadString nvarchar(40)

    )

    RETURNS nvarchar(40)

    AS

    BEGIN

    DECLARE @npos INTEGER

    SELECT @npos = PATINDEX('%[^a-zA-Z0-9_]%', @BadString)

    WHILE...

  • RE: extact last 3 characters from a string

    thanks

    Im stuck at another thing now

    I have to do this conversion for all rows in the table

    if i write select @string=str_col from tbl1

    follwed by all the other string conversion statements;it...

  • RE: extact last 3 characters from a string

    Many thanks

  • RE: extact last 3 characters from a string

    Hi,

    I have a slightly similar problem

    I hav a nvarchar field with no particular format of where spaces are

    I want to split the string as below

    <all chars-3> space <last 3 chars>

    Eg:...

Viewing 15 posts - 1 through 15 (of 15 total)