Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Joulius

    Redirect if link not available

    Hi! You could do it this way: <customErrors mode="On" defaultRedirect="notavailable.aspx"> <error statusCode="404" redirect="unavailable.aspx" /> </customErrors> and make sure that in IIS you set the 404 code in "Error pages" for Execute URL "/unavailable.aspx". Hope this helps! [morning]
  2. Joulius

    Only need last record in relationship

    Hi again and sorry for the delay. Are there any columns in REVIEWS_TABLE that could be ordered (ex: the date when the review was created) or is the review_id initialized with NEWSEQUENTIALID()? If not, that's really bad design and the only option that I see is: CREATE TABLE #ORDERED_REVIEWS...
  3. Joulius

    want to find records if in another group

    Hi This should work: SELECT c.source_id, pe.enc_nbr, c.SIM FROM patient_encounter pe LEFT OUTER JOIN Charges c ON pe.person_id = c.person_id AND pe.enc_id = c.source_id WHERE c.SIM IN ('99211', '99212', '99213', '99214', '99215', '99241') AND EXISTS (SELECT 1 FROM charges WHERE SIM IN...
  4. Joulius

    deduping a table

    Hi Here's a starting point for you: DECLARE @TEST TABLE (ID int identity(1,1), Field1 varchar(55), Field2 varchar(55)) INSERT INTO @TEST (Field1, Field2) SELECT 'Joe', 'Bloggs' UNION ALL SELECT 'Joe', 'Blogger' UNION ALL SELECT 'Joe', 'Blog' UNION ALL SELECT 'John', 'Loggs' UNION ALL SELECT...
  5. Joulius

    Only need last record in relationship

    How many rows do you have in REVIEWS_TABLE? Is it possible to: ALTER TABLE REVIEWS_TABLE ADD rowid int IDENTITY(1,1) so you can do an ORDER or MAX operation on that table? [morning]
  6. Joulius

    Only need last record in relationship

    Hello! You need something like this? SELECT U.*, RD.*, CD.* FROM USERS_TABLE U INNER JOIN ( SELECT user_id_fk, MAX(review_id) as last_review_id FROM REVIEWS_TABLE GROUP BY user_id_fk ) R ON U.user_id = R.user_id INNER JOIN REVIEWS_TABLE RD ON R.last_review_id = RD.review_id INNER JOIN (...
  7. Joulius

    add exist html page in ContentPlaceHolder1

    Hi Option 1) <iframe> inside the ContentPlaceHolder Option 2) look into WebClient and its method .DownloadString(), but be prepared to do some parsing/slicing of the retrieved content (to remove <html>, <head>, <body> tags) [morning]
  8. Joulius

    Using XML as a parameter in SQL2005

    You can cast the ntext input parameter to xml. CREATE PROCEDURE <ProcName> @xmlDAT ntext AS BEGIN DECLARE @xmlData xml SET @xmlData = CAST(@xmlDAT as xml) ... [morning]
  9. Joulius

    SSRS counting column total based on conditional boolean

    This should do the trick: SELECT SUM(CASE WHEN BooleanColumn = 1 THEN 1 ELSE NULL) FROM TABLE [morning]
  10. Joulius

    Using XML as a parameter in SQL2005

    That's right. SQL2005 has a xml data type and query and manipulation methods for it. Look for "xml data type [SQL Server]" in Books Online. [morning]
  11. Joulius

    Using XML as a parameter in SQL2005

    If you're using SQL2000, the correct syntax would be: CREATE PROCEDURE <ProcName> @xmlDAT ntext AS BEGIN DECLARE @xmlPointer int SELECT @xmlDAT = '<ROOT><Name ID="IDNumber" Name="SomeName"> <Node1 dateTime="29/04/2009" currentvalue="52"/> <Node1 dateTime="29/04/2009" currentvalue="52"/>...
  12. Joulius

    What's the ASP.NET function that parse the data into html format??

    HttpUtility.HtmlEncode() Server.HtmlEncode() [morning]
  13. Joulius

    Secuirty Issue

    If the COM component was registered on server using regsvr32, you could change the Launch and Activation Permissions and Access Permisions by adding the account on which IIS is running (ASPNET or Network Service). For that you need to start mmc.exe, add the Component Services snap-in, then, in...
  14. Joulius

    TSQL Select Stmt

    bjb123 is right. I misread that sql2000 code is needed, so in case of sql2005 scenario PIVOT capabilities are the way to get the job done. So, this should do the trick: DECLARE @sql nvarchar(MAX) SET @sql = 'SELECT * FROM (SELECT DatabaseName, Date, Qty From #TEST) a PIVOT (Sum(Qty) FOR Date...
  15. Joulius

    Dropdown List in a Formview

    Hello! Are you sure the DDL_Test_ID column in the DDLtest table has IDENTITY set on? You could start the SQL Profiler, trace the call to the SQL Server and see what is sent. (From Microsoft SQL Server Management Studio, select option SQL Server Profiler from Tools menu, then File -> New Trace...
  16. Joulius

    RegisterStartupScript: Calling AJAX API Issue

    You're welcome! [morning]
  17. Joulius

    TSQL Select Stmt

    Hi! Maybe this will help: CREATE TABLE #TEST (DataBaseName varchar(55), Date smalldatetime, Qty int) INSERT INTO #TEST SELECT 'Db1','3/1/2009 00:00:00',2501 UNION ALL SELECT 'Db1','4/1/2009 00:00:00',3722 UNION ALL SELECT 'Db2','3/1/2009 00:00:00',1488 UNION ALL SELECT 'Db2','4/1/2009...
  18. Joulius

    Access cache from class file

    Hi! Use HttpContext.Current.Cache("mycache"). [morning]
  19. Joulius

    RegisterStartupScript: Calling AJAX API Issue

    Hello! I'm assuming you're trying to implement the ICallbackEventHandler interface on your page. The steps needed are: 1) modify the code behind of your page Public Partial Class YOUR_PAGE_CLASS_NAME     Inherits System.Web.UI.Page     Implements ICallbackEventHandler End Class 2) add a...
  20. Joulius

    RRAS problem

    I'm having difficulties setting up a RRAS with NAT services. I've read the tutorial from microsoft.com and I've searched the net for my problem but I haven't found a solution for it. This is the scenario: - (A) 1 PPP adapter WAN connection (DHCP enabled - dynamic IP alocation from ISP) - metric...

Part and Inventory Search

Back
Top