| |
| |
| |
|
Page: 1 2 3
Comments:
<0> hey all <0> I'm trying to export fomr data from MS-SQL into an excel spreadsheet, but the spreadsheet isn't being created at all ... is this not the correct query ? http://sql-servers.com/nopaste/?show=374 <1> No, SQL Server has no clue about Excel. <0> okay <0> but once I actually use ado it should work ? <1> No <0> I thought ADODB had the ability to read/write/create excel without using automation ? <0> eg. http://www.visualbasicforum.com/showthread.php?p=969630#post969630 <1> You can use ODBC to communicate with Excel, and you can use ODBC or OLEDB to communicate with SQL Server. You would have to write the code to read from the SQL Server and then write to an Excel file. <2> ADO can interprut the SQL and do it yet, I have no idea exactly how to format it or how it works though. <2> Just seen bits and pieces of it on the web before, and presumbaly thousands of people aren't all lying at once. <2> But they might be. <1> ADO just p***es the SQL to the OLEDB provider. <1> ADO can use the Jet drivers to read/write Excel as tables. <2> Just don't expect anything even sort of like that to work in QA. <1> The sample on that website is reading from Excel and writing to another Excel sheet in the same workbook.
<1> SQL Server isn't involved at all <2> Tclp: Enjoy - http://support.microsoft.com/?kbid=321686 <0> right but as I said once I actually use ado <2> er, wrong one. <2> http://support.microsoft.com/default.aspx?scid=kb;en-us;306125&sd=tech that one. <3> meh? <3> yo <3> where do IIS logs sit? <3> found <4> Anyone familiar with php and the PS2 game SOCOM 3 I have a question. <5> lol <5> luniz don't ask to ask <3> yet another stats website <4> well, it's worth a shot not getting much response anywhere else... basic I need a script to login to a remote site retrieve my "stats" and show them in a frame and a database... I apologize I'm sure this is redundant to you all <5> $200 i'll do it <6> sounds like a bargain.. <7> Darken|: it needs to be written in cross platform asm ;P <3> rofl <3> whatta **** is a cross pltfrm asm <3> lwal <5> slade be glad im not opped right now :/ <5> i'll cross platform you to #mysql <4> heh yet a response I expected... such a "script" can be purchased minus the database portion for $30 NOT looking for a handout just a helpful hand & knowledge <7> Darken|: and the program has to use its own network stack for retrieving stats, and it has to directly connect to databases that way. :P <6> luniz:: instead of trying to reinvent a wheel, i think it's a good idea to actually find something similar... <7> luniz: or perhaps you could take light at my playful jabs and state what your platforms are <5> stfu slade <5> you're not even in on this conversation <5> luniz then purchase it <4> thank you for your help much appreciated. <5> anytime <6> wth? today is Friday? <8> what in the world is collation? <3> where does the freaking IIS logging get it's time from? wtf <4> smith.absolutarmy.com/test.php displays blank page when put my login/p***word? <9> MSSQL 2000: I need to duplicate/copy data across multiple tables and maintain the relationships. It's been suggested to use XML and I'm familiar with the "FOR XML" clause. I'd prefer to keep the solution self-contained inside SQL Server (T-SQL only) instead of using .NET or 3rd party tools. Any suggestions, links? I've been Googling, but haven't found anything. <7> Sabba: from multiple tables, to multiple tables? <7> if so, the most straightforward way to do what you want is with a cursor <9> Slade: I've gotten pretty good with looping table variables. You're thinking I could populate cursors (or table variables) with related data, then insert in the logical order? <9> Never mind, what I'm imagining would get exponentially more difficult with each table involved. <9> Can you explain more? <7> you'll need to answer my question first ;p <3> yo guys <3> anyone know about IIS logs? <3> the time seems to be off by 2 hours <7> um. cause they're stored in GMT and you're off by 2 hours? <3> they are 2 hours forward <3> my server time is EST <7> oh, then no clue. :) <3> huh? <7> no idea why your iis logs are the wrong time then <7> Quant: what format are you storing your iis logs in? <9> Slade: Yes. Tables A,B,C One to many cascading from A to B and from B to C. <7> Sabba: and the problem with raw copies is that the primary keys get changed? <9> Not sure what you mean by raw copies. <7> insert into () <9> Ahh. I'm using Identity fields so yes. <7> sabba: the more streamlined (and naturally recursive) method for doing this is to use a temp table for each table mapping the old ID to the new ID
<7> i've written a function that recurses itself to copy an entire tree based on a where clause <7> function == stored proc <9> Sounds like it might be what I'm looking for (or at least give me inspiration). Mind sharing? <9> I'm amazed I haven't been able to find anything so far. <7> dont have it here. sorry. at work.. the recursion is based on a recursive delete proc i found on the net <9> i think the keyword is 'duplicate' but everything I find that way is about removing duplicates, not creating them :) <3> #Date: 2006-03-04 02:11:08 <3> #Fields: date time c-ip cs-username s-ip s-port cs-method cs-uri-stem cs-uri-query sc-status cs(User-Agent) <3> 2006-03-04 02:11:08 127.0.0.1 - 127.0.0.1 80 GET /AlephWebrideSimulation/vs-42989989129769520_tmp.htm - 200 Microsoft-Visual-Studio.NET/7.10.3077 <9> Slade: Familiar? http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsqlmag01/html/recursion.asp <7> sabba: but for you to do this at first. i suggest you keep it simple and write them not to auto query the sys tables. . create #amap #bmap #cmap <7> then create your cursor for c.. copy c over record by record, each time insert @oldIdentity @@identity into #cmap <7> then do #bmap and everytime you need to insert the key for table c.. do a join on #cmap. to get the new key <7> Sabba: am i making any sense? <9> I think so, accept it sounds like you're suggesting I work from the children up and depending on how you mean that, I might see a different process. <9> accept=except <7> i said it backwards. you start with the ones that are not dependant on anything. and move in <7> a simpler way, if you can do it, is to have a temporary field in your destination table that olds "OldID" <7> err holds <9> Ok, then yes. That makes sense. "Insert into #amap" ... "Insert into #bmap ... join #amap", etc...? <7> right <7> thats if you cant have a temp field in your tables. <7> if you can have the temp field. theres no cursor needed <9> Well, ultimately I would like an adaptive solution because I have multiple logical trees in this DB, but at the moment, that will solve my immediate issue. <7> yea. eventually you can check systables to auto pull whats needed <9> If nothing else, I'll just have to create a few of these solutions and manage them. Thanks for helping my wrap my head around this one. <7> http://www.sqlteam.com/item.asp?ItemID=8595 <9> Just had a thought. Even with that solution I'll need to modify my tables and use them directly or else I won't gain any ground sinse those tables have their own Identity fields? <7> thats a cascading delete for sql 7 <9> heh, I've used that one :) <7> thats what i modified to do this <7> not sure what you meant before <9> So you just modified it to do inserts instead of deletes? <7> well more complex than that. but yea <9> :) <7> i build temptables. transfered the table, making the new temp table with the key map.. then i called the next one <9> Well, thanks for the help. <7> hmm Netgear routers have IRC/DCC vulnerability <10> home <3 <11> !list <10> donnib: i still like to move it move it <12> phargle: bye bye <12> hi all, could somebody give me an idea how i can accomplish this on MSSQL_2005: i have a table where a column tells me FAILED or OK for evry row. I would like to select let's say 5 rows which has different FAILED and OK's. I want to get FAILED if one of the rows has FAILED. I want to do this in a procedure. <1> say what? <13> use case in a subselect <12> hmm...i have a table with a column that tells me a status. in the status field of this tbale i insert for evry row 'FAILED' or 'OK'. In the same tbale i have a filed Application. I select from the table on a sepcific application and i then get 5 rows back and in thos rows some have FAILED and some OK in the Status field. I want to get failed if one of the rows has failed. <13> select max(col1) from (select case col when 'FAILED' then 1 else 0 from ... ) .. <1> Could populate a table variable with the 5 rows and then run a quick update against that table variable if any of the values are failed. <1> or do you care about any records outside of those 5. <1> Also, I hope you're using a BIT NOT NULL for that field. <12> actually it's a NVARCHAR for the status filed but it sounds as i should change it to a more appropriate type <1> yes, NVARCHAR eats up a lot of space and can contain many values that aren't simple 'FAILED' or 'OK'. Bit can only be 0 or 1. <12> you have a point there. i will change it. i am still not sure which direction i should take ? <12> Halo_Four: are you thinking about making a new table and updating that one ? <1> DECLARE @Results TABLE ( ... ); INSERT INTO @Results ( ... ) SELECT TOP 5 ... FROM MyTable WHERE ...; UPDATE @Results SET Success = 0 WHERE Success = 1 AND EXISTS (SELECT * FROM @Results WHERE Success = 0); <1> If it's only five values that would be pretty quick <1> This also sounds like something that would be really easy to handle at the client side. <12> it won't always be 5 rows. <1> Well then depending on how you are selecting the data CoJoNEs method would probably be more appropriate. <12> here is a simple list of my data. on these data i would like say SELECT * FROM resultTable WHERE Application='2250SW' then i would like to get true if all were OK and false if one of them was bad. i am not sure how i can implemenr CoJoNEs method on this. could you help ? <12> http://sql-servers.com/nopaste/?show=375 <1> CASE WHEN EXISTS (SELECT * FROM resultTable WHERE Application = '2250SW' AND Success = 'FAILED') THEN 'FAILED' ELSE 'OK' END AS Success <12> the case should be in the procedure ? <1> The CASE should be in the SELECT statement as a column <14> nah, in your php <12> sorry that you efort dosn't help me.....i am to much of a beginner. sorry. i'll try and see what i can do to solve this issue. <12> i got it to work....hurray....one more question. can i return for all application this query ? i mean instead of specifiing WHERE application. <15> what is the access 2000 equivalent of t-sql's "is not null" <16> morning folks <17> SouLShocK: is not null <12> SELECT CASE WHEN EXISTS <12> (SELECT * FROM ShowTestRuns WHERE Application = 'DataRecorder' AND Status = 0) <12> THEN 0 <12> ELSE 1 END AS Status
Return to
#sql or Go to some related
logs:
The file 'asms' on Windows XP home Edition Service Pack 2 CD is needed nhllllll #politics #photoshop herbal iceys
#networking #worldcup #politics #windows nguruguru
|
|