Viewing 15 posts - 106 through 120 (of 168 total)
Change the Insert statement like this
insert
@exception(addressException, errorID)
select
substring(a
September 5, 2006 at 3:37 pm
I think, Logically it is not possible to format the data with SQL.
Formatting data is part of the calling Application,
you can workaround this by using HTML tags in Query...
September 5, 2006 at 3:02 pm
Your SQL will perfectly works,if the data contains different months i.e, your subquery should not return more than 1 value
try to identify the rows uniquely
September 5, 2006 at 1:59 pm
when SET XACT_ABORT ON statement transaction is terminated and rolled back implicitly
If any error occurs in Update statement, It wont go to the IF condition after that because of SET...
September 5, 2006 at 11:59 am
September 5, 2006 at 11:35 am
You can use this also
select
*
from
table1
where
(select count(PERMIT_ID
September 5, 2006 at 11:23 am
You can mimic the functionality of arrays by using split function ( I saw somewhere in the group called fn_split which splits the input separated by comma)
store the results in...
August 31, 2006 at 6:05 pm
I created a function to count the commas in the address field like
Create Function CountCommas(@str varchar(4000)) returns int as
begin
Declare @i int,
@count int
set @i=1
set @count=0
while @i>0
begin
set @i =charindex(',',@str)
set @STR=substring(@str,@i+1,len(@str))
set...
August 31, 2006 at 4:03 pm
I assumed that duplicate city is separated by ','
If not, what are all the characters separating two values.
If both are not separated by any of the characters then what is...
August 31, 2006 at 2:48 pm
You can try this also
update Tab_test
set name=LEFT (name, LEN(rtrim(name)) - CHARINDEX(',', REVERSE(rtrim(name))))
Added rtrim to Nagabhushanam approach
August 31, 2006 at 2:36 pm
TRY THIS
Assumed ',' will be the separator between the duplicates and repeated city name is the last word in the Address
Ex: Updated Name column in Tab_Test table
UPDATE TAB_TEST
SET NAME=reverse(substring(reverse(rtrim(name)),charindex(',',reverse(rtrim(name)))+1, len(reverse(rtrim(name)))...
August 31, 2006 at 2:29 pm
Add an "Data Flow Task" Event Handler "OnPreExecute"
Add "Execute SQL Task" to EventHandler enter delete statement for that table in SQL Task
hope it will solve your problem
August 31, 2006 at 2:11 pm
If you are able to see control flow, data flow,package explorer tab you can also see Exection Results tab in Design mode
In that tab also you will find errors occured
August 31, 2006 at 1:02 pm
Just Click on Debug -> Windows -> Immmeditate
It will show you the Immediate window
August 31, 2006 at 12:15 pm
You can see the errors in Immediate window while debugging the Package
August 31, 2006 at 11:57 am
Viewing 15 posts - 106 through 120 (of 168 total)