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: *

  • Users: Otto
  • Order by date
  1. Otto

    Dynamically calculated values per row = slow webpage

    Name the outer T1 to something else: Select A, B, Count(B) as cnt, (Select Count(C) as svr From T1 Inner Join T3 ON T1.ID=T3.ID Left Outer Join T4 on T3.ID=T4.ID Where T1.Type='ABCD' and T1.A=T1_O.A and T4.D like '%server%') as svr From T1 T1_O Inner Join T2 ON T1_O.ID=T2.ID...
  2. Otto

    Regular Expression validation issues

    The \w is only for alphanumeric (A-Z0-9, no special chars allowed). But your problem is something else. Your regexp is good (I've tested it with VS2008, and RegexCoach as well). Perhaps it is a bug in .NET2? I don't know, but I have no other guess...
  3. Otto

    Regular Expression validation issues

    I've tried your code with VS2008 (on XP, .NET v3.5) and it seems to be working well. So, I have no idea what's wrong at your place. On the other hand, I don't see the 'no spaces' criteria in your regexp. You should use \w{8,} (or equivalent) instead of .{8,}.
  4. Otto

    exporting duplicate column data

    Try to give different names for the same fields. select datetime, ps, recnum, customer, ps as ps2, count, probe, count as count2
  5. Otto

    User-defined function help

    Perhaps, the first select give you the right result, but you override it in the second.
  6. Otto

    Join includes too many records in aggregate function

    The right solution depends on where field1 and field2 come form. But you can write something like this: SELECT field1, field2, SUM(order_qty) FROM order where exists (select group_type from group where group_type = 'employee' and group_id in (select group_id from user_group where...
  7. Otto

    Script Database

    Have you tried to make several scripts instead of one? Script the database to one file, then tables to another, then views, etc. I cannot manage the SSMS to script data (only structure). If I need to script data, I use the EMS SQL Manager http://www.sqlmanager.net/products/mssql/manager. Try...
  8. Otto

    DataList refresh after changing the DataSource

    I've done your test code. It worked. I did a simple xml assign with 1 row and with 2 rows: <items><item KEZELOKOD="1" NEV="AA" KULCS="A "/></items> and <items><item KEZELOKOD="1" NEV="AA" KULCS="A "/><item KEZELOKOD="5" NEV="AGI3" KULCS="AGI "/></items> It failed. It got me to...
  9. Otto

    DataList refresh after changing the DataSource

    Yes, of course I have tested it. The data provider web service working well. Both the data (if I change it from another application) and the number of rows are changed on click. But the date in the DataList remains unchanged. I'm using VS2008...
  10. Otto

    DataList refresh after changing the DataSource

    No. The Page_Load is empty. I assign the DS only on button click. Here is the 'full' code: <%@ Page Language="C#"%> <%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ajaxToolkit" %> <script language="C#" runat="server"> protected void Button1_Click(object...
  11. Otto

    DataList refresh after changing the DataSource

    Hi! On a button click I create a new DS and assign it to a DataList. The count of the asked rows are based on a textbox. XmlDataSource xds=new XmlDataSource(); xds.Data=ws.QueryAsXML("select top "+TextBox1.Text+" ... "); xds.DataBind(); DataList1.DataSource =...
  12. Otto

    How can I set Monday as the first day of the week

    AFAIK, the only way to change it globally to change the language setting, because the datefirst is related to it. Use the sp_helplanguage to show the default settings for each language. And use the sp_configure or sp_defaultlanguage (for an existing login) to change it.
  13. Otto

    Delete record with higher record number

    What about something like this: [code] delete from AccountMainTbl0 where simsrecnbr in (select max(simsrecnbr) from AccountMainTbl0 where ckey in ( SELECT ckey, COUNT(ckey) AS Expr1 FROM AccountMainTbl0 GROUP BY ckey HAVING (COUNT(ckey) > 1) )) If a ckey is duplicated more...
  14. Otto

    Query - is this possible?

    select T1.*, (select top 1 GUID from T2 where PNUMBER=T1.PNUMBER and T1.DATE between STARTDATE and ENDDATE) as GUID from T1
  15. Otto

    Hello experts, I have this stor

    Here is example (substitute your fields). select CUSTNAME, case MM when 1 then QTY else 0 end QTY_01, case MM when 1 then VALUE else 0 end VALUE_01, /* ... */ case MM when 2 then QTY else 0 end QTY_02, case MM when 2 then VALUE else 0 end VALUE_02 /* ... */ from ( select CUSTNAME...
  16. Otto

    Converting Ticks to seconds in SQL

    If your tick means millisecond: 1sec=1000ms, so you should div the ticks with 1000.
  17. Otto

    Returning records with a foreign key in preference to one without

    Huh, it is a bit difficult to understand (for me :-))... And without sample records... But try this: select P.*, T.*, S.* from @PARAM P join (select Test_Seq_Id, max(Params_Version) Params_Version, max(Concession_id) Concession_id from @PARAM P where Concession_Id is null or (select...
  18. Otto

    Returning records with a foreign key in preference to one without

    Take a try with this: select T.* from @TMP T join (select TEST_FK, max(PARAM_VERSION) PARAM_VERSION, max(CONCESSION_FK) CONCESSION_FK from @TMP group by TEST_FK) T1 on T1.TEST_FK=T.TEST_FK and T1.PARAM_VERSION=T.PARAM_VERSION and (T1.CONCESSION_FK=T.CONCESSION_FK or T1.CONCESSION_FK is...
  19. Otto

    scaler function error.

    ... where SID between cast(right(ID_FROM, 5) as int) and cast(right(ID_TO, 5) as int)) option (MAXRECURSION 0)
  20. Otto

    Unexpected query results

    AND (rf.ReferrersCategorien_ID is null or rf.ReferrersCategorien_ID = case when @Categorie_ID is null then rf.ReferrersCategorien_ID else @Categorie_ID end) or AND...

Part and Inventory Search

Back
Top