|
Joining two tables after manipulating a field Hi I have say table A and table B Table A has the following data. proj_num contact_name contact_phone 05-0001-00 Sam Eaton 111-1111 05-0002-00 Bem Frank 555-5555 06-0004-01 Judy Yamaguchi 888-8888 Table B hs the following data: proj_num project_cost ... 18 Jul 2008 11:20
CASE Statement when ranges involved I would like to convert the following VBA to T-SQL, the problem I have is finding the correct syntax for specifying a range to be tested: Regards VBA------ Select Case Val(ProductGroupNumber) Case 1000 To 1110 Calc_MTA_Product_Groups = "n" Case 1150 To 1160, 1165 To 1201 ... 21 Jul 2008 05:52
Columns returned from Stored Procedure Is it possible to get metadata about columns returned by a strored procedure in much the same way as you would from syscolumns? the info im interested in is Ordinal TypeID MaxLength Precision Scale Nullable IsIdentity tia ... 18 Jul 2008 10:18
Convert datetime How do I take a datetime from an SQL table and convert it to the format dd/mm/yyyy hh:mm? I have tried this but it doesn't work : convert(datetime, dbdate, 103) *** Sent via Developersdex http://www.developersdex.com *** ... 18 Jul 2008 08:13
How important are dependencies? I have about 1000 views, functions and stored procedures in my database. They are encrypted for security reasons - my database is used by a number of clients. I have all the scripts held in separate files on my PC. If I need to change one of them, their dependencies are lost. I cannot use the Generate Scripts ... 19 Jul 2008 09:54
How count in the same table? Are you planning to store this number in the table? Why? You don't need to store any aggregate data in the base tables. You can use a view instead: create view <view name> as select Name ,count(distinct Region) as NumberOfRegions from <table name> go Or is it something else you actually need? A more... 18 Jul 2008 07:12
Count ussing a column in the same table Hello all Here you will find what I need --------------------------------------------- Name Region No_Customers No_Names --------------------------------------------- Albert US 12 3 Albert FR 91 3 Albert EC 2 3 Ce... 18 Jul 2008 06:11
Why is use of triggers discouraged? I have been working with SQL server for only 6 months and am surprised to notice most articles discourage use of triggers. What is the reason? Thank you, Omid ... 22 Jul 2008 16:49
A job to script out Tables and prosedures. Hi all. We do have a lot of DB's on our server. This is a copy of customer DB's with Test data, but customized tables and prosedyres. We do take a standard database backup of thes every day, but the data it self is of no importanse. To reduse size we wonder if there is a way of automatic skript all the tables ... 18 Jul 2008 07:12
SQL Statement to combine 2 records into 1 row. Not very sure how to explain this. but perhaps with my illustration, you guys will be able to understand. Record stored in table StaffID Date / Time Status 1234 16/07/2008 8:00am In 1234 16/07/2008 5:00pm Out 2345 16/07/2008 8:05am In 2345 ... 18 Jul 2008 02:06 |