Viewing 15 posts - 1 through 15 (of 15 total)
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
March 2, 2010 at 6:56 am
Thank you-I will try the Case statement.
Regards
January 5, 2010 at 3:48 am
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
December 11, 2009 at 8:04 am
Im not aware of the set based method..Can you pls suggest how is that used?
December 11, 2009 at 2:37 am
any clues on my output clause query-i still cant get the correct sql
December 10, 2009 at 8:03 am
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...
December 7, 2009 at 9:42 am
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...
December 7, 2009 at 3:39 am
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...
December 4, 2009 at 9:50 am
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...
December 3, 2009 at 5:16 am
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...
December 1, 2009 at 9:30 am
Create FUNCTION [dbo].[fnRemoveBadCharacter]
(
@BadString nvarchar(40)
)
RETURNS nvarchar(40)
AS
BEGIN
DECLARE @npos INTEGER
SELECT @npos = PATINDEX('%[^a-zA-Z0-9_]%', @BadString)
WHILE...
October 15, 2009 at 2:04 am
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...
October 14, 2009 at 5:11 am
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:...
October 14, 2009 at 4:20 am
Viewing 15 posts - 1 through 15 (of 15 total)