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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by Otto

  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...

Part and Inventory Search

Back
Top