Showing posts with label note. Show all posts
Showing posts with label note. Show all posts

Friday, March 30, 2012

Please help me

l saw error message on log reader on replicated please suggest me
THANKS U
Another logreader agent for the subscription(s) is running.
NOTE: The step was retried the requested number of times (10) without succeeding .The step failedIs the logreader job still failing?
If so, the same logreader job is actually running on your publisher. It may be an orphaned process. If so, you will need to kill it.

--jfp|||It ok. Thank you so much

Tuesday, March 20, 2012

Placing Notes In Sql Statement

Anyone know how to place not functional "NOTES" in an SQL statements like the authors name or to note functionality?? thanks GRTTry using --
:D|||thanks works great!|||Just as an fyi, you can highlight entire lines in Query Analyzer and use these:

CTRL+SHIFT+C --Comments everything.
CTRL+SHIFT+R --Removes comments from everything.

This is great when you are troubleshooting or want to just type then highlight and comment.|||whenever you ask a question like this in the generic SQL forum, you need to specify which database system you're using

and you guys who give a database-specific answer to a generic question should preface your remarks that way

for example, if you're using microsoft access, you can't put comments in the sql at all

if you're using microsoft sql server, the double dash works, and so does /* comment */

guess which database allows //|||whenever you ask a question like this in the generic SQL forum, you need to specify which database system you're using
That's right. Repeat after me: "Microsoft SQL Server and SQL are not the same thing"...|||-- supposed to be ansi standard.
:rolleyes:|||PL SQL developer oracle version 9i

Friday, March 9, 2012

pl/sql

I am doing pl/sql first time. I dont know that when i have script to run , i wrote that in simple note pad and now i am not able to run that procedure. please help me that where to write script and how to run it sucessfully.Originally posted by sam70
I am doing pl/sql first time. I dont know that when i have script to run , i wrote that in simple note pad and now i am not able to run that procedure. please help me that where to write script and how to run it sucessfully.

Either write it in SQL*PLUS, or open SQL*PLUS and do @.filename to run it.

Wednesday, March 7, 2012

pk constraint enforcement using SSIS to import data

Note: I'm running a bottom up design on this project as I won't know what data I'm really working with until I can get it imported and analyze it. Also, I'm not a DBA or developer, so please be gentle...

I am importing 30k+ rows using SSIS (OLEDB -DB2- source to OleDB -2k5- destination). The import works fine, but I just realized that I need to set up a pk on the row emp_ids. The problem is that in the DB2 source, the emp_ids were removed (set to whitespace, but not null). So, I can't just uncheck the 'keep nulls' option and import the data.

Any suggestions or links (using SSIS) on how to identify the rows where emp_id = "whitespaces" and 1) either keep them from being imported, or 2) remove them afterwards?

(I suppose this could be done using sql statement to identify the whitespace rows, but that would present difficulties of its own due to the random spacing nature of the updates. Also, I'm hoping for a checkbox wonder solution.)

Please advise. Thanks!

- Isaac

Why not use a conditional split to look for NULLS and NULLS resulting from a TRIM() operation.

So TRIM() your data in the conditional split, and then test that for NULL. If it matches, then you can use that tagged output stream to do with it whatever you wish... You can throw them away, you can push them to their own destination (flat file, SQL server, etc...)|||

That worked perfectly. Thanks for the advice Phil!

- Isaac

|||

While experimenting, I also found that the sort transform can accomplish this task. Not only are the rows with whitespaces removed, but this task also removes duplicate ids from the list... two birds with one stone (using a sort task (with delete dups) vs a trim split).

Awesome... once again thanks!

- Isaac

|||

isaacb wrote:

While experimenting, I also found that the sort transform can accomplish this task. Not only are the rows with whitespaces removed, but this task also removes duplicate ids from the list... two birds with one stone (using a sort task (with delete dups) vs a trim split).

Awesome... once again thanks!

- Isaac

Hmm... I don't like that... I don't like that the sort transformation removes rows with spaces in them. For that matter, I don't want it to remove NULLs either. Getting rid of duplicates, yes, but I would think your resultset would be reduced to just one row with spaces, as opposed to none. Are you sure it just discarded ALL rows that were "empty"?|||

In looking at it again, it's not perfect as it does leave one duplicate whitespace row (the first one that it finds). While that shouldn't be acceptable in a real world scenario, it works for the first rough pass on my project.

The sort/delete functionality actually works rather well when you select your pk as the row to "sort" on. It only checks against the rows that you specify, so all the verified data is still there. I checked the results against a report that I pulled off the server... I eyeballed it for a few minutes, but it seems to be accurate.

Maybe I'm mis-using the functionality (?), but it works...

|||

isaacb wrote:

In looking at it again, it's not perfect as it does leave one duplicate whitespace row (the first one that it finds). While that shouldn't be acceptable in a real world scenario, it works for the first rough pass on my project.

The sort/delete functionality actually works rather well when you select your pk as the row to "sort" on. It only checks against the rows that you specify, so all the verified data is still there. I checked the results against a report that I pulled off the server... I eyeballed it for a few minutes, but it seems to be accurate.

Maybe I'm mis-using the functionality (?), but it works...

No, using the sort transformation to remove duplicates is a very valid use. And you get sorted data which helps is most cases for downstream transformations...

I was just concerned when you said it removed all of the rows with spaces, and it did what it's supposed to do which was to remove duplicates and therefore leave one row behind.

Saturday, February 25, 2012

Pivot table error

I'm calling an Stored in the office picit tabe control from an ASP page & get this error.
Note - I'm using Dynamic SQL withing the SP
Has anybody seen this
Error
==== Data provider or other service returned an E_FAIL status
Pivot table control
=========== <object classid="clsid:0002E55A-0000-0000-C000-000000000046" id="PivotReport" codebase="http://download.microsoft.com/download/officexpstandard/owc10/2/w98nt42kme/en-us/owc10.exe" VIEWASTEXT><param name="XMLData" value="<xml xmlns:x="urn:schemas-microsoft-com:office:excel"><x:PivotTable>Hi Folk
i found the reason why it was failin
1. In my SP there was Order by clause was missin
2. Select * from <TempTable> was causing this issu