| |
| |
| |
|
Page: 1 2 3
Comments:
<0> this deletes the row where id = whatever <1> Ahhh... Well, i want it to delete ALL rows... Hehe.. <1> DELETE * FROM table <- that should work.. but it doenst.. <2> cause its wrong <1> It is? hehe <2> delete from table <2> will delete all rows in the table <1> hmmm okay.. let me try <1> Doesn't work either.. <2> did you replace 'table' with your tablename <1> Hehe, yeah, ofcourse.. :) <2> ok, well 'it doesn't work' is uninformitive <2> DELETE FROM tablename <2> doesn't get much simpler <1> It doesn't delete anything. It doesn't even give me an error. Just, nothing. <2> define 'it'
<0> lol <2> cause i sure as **** don't know what 'it' is <1> I have a usercontrol (ascx) that contains a button. And when i click that button it deletes everythiong in a specific table. <2> fine, then your button is ****ed up <2> if its firing delete from tablename; then its not the sql <1> Hmm.. Weird.. Maybe your right.. <2> can your button accept a resultset? <2> if so, consider: DELETE FROM tablename; SELECT affected = @@rowcount; then the button can alert the user how many rows were deleted, if any, but simply echoing the column 'affected' from the resultset <2> but/by <1> I don't know that approach.. Im writing this in C#... So it outta be pretty simple.. Just databind the button to my sqldatasource and "connect" my stored procedure to the sqldatasource. <2> i can't comment on that end of it <2> sounds like you need to hit #c# <2> since you've established that your sql is correct now <1> Im an ***hole. <1> I databinded it wrong hehe <1> It works now.. :) Thanks alot tho <0> good to hear that you wiped the wrong table <1> Wrong table? :s <2> a schoolgirl that can't type <2> i want my giggle back <3> sorry finders keepers <4> can somebody help me make a query? the scenario is - I need to fetch all the records from table1 - which have no matches in table2. I tried something like -> SELECT *FROM table1 t1, table2 t2 WHERE t1.id <> t2.id and year1 <> 2006 and month <> 3 <4> but this not giving desired result. <4> there may be many t2.ids which will differ in year and month. <5> select * from t1 where id not in (select id from t2) ? <3> what's wrong with the result you're getting, Nineth? <3> actually, try the same but with t1.id = t2.id and t2.id is null <3> or what angel said might be easier, depends on what you want to build on the query <5> ***uming the ids are the same in both tables. <5> Which you didn't mention. <3> and use join words, don't use the comma syntax, so you know what you're doing <3> and don't go comparing id's <4> I will tell you in detail. -> I have one table with id and name., another table with id, year and month. There will be multiple records for same id, but different year and month. i want to return all the records which differs on year and month. <3> they should never mean the same <4> (newbie) <4> i think i made confuzed. <3> I don't understand you're last sentence (what you want to return) <3> say you have (1, 'jack') (2, 'joe') in the first table and (2, '2005', '11') (2, '2006', '10') in the seconds, what do you want returned? <3> on a side note, you should create an extra id on your second table, and make that id field a fk <3> actually, that's not a side note, that's more of a must <6> hey im using mssql and i need to import (every day) a text file to a table. i need to insert if the ID is new or update if it does. i have a problem that 1) im not sure where to start from (make a DTS ? stored procedure ? shuld i just write a client site script with vb or smth ?! 2) how can i convert data from str to smalldatetime and int (tried Cint,CDate,convert(f1,int)... doesnt work =\ what im doing wrong ? <3> HMS, make a DTS, then use the script it generates to adjust it to your needs <6> how can i see the source ? <3> if you use a client side program to run it or use the manager, that's up to you <3> it's there somewhere <6> i use the manager <3> you can convert a str to a datetime field if it's inserted as an acceptable format <3> like '20060302' <6> it is <6> i think <6> 2/2/1955 <6> is ok ? <3> don't think so, no <6> amm <6> i think it is <6> coz when i do the import manualy it worked <3> well then you don't have a problem do you? :/ <6> no the problem it automating it <3> then there must be some other row causing problems
<3> having an empty string or a space or some other character <6> amm <6> ok <3> print out the row it's having problems with <3> or see where it stopped inserting <6> first row <6> its a 'by definition' problem <6> i think <6> sec ill paste the error <6> conversion invalid for data types on column pair 1 (source column 'col16'(DBTYPE_STR), destenation column 'IsAddressInvalid'(DBTYPE_I4)) <3> and what's the query? (the executed one for that row) <6> amm its the DTS <6> that import the data from the txt file and put it in the table <3> like I said, you can see the dts's sql <3> check it <3> don't remember where to click but it should be pretty straightforward <3> and run the dts to a new table, not to an existing one <3> then use a query to transfer that data to the final <3> that way the import always works, and you can see what the data looks like it the table <3> if you get that right you should have no problem combining both steps <7> what is Boolean at .... SQL Server ? <7> bit(1) ? <5> Excellent guess. <7> thanks <7> what for... 1..255 value ? <7> smallint using (2) and cant be change <8> TINYINT is 0-255 <7> Thanks <2> i think tinyint is 128 +- <2> and smallint is 32768 or something <3> it's all in teh bol, man! <3> haha <9> ArrakiS; ghey? <10> ? <9> what invisible people? <10> * TorBeest quickly turns invisibl <9> ooopz <9> sorry mate <11> hello all <11> Need some help constructing an SQL query... have table which has fields: name, age, phone.... some people have same age <11> how can i get a list of all the ages that occur twice or more time <11> s <11> i.e. non distinct in a sense <11> i was thinking... take the normal table and subtract the Discrete(age) set from it <10> cant you like count by ... / group by something <9> drive by <12> having count(*) > 1 <13> hello <13> does anyone know how i can get a statics on table in ms sql server eg how many rows have 'dog' in the animals column <8> Run SQL statements. <13> the thng about it is that i don't know the exact data in the columns <8> So? <8> group and aggregate. <14> taking a sql cl***? <13> no <10> hahahahahah <8> http://www.w3schools.com/sql/default.asp <13> i read thatat <14> neat halo, didn't know that was there.. there's a guy in this finance dept that's really bright and was asking about sql- might just point him in that direction and see what happens.. <9> where do you work? <14> im not talking about you <14> :P <13> i have a table with some columns and i don't know the exact data in the columns. what i want is a statement that can tell me about the data in the coumn like hown many times does is each value exist in the column. and return the data in on table <13> ok sorry <13> i see it now <14> actually i made that sound like i work in finance, eewww <9> lo <9> lol <13> thanks Halo_Four <10> 19478D <8> http://www.w3schools.com/sql/sql_groupby.asp <-- that's what you want <9> i scored 100 on their quiz
Return to
#sql or Go to some related
logs:
#goal #nhl hdderase.exe
l'autrichienne the austrian woman bitch
#linux-noob #delphi C preprocessor /lib/cpp fails sanity check imis sucks #windowsxp #computers
|
|