@# Quotes DB     useful, funny, interesting





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



Comments:

<0> k00
<0> yes
<0> count(case when mycol = 1 then 1 else null end)
<1> oh man
<1> after all that.
<1> ty for the future
<2> hello all, i was writing a oracle script in bash the would execute a sql script. but it seem like its not taking in the syntax for the sqlplus command correctly and ideas how i can fix this -> http://pastebin.com/597085
<3> hi, if i have a table which connects ID to a NAME, and another table which has a field ID, can i make a query which replaces in the other table, all the ID with the USER linked to them in the first table, in the query only?
<3> i got it with JOIN
<3> but if i have 2 fields i wanna do that replace, what is the syntax for that ?
<4> what is the http header for success?
<4> http/1.1 ok ?
<5> HTTP/1.1 200 OK
<6> Man, i was about to choke to death but, i did enjoy reading about SQL Server 2005 programming written by Robert Riviera(the guy who also wrote a great SQL Server 2000 programming book) published by Wrox
<6> while feinting from severe case of indigestion, the last thing that popped up in my head was that book i read at Barnes & Nobles in Lower Manhattan
<0> huh huh



<6> huh huh?
<6> i am going to bed... gnite
<7> how can this: http://pastebin.com/597484 be optimised ?
<8> how can I design a recursive item behavior with sql? i mean, if having a product catalog with groups that have child products
<8> how can I design for every product to be able to have a child product aswell?
<8> i mean the group -> product relationship isn't hard - just two tables where group has an id and product has an id and a ref id to its parent group
<9> so
<9> by having two tables
<9> a group can have many products?
<8> yes
<8> it's a parent-child relationship
<8> but a product can also have a number of sub products and so on
<8> so group -> product [-> product] [-> product] [-> product] ... and so on
<8> not sure how to define the recursive definition that a product can actually have sub products
<8> because as it can get nested to a unlimited number of levels i would need an unlimited number of tables
<8> so trying to find a solution where the product table can contain all levels
<8> if you understand
<10> SicLuDe
<10> tenfour?
<7> do i need an index for a column if its in the ORDER BY ?
<11> you need to keep in mind not to over index
<10> the option in EM of import is doable via direct sql query ?
<10> how can i make a query that will insert from one table to another one only if the row doesnt exist in it yet ?
<12> how can i select all elements from the nth element to the xth element?
<13> very good question Lollelite
<9> thread, are you still here?
<9> you don't need an unlimited amount of tables
<9> all you need is to read up on relational database theory
<8> yea
<9> and you create a single table which contains products linked to products
<8> i might have found a way
<9> it is pretty simple stuff
<9> a hiearchy of products
<8> yea
<8> now my product table has: int id, int parentid, int level
<8> level being the nesting level of the product
<8> so if level=0 the id refers to its parent group id
<14> Iam i in the correct room is this sql programming?
<8> and if level>0 it refers to a product with its parentid and level one smaller than the child
<9> depends, JSql :D
<8> Inge, you think this is a good way?
<14> lol basically iam bit of a newbie in sql i admit it, is anyone willing to help me make a simple query with some data
<9> thread: in your model, a product can only be under one other product. if that is what you want, then it works
<9> do you really need the level?
<9> jsql: what dbms?
<8> hmm perhaps not
<14> yeah database
<8> but as the top level product is a child of a group i need some way to indicate if a product refers to another product or to a group
<9> JSql: keep it in channel please
<8> but yea, as product ids are unique i guess it'd be enough to have a bool indicating the parent type
<14> sorry man it just i want to paste u a few lines of code so u can look at it
<9> JSql: you did not answer my question, *what* type of database are you using?
<9> JSql: and pastebins are used for pasting code
<10> when im runing the query : SELECT b.*, a.ID AS Expr1 FROM TempTable b LEFT OUTER JOIN Data a ON b.ID = a.ID WHERE (a.ID = NULL); im not getting anyting but when i erase the Where i get in Expr1 some rows with vals and some with Nulls why isnt that working form me ?
<14> Iam not sure man, its a simple database made in SQL i think dbms it only has like 4 tables
<9> HMS: what dbms? you usually cannot say = null, as that will always return false (even null = null returns false). try a.ID IS NOT NULL
<9> JSql: Microsoft sql server?
<10> /
<10> mssql
<14> yeah
<10> but i need is null...



<10> hooo
<10> right
<10> lolo
<10> thx
<10> didnt notice :)
<10> working a.ID is Null
<9> JSql: find a pastebin, paste the code there, paste the link here, and see if someone helps you out.
<9> The reason for asking what dbms is that you have mssql, oracle, postgresql, DB2 etc etc etc.... and they differ...
<10> what is the function in mssql to convert from text to date ?
<10> CDate or Convert?
<9> convert
<9> look it up in books online
<9> you know what Books Online is?
<10> amm not im usualy working with w3schools
<10> nop*
<10> if u link me ill that will help :)
<9> heh
<9> you have installed Ms SQL server?
<9> Books Online is the documentation installed with it
<9> Start --> All Programs --> Microsoft SQL Server --> Books Online
<10> ah ok
<10> thx
<10> i get arithmetic overflow error =\
<9> what is the string you try to convert?
<9> do you have a "select convert(datetime,....." one-liner that fails, which you can paste here?
<10> INSERT INTO Data
<10> (ID, Name, LastName, SMSUpdate, Email, EmailUpdate, ***, IsAddressInvalid, EndDate)
<10> SELECT b.ID, b.Name, b.LastName, b.SMSUpdate, b.Email, b.EmailUpdate, b.***, b.IsAddressInvalid, CONVERT(datetime, b.EndDate) AS Expr1
<10> FROM TempTable b LEFT OUTER JOIN
<10> Data a ON b.ID = a.ID
<10> WHERE (a.ID IS NULL)
<10> Inge any idea ?
<9> uhm
<9> ok
<9> 1. do NOT EVER paste multiple lines of sql in this channel, use a pastebin
<9> 2. In order to save a lot of time for the people who willingly help you out for free, please read what they ask you, and attempt to follow it
<9> So, have you tried to use the CONVERT function in the simplest possible context? i.e. not in in a select from tables?
<10> no i didnt
<10> sorry next time ill
<9> e.g. the simplest way to help you would be if you had something like this:
<9> select convert(datetime, '01-09-2006')
<9> that failed
<10> i missed read
<9> or you could e.g. get the first few lines of text, and then try to convert them ouside that select
<10> SELECT CONVERT(datetime, '31/12/07') AS Expr1
<10> gets an error
<10> but yours dont =\
<10> works : SELECT CONVERT(datetime, '01/09/06') AS Expr1
<10> hooo
<10> it must be coz if the region
<10> or smth like that
<10> i use dd/MM/yy
<10> and the server MM/dd/yy
<10> can i set the format of the convert ?
<10> ho found it in msdn
<10> nvm thx :)
<9> :)
<9> a basic rule of debugging is to isloate the error, simplify the scenario
<9> get to the core
<15> http://sql-servers.com/nopaste/?show=401
<15> .am i missing something?
<15> ohs hmm
<15> think i got it
<16> hi all
<16> DBMS: MSSQL, anybody knows how can I use INSERT and make it update some specific field in case the key already exists?
<17> startkeylogger
<16> anybody?!
<18> fizzWERK what is your question
<16> <16> DBMS: MSSQL, anybody knows how can I use INSERT and make it update some specific field in case the key already exists?
<18> anybody knows = does anyone know
<18> insert does not update
<18> insert... inserts, update... updates
<16> yeah,
<18> hope i cleared that up for you


Name:

Comments:

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






Return to #sql
or
Go to some related logs:

t
#windowsxp
#politics
#computers
#flash
#winxp
how to get an invite to xbins
#firebird
luciador
#beginner



Home  |  disclaimer  |  contact  |  submit quotes