| |
| |
| |
|
Page: 1 2 3 4
Comments:
<0> hehe <0> not much use of the desktop anyway, never used it. Though it looks so fine, specially with a good desktop background :-) <1> heh, my freebsd machine at home doesn't even have a monitor or keyboard on it. <2> using mssql, how would i compare the month and day of a datetime field to a string? <2> basically im checking for birthdays <3> tapped : what have you tried, and how did it fail? <2> i haven't tried anything <2> i'm trying to think of the easiest approach <4> look up date functions in the help file before thinking no? <2> i got it <2> select.... where datepart(dy,dob) = datepart(dy, { fn NOW() } )) <3> nope <3> that won't work on leap years for anyone born on or after march 1st <3> nice try tho <5> dbcc reindex? <6> Might need to break out a Boolean operator for this one.
<7> Can someone tell me how to show the nth row in a query using MINUS? <8> nth? <8> ohh ... the Nth row ... <7> Yeah, say I had a PERSON table with weight <7> And i wanted to display the 3rd heaviest person <7> the table key is the person's last name.. so the weights aren't sorted <8> what dbms? <7> oracle <8> try #oracle ... <8> I' <8> I'm not familiar with 'MINUS' ... <8> someone else here may be ... but #oracle specializes in ... oh ... oracle <9> minus has nothing to do with rows <1> Not sure if oracle supports this syntax, been forever since I used it... but select bottom 1 * from (select top 3 * from users order by weight) works fine in most dbs. <1> Just figure out the proper syntax. <9> oracle doesnt support it <10> Is there a system table that will tell me all the paramaters of a stored procedure as well as if they have a default value or not? <10> on mssql2k <10> I see that I can do : SELECT * FROM syscolumns WHERE id=object_id('proc') but I don't see the default values in there <9> can you use describe? <10> I don't think that is a valid mssql keyword <10> I know its implimented on MySQL] <9> have you tried it? <9> I thought describe was a standard <10> Yes I just did <10> sp_helptext is the mssql equiv iirc <10> err no <10> there is another one <11> it's sp_help <tablename> <11> I think <11> Haven't used mssql in about 2 years so I could be wrong.. <12> sp_sproc_columns <10> ok - sp_help does return stored procedure paramaters also, but does not tell me if the paramater has a default value or not <10> Thats it! <10> actually sp_sproc_columns does not work <10> does not tell if the paramater has a default value <11> perhaps the parameter does not have a default <11> you should create one with a default and see if it says something, otherwise it might not report it. <10> I did <11> ahh <11> n/m then <10> the procedure I am using has 4 defaultable paramaters and 1 that is required <10> I have code that figures it out, but I am using a combination of the paramater list and systext <11> have you tried asking in #mssql? Maybe one of them will know the answer. <13> sp_helptext will tell you* <13> *kind of <10> I need to figure it out in code <10> So I am parsing the results of the text from syscomments right now <12> twint70s, why are you even doing this <12> if you knwo you have four params and 1 is required, what is the purpose of this exercise <12> know <12> the stored proc changes moment to moment? <13> maybe there are 10,000 stored procedures to "know" <9> thats why you have documentation <13> imo, documenting parms on 10k sp's (if that is the case) is ludicrous <12> having ten thousand is more <13> and if you had a function that was dynamic and could tell you real time then yu wouldn't have to worry about updating documentation <9> then what if someone edits the sp and doesnt tell anyone and everything breaks <9> you wont know unless its documented <12> that would have to be built into the proc <12> phargle
<12> the self description <13> well in CoJoNEsX case, you would query your outdated documention :P <9> if you have 10k stored procs and its not documented then you are waiting for a disaster <13> documentation <10> dfworking : because I am making a cl*** that lines up variables in my code (a web application) with a stored procedure <10> some of the stored procedures have optional paramaters that will not show up in my code, and I want to do error checking to make sure everything required is present in my formated SQL statement before I call SQL server <13> if you have 10k sp's and you attempt to document them, that illustrates disaster <9> no it shows why you need 10k and what they are used for <9> if you have 10k not being documented I bet you dont know what 3/4 of them do <10> 10k procs is not bad long as they are well named and thought out <12> twint70s, which language <10> The most I have ever personally had in a database project was right around 400 <13> nah, not at all. on that large a scale you would have to have some sort of naming convention. The naming convention would lend to self-documenting <10> We are using C# on the windows side and PHP on the unix side <10> This specific part is the PHP part <10> the internal workings of my code do not matter here, it seems wierd to me that there is no way to tell if a paramater has a default value other than executing it <9> so contact ms support? <10> I doubt they would disclose anything not in the SQL server documentation <9> you dont know unless you ask :) <10> Well I'm not going to pay them for a support ticket on that <12> twint70s, i would suggest using extended properties then in the db <12> have your php routine simply query the ext properties <10> I was looking at that, but how do I set the extended properties for a paramater? <12> with the proper syntax :) <10> Right now I have a regular expression that can parse the declaration block of a valid stored procedure and return everything out of it <12> you can set extended properties for pretty much anything <10> can I do it in the proc text? <12> do what <10> set the extended property for a paramater <12> he proc can have the ext property or any of the in/out params as well <12> the <14> we're running sharepoint on mssql server. twice now we haven't been able to access the site because the database was in Single User Mode. No one set the database to single user mode, anyone know what could cause it to be put into that mode automatically? <14> the last time it happened was maybe 3 months ago <14> so its not a common occurance, but a very strange one <10> thats great REMARKS - Description of the procedure column. SQL Server does not return a value for this column <10> And COLUMN_DEF nvarchar(4000) Default value of the column. <10> but it also does not seem to be returned <12> twint70s, sp_helptext will give you the proc schema <10> Yep, same as [text] from syscomments where ... <10> Has to be parsed in code] <12> best to use the catalog procs when available <12> insert..exec <10> thats beside the point, i've already got parsers for the text, I wanted a more proper way to find if the paramater was defaultable <10> I wonder if the COLUMN_DEF paramater works on 2005 <10> because according to the documentation that seems like what I'm looking for <12> i don't think so, i think the problem is that internally sql server doesn't parse that stuff out <12> since it doesn't need to in order to execute the procs <8> bleh <13> twint70s: parameters appear in syscolumns <12> they do in sp_sproc_columns as well <12> but not their default values or whether they're truly nullable <13> intesresting.. the query that em runs pads a default of NULL for the default column returned <13> the one sp i happened to check had a default of null on its only parm so it looked right.. haha <12> only @return_value is not null for every proc <10> Yep <10> Looks like the good old plan regexp is still in place <15> anyone here ever rented a fluke before? have a serious slow network problem on 1/2 my building. wondering which is a good one to cover the bases <16> is anyone around that might be able to answer on question. <12> ask and find out <16> i have read online i read a few ebooks. i dont know what else todo about my problem... <16> i been watching my loa avg go up and down. <16> i change and tweak the my.cnf config. <16> still the save thing <8> diggle, try reading the topic ;) <16> its always soemthing like **** off <16> and not my problem <16> thanks. <8> ever thought about trying #mysql? <8> where your question is more appropriately placed ... <16> okie thanks :P <13> haha <8> ****ing cry babies <17> Hey, working on someone elses database design at the office, using MSSQL. Say i have two tables STATS_2004 STATS_2005 obviously same table design, what kind of join would i do such that i could select from both those tables and have it return a result set containing the rows from both tables, kind of like merge two tables in the select i guess, not sure how to approach this. <8> select * from 2004 union select * from 2005 order by whatever;
Return to
#sql or Go to some related
logs:
#worldcup short circuit robot construction
#nhl #qmail #nhl #hardware #beginner #red #qmail #mirc
|
|