@# Quotes DB     useful, funny, interesting





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



Comments:

<0> lets say i want to do a loop of a statement in my proc until a certain value i am looking is reached if not it continues to do this loop ,what would be the best waty to do so?
<1> i have a query that inner joins on say 5 tables. if one table fails to join, nothing returns. why is it? and is there a way to overcome this?
<2> yeah, make sure the tables and columns are there
<3> lol Jarett_
<3> sessm: look up joins
<3> and why are you joining 5 tables ?
<4> Disabuse it would help if you gave us more infomation, like the rdbms
<0> using sql server 2000 and doin this on QA
<0> sorry about that ;)
<1> warjest`: cuz i have 5 tables to join =p
<5> hm some of you guys fluent in VB? I'm looking for a file io routine that supports flushing.
<3> "flushing" ?
<5> yeah force write to disk
<5> without opening and closing a'la FreeFile
<5> the ADO stream has a Flush method, but I can't for the life of me figure out how to point it at a disk file :(
<6> Gambit- use FileSystemObject ...



<6> or use the Win32 API ...
<6> Win32 API is probably the best route for doing the flushing ...
<1> argg
<5> hm i'll take a look at it... it doesn't look like that supports flushing either though.
<5> ****
<7> i have sort of dumb question
<5> now it won't let me update the odbc linked tables.
<5> Arrakis, it won't be any dumber then the ones I've been going through.
<7> in ms sql 2000 if i make 2 tables with the same names . but different owners. and then i have a stored procedure that bellongs to dbo. and suppose user1 logs in and executes stored procedure . will it use table1 that belongs to user1?
<5> Off the cuff, I'd say yes, but I didn't even know you could do that in the first place, so obviously take it with a grain of salt. I'd recommend trying it, myself, if the documentation isn't clear.
<7> yeahz
<7> i figure ill do it later
<7> just figured id see if anybody else knew off the tip of the head
<5> In the mean time, I need to figure out wtf access won't write to these odbc tables :(
<7> :(
<8> this is the first time im doing anything with sql and i need a company/employee relationship. so i have a table company with companyid serial primary key, president id foreign key; table employee with employee_id serial primary key, manager id, company_id. but this is sort of circular.. so im getting confused how to proper make records of companies and employees. i don't want to specify any id's i just want to be able to whenever i create a
<8> company, i also create an employee with the proper company_id etc
<8> so are there any smart tricks? or do i first need to create the company, then query for the company_id and then create an employee and query that for the employee_id and update the company again?
<8> using postgresql btw
<2> how much of your grade is this worth?
<8> this isn't homework
<8> my dad asked if i could create a small webapp for his company
<8> but i've never used sql before, so im not sure if this is the right way to do it
<8> so no suggestions?
<2> jberg, wheres your erd (diagram of tables and objects and how they link together)
<8> on my desk
<2> ok this is a basic master detail setup. many (employees) to one (company). unless you have consultants who work multiple places.. then thats a tad more complex
<8> it's the first one
<2> so whats the question/
<2> most languages will let you save variables. like the company id. so you have them goto the company detail form. and then after that the employees form, and p*** through the company id form.
<8> what i want is that when the administrator of the site wants to register another company, it should also register an employee which is the president of the company. but i don't want the user to deal with the id's, so ideally it should fill in company_id, president_id, employee_id etc
<2> if you have no idea what you are doing. use something like phprunner which generates all your web forms and code
<8> yes i could save the variables.. but that's why i have it as a serial, so i dont have to keep track of ***igning a unique id every time
<2> the president will have to be updated after it is inserted into the employees table. which is done after the insert of the company
<8> when you create a record, does it give you back what it inserted? because then i could get which company_id it generated without querying it
<2> no
<2> you tel it what you inserted. thats what it will insert
<2> you p*** company id, you should know it
<8> but i don't want to deal with company_id
<8> i don't want to p*** it
<8> that's why i have serial
<8> so i have no idea what company_id this company gets
<2> ahh enumeration datatypes.. the bane of good DB design
<2> well then insert, and query it.
<8> ok
<8> what is wrong with serial btw?
<8> oh well. thanks for the help
<9> ok, mssql, i need to do this:
<9> select Day(datecreated) + '/' + Month(datecreated) from table1;
<10> i'm using sql server 2000 and i'm trying to figure out a way to ***ign a variable that goin to retrieve a count based on a sql stmt that will be executed in order for me to get the count
<10> for ex:
<10> set @cmd2 ='select top 7'+ @2counter+'=count(*) from tblname
<10> this @cmd2 var returns nothing because it looks like it doesn't like the way the counter is being ***igned,what a better and more efficient way on doin this?
<11> say what?
<12> what
<12> Say "what" again, mother****er, I dare you! \
<10> i want to ***ign a variable "@2counter" that gives me the result from this count(*)
<11> You are concatenating the value that is @2counter into the dynamic SQL statement.
<10> but i am doing this by putting all that in a @Cmd variable then executing it
<10> correct



<11> And you expect the value to be put back into the variable @2counter?
<10> yeh the count(*) value to be placed withing that variable,possiblle?
<11> Using sp_executesql, yes. Read how that sproc works with parameters.
<10> cool thx bro
<13> anyone know a "good" way to select 20 random rows. (mssql 2000) ive done some googling and see some ways to do it in mysql that seem easy, but nothing in mssql
<11> TOP and ORDER BY NEWID()
<13> ahh, i jsut found something that said to do that too :)
<13> excellent, thanks bud
<14> haaay thats slick
<15> ANYONE KNOW HOW TO GET THE MYSQL C API to work WITH mingw on a WINDOWS BOX?
<16> ReLipXPS: read the ****ing topic
<17> yikes
<18> yo
<19> agalogoagalogoagalogoagalogoagalogoagalogoagalogoagalogoagalogoagalogo
<20> hmm.. MSSQL - materialized views: Anyone heard of using those as a way of easy mirroring of data to a reporting server?
<19> well
<19> they basically are a refreshed table view
<19> I dont really understand your question
<19> I mean sure you could use that for that purpose
<21> why do so many people wanna copy data elsewhere for reporting?
<19> denormilizing data is good for reporting
<19> makes it easier
<19> takes the load off the production database too
<21> true that...but with reporting services you can muck with data easily...
<19> denormalizing rather
<21> eases (at least did for me) the need to flatten it
<19> Purple- some people don't want to use cube tools
<19> theyd rather structure the data themselves
<21> would it be easier to have a dts job copy the data or just use replication to a reporting server?
<19> or pull the data into a location that it can be related to data from other systems
<21> or is there no difference?
<19> afaik replication uses the dts services to some extent
<21> reporting services makes it damned easy to get data from pretty much anywhere...
<19> yeah
<19> I use Cognos for reporting
<19> it still takes it toll on the relational schema
<21> 99% of my clients are completely microsoft shops
<19> so most of the time I pull the data into my data warehouse
<19> ew
<21> I have a few oracle folks out there, but not many
<19> I love my oracle
<21> I probably would if I understood it a bit more...most of my clients "dba" people kinda ****
<19> haha
<19> :D
<21> as a developer I shouldn't hafta be creating schemas and ****
<19> hahah
<19> you're in the wrong line of work then
<19> Im seeing most development efforts these days go end to end
<19> hardly ever does a "DBA" build the schemas
<19> he might tune them and mess with them physically
<21> heh...I love my work...just when other people **** I skip around them and do it myself...
<21> sorry, I misspoke...
<19> **** im tired
<21> I can definitely create my schema...I shouldn't hafta physically implement it in our oracle server
<19> hahah
<19> gotcha
<21> after MS enterprise manager, the oracle tools are confusing as **** to me
<19> theres a really nice Oracle EM now too
<19> in 10g its lazy as all getout
<21> I'm on 9i right now
<21> :(
<19> 9is Enterprise manager is pretty nice too
<19> it looks a lot like MS's
<21> looks similar...but they use different terminology for **** all
<4> agalogoagalogoagalogoagalogoagalogoagalogoagalogoagalogoagalogoagalogo
<6> oh stfu ...
<22> I'm working with DB2 on an iSeries. The client system is Red Hat Enterprise Linux AS 4 Update 2. I can execute SQL statements against the DB2 database, but I can't call any stored procedures. The error says my ODBC connection does not exist. I have IBM working on it, but they've been working on it for over a month. Does anyone have any suggestions for fixing this? (And no, using SQL Server is not an option.)
<22> Oh, and I can call the stored procedures from another iSeries server or from Windows, so I know the stored proc exists and the username I'm logging into DB2 with can access it.
<23> Hello everybody...
<23> "Failed to generate a user instance of SQL server due to a failure starting the user instance."
<23> I'm using the web admin thingie from VWDExpress, and got it working last week by setting the logon of the SQLE service to "Local System"
<23> And the "user instance" setting is "false" as suggested in one of the Microsoft fora
<23> And I can connect to the db from within VWDE.
<23> Any suggestions?


Name:

Comments:

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






Return to #sql
or
Go to some related logs:

#windows
sonic__s
junglejak
ncgi example tcl
IJERKMYSELF
#stocks
#photoshop
tunneling bluehost
#windows
you are not on a channel *mirc



Home  |  disclaimer  |  contact  |  submit quotes