@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5



Comments:

<0> just make it an int, and create a FK constraint
<0> int or whatever datatype you need it to be
<1> but wouldn't that allow me to reference only one row from the other table?
<0> no the other table will reference that one
<1> oh wait, i'm sorry, i need a many to many relationship
<0> and it won't be unique, so it can have many
<0> ok then you need a 3rd table to relate them
<1> oh.... darn... i was hoping i wouldn't have to do that
<0> sorry =)
<1> hehe thanks anyways
<2> sup gangstas
<3> how can I "fetch" a .sql file to a MSSQL database that I created using Enterprise Manager?
<4> with QA or
<4> isql
<3> oh so no enterprise manager I suppose
<5> with a sql rover



<5> rover loves to fetch
<3> QA says that the file is too large
<4> isql
<6> hi, I'm running SQL Server 2000 (MACHINE) and SQL Server 2005 (MACHINE\SQL2005) on the same Server 2k3 box, I can connect to both instances locally, but remotley only the 2000 (it can't find the server, not auth eror), any ideas on what I might not be doing?
<2> running both on the same port?
<2> no clue just an idea...
<6> yeah they probably are
<6> ****
<4> they cant listen on same port
<2> exactly
<4> i mean
<4> the socket wouldnt' create.....
<2> yep
<2> therefore only one would be listening for remote connections
<2> the other would only accept local connections
<2> hence why my first idea was they might both be set to the same port
<6> where do I go to change that?
<2> eh to be honest not sure how to change the default port in MS SQL, I use Oracle...
<4> like i said they wouldn't run on same port
<4> sqlserver would bitch prbably
<4> check eventlog
<1> Odyss3us: http://www.atlas-sys.com/kb/illiad/10426.html
<6> thx
<5> i should take monday off and go geocaching
<7> hey all, anyone have the problem where generating scripts of tables in MSSQL generates all the original table/field names? So if you've renamed a table/field, the scripts are incorrect.
<8> well duh
<8> do you think text files edit themself when you change something?
<7> no, as in if you script a table after it's had names changed, the script generates with the original names
<0> i doubt that's actually happening
<7> seems to be
<7> happens on three different machines here
<7> try it for yourself...
<7> create a table, rename it, rename a field, then generate a script on it
<7> this is MSSQL2K sp4
<9> I basically do that stuff every day, and this does not happen to me.
<9> But for the sake of fun and good times, I'll try to repro this issue
<8> TheGamble you're a liar
<7> it's weird, I just tried to replicate with a test DB, and I wasn't getting the problem
<8> Bal0n3y knows what he is doing
<8> and i trust his word 100%
<9> heh
<8> who are you to say he is wrong!
<8> :)
<9> Bal0n3y, is there any weird criteria I need to know; as in, the table is modified on machineA, but script generated on machineB, that sort of thing?
<7> but I've got a m***ive DB, we need to script all tables, when we do, the scripts contain all the old names
<7> this is from a DB that's been built over the last few months by three developers, I couldn't be sure
<9> This is known to happen with careless use of sp_rename for stored procedures, views, triggers, but not tables
<7> actually, yeah I think it's only views where the problem is
<9> there you go.
<9> when you use sp_rename on such things as views, stored procedure, and triggers, the data in syscomments is not updated to reflect the new name
<9> however, that is exactly the data used when generating the scripts
<9> you must drop/create to change the names of those properly
<7> thanks a lot, much appreciated
<9> no problem
<10> is there any function or anything to allwo an auto increment in a query column such that the result is auto incremented? e.g. so the columns are numbered 0-n when returned?
<9> what dbms?
<10> sql server 2000
<9> no
<10> i wan tot randomly select a row
<9> you have to self-join and do COUNT(*); either that, or temp tables with IDENTITY
<11> auto incremented on what event?



<10> but rows can be deleted
<9> now, that's a different question
<10> so if i use an auto increment column that wont work
<12> TOP 1 and order by NEWID()
<10> cus when deleting rows it will mess it up
<9> Halo_Four yep
<9> not quite the original question :)
<12> Nope
<13> why do you need to not have gaps?
<9> I think since he wants a random row, and thought that RAND() would not work due to gaps. Now that he has 3 other methods he should be cool :)
<13> oh
<9> COUNT(*) with self-join, temp tables, and TOP 1 with NEWID()
<13> ok disregard
<9> TOP 1 with NEWID() gets the nod for the 1-row random select from me
<13> and if its ok with TheGamble its ok with me
<11> http://www.sqlteam.com/item.asp?ItemID=8747
<11> covers the newid way in detail
<10> thx
<10> is there any speed issue w/ SELECT TOP 1 lead FROM zza_leads ORDER BY NEWID() if the table grows in size?
<10> e.g. is it any slower then just selecting a row by id
<14> Hi guys, I'm using ACCESS. I'm creating a query to compare data from three tables that all share a common field (that they can be joined on). I need to be able to edit entries in each table from the results. Sometimes this works, this time it's not. How do I do the join properly so that I am able to edit the fields from the results?
<12> lone: Yes
<14> Here is the SQL I'm using: http://pastebin.com/630185
<14> stupid me.. I remade the table in a hurry and didn't make the column no dups.. that was the problem, geez, sorry to bother you guys, I feel dumb.
<15> Hello everyone. I am writing a program that creates DDL scripts (in a wicked way) from a live SQL Server (2k). I am almost done. I am not creating any "CREATE STATISTICS" though. Does anyone know how to read existing statistics info from a database (sysindexes?) and how to discern auto-statistics from manually created ones? Thanks.
<16> SilvioSan : the question is a little confused. are you wanting to read the index info to create them, or the actual statistics about the indexes themselves
<17> !rtfm
<17> Select top 10 * from temp table where [Identity Field] >= 12 .... What does it mean by id field or how can i choose the rows to select if it doesnt have a primary key column?
<18> in almost every sql database, rows are enumerated regardless of their contents
<18> the name for this varies from database to database, but it's usually something like uid or oid or rowid
<18> and the means by which you select on that are going to vary not only from database to database but also from api to api
<18> you would do better to join the language channel you're working from, unless it's c++
<17> StoneCyqh: all i wanna do is select the rows in a simple mssql query
<17> StoneCyqh: is there a default row id field for mssql database?
<19> Hi all
<19> I`ve got a php script that searches a mysql database using $query p***ed from a form
<19> is it a major undertaking to add boolean search support?
<19> or can I use the sql built in boolean commands?
<18> Borgon: yes, though i'll be damned if i can remember what it's called.
<18> it'll be listed on msdn. just go digging.
<17> thanks
<17> welcome dfworking =)
<20> anyone know how to log all sql statements that sql server 2000 is receiving? Maybe possible to see somewhere in enterprise manager?
<17> How can i find the identity field for a select/where query? is it stored in sysindex or what
<17> ps. mssql is the database
<21> how do you mean
<17> select top 100 * from table where id<100
<21> is id a column name?
<17> there isnt a counting column for the table, i want to select certain rows at a time but i dunno the id
<17> Someone said that mssql table has a default row id field.
<21> just leave off the order by clause then
<17> but am copying the rows into another table, there is no order by
<21> 'i want to select certain rows' means you have some criteria
<17> select top 100 * from table where id<100, then select top 100* from table where id>100 and <200
<17> am just missing the id
<21> then how do you know which columns you're selecting?
<22> I just know
<22> ;)
<17> dfworking: am selecting everything i just want to separate by rows
<21> wait, is this the 'i'm a l33t h4ck3r' exercise?
<17> yes
<21> blah
<17> id info is all am asking for nothing else. am looking google and msdn but no help every example mentions id field like this
<21> guess you should have invested the time to do legitimate db development work before being a ****
<17> well thank you
<21> gee, sorry if i insulted you
<17> complement
<21> see, the silly thing is that i could easily do what you're suggesting
<21> isn't that ironic
<17> dfworking: iknow =(
<17> i am getting everything going just this darn if field.. the table doesnt have a default column for 1
<17> dfworking: can i hire u by the hr?
<21> you couldn't afford me


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #sql
or
Go to some related logs:

#beginner
mirc #pocketwarez
#windows
#beginner
IE7Registry.exe
#beginner
#winxp
#solaris
mainestacks.com
#gamedev



Home  |  disclaimer  |  contact  |  submit quotes