|
More site info...
Microsoft SQL Server | Forum profile
|
|
Forum profile page for Microsoft SQL Server on http://www.dbforums.com.
This report page is the aggregated overview from a single forum: Microsoft SQL Server, located on the Message Board at http://www.dbforums.com.
This forum profile page summarizes the general forum statistics such as: Users Activity, Forum Activity, and Top Authors, which are reported in either a table or graph below for a given reporting time period.
Additional forum profile information for "Microsoft SQL Server" on the Message Board at http://www.dbforums.com is also shown in the following ways:
1) Latest Active Threads
2) Hot Threads for Last Week
Warning: These statistics are generated using 'best efforts' and can experience delays and reporting errors at times. Please note that such statistics do not constitute a forum's popularity and/or exact posting volumes at any given reporting period.
|
|
|
|
|
Posting activity on Microsoft SQL Server:
|
|
Week
|
Month
|
3 Months
|
|
Threads:
|
31
|
232
|
806
|
|
Post:
|
83
|
868
|
2,552
|
|
|
Microsoft SQL Server Posting activity graph:
|
Top authors during last week:
user's latest post:
How to normalize this table?
Published (2009-11-26 16:12:00)
The dependency Dave is talking about is 2NF. 5NF doesn't apply here - for 5NF there must be a composite key of three or more attributes and no none-key attributes.
user's latest post:
SQL Server 2000 Query
Published (2009-11-29 17:14:00)
Code: SELECT left(P.productID, 2) as category, P.productID, P.inventory_count FROM products as P INNER JOIN (SELECT left(productID,2) as category, max(inventory_count) as max_inventory_count FROM products where inventory_count > 0 and active_product=1 GROUP BY left(productID,2) ) AS C ON left(P.productID,2) = C.category AND P.inventory_count = C.max_inventory_count If multiple Products have the same (highest) inventory_count, they will...
user's latest post:
Stored Procedure Transaction...
Published (2009-11-28 08:46:00)
Hi, I have 3 stored procedures each executing insert statements in the db. I am using ASP.NET to pass parameters from and to the stored procedures by handling their data sources' events. - First procedure inserts a record in a table returning the newly inserted row - Second procedure gets this value and and uses it for insertion to other tables The problem is all the insert statements in those 2 procedures need to succeed before being...
user's latest post:
Turn Off Import / Export Data
Published (2009-11-26 13:22:00)
Quote: Originally Posted by pootle flump Even though I was logged in using a SQL Server login, the wizard defaulted to authenticating using windows authentication - I had to re-enter my SQL Server log in details ****I bet this is where your process is going wrong - do these people have access to the database via windows authentication?**** You are correct - The Database defaults to Windows on my machine and works because I already have access...
user's latest post:
Concatenating a Date and another...
Published (2009-11-30 18:16:00)
you're confusing me, because you are combining a date and a "number" How is that suppose the be a valid date/time?
user's latest post:
SQL Server 2000 Query
Published (2009-11-30 03:30:00)
Quote: Originally Posted by duro when the items are the same it returns all the rows Which row do you want to return if there are several rows with the same highest inventory_count? You need to be more specific about your selection criteria.
user's latest post:
Concatenating a Date and another...
Published (2009-11-30 20:21:00)
Data is currently being imported from SQL into an excel sheet starting in column B. In column A the following formula is concatenating the data =B124&C124. On several other tabs the date is on the X axis and a Cost Center (CC) is on the Y axis. The following formula populates the table based on the SQL data being imported =IF(ISNA(VLOOKUP(P$7&$H18,Data!$A:$D,4,FALSE)),0,V LOOKUP(P$7&$H18,Data!$A:$D,4,FALSE)) The end...
user's latest post:
How to normalize this table?
Published (2009-11-26 15:05:00)
Quote: Originally Posted by dportas Couldn't the price per product change during the period specified by "Halyyear"? i'm guessing it's a typo, and should actually be "halfyear", with 1HF09 representing the first half of 2009, while 2HF09 is the second half do you think the unitprice and quantity should be in separate tables? what would that be, 5NF? 6NF? are unitprice and quantity even...
user's latest post:
UK postcodes
Published (2009-11-30 13:16:00)
Is this any good? Code: DECLARE @addresses table ( post_code char(8) ) INSERT INTO @addresses (post_code) VALUES ('SW185NT') INSERT INTO @addresses (post_code) VALUES ('SW18 7RT') INSERT INTO @addresses (post_code) VALUES ('SW15XQ') INSERT INTO @addresses (post_code) VALUES ('NW2 6TT') INSERT INTO @addresses (post_code) VALUES ('SW18 5NT') INSERT INTO @addresses (post_code) VALUES...
user's latest post:
Error In Simplet Delete...Please...
Published (2009-11-29 15:46:00)
Hello experts, Im having a challenge in writing a simple delete statement. Ive a table (FirstLevelChangeDetail) which has same number to 2 fields (CapturedDate & DbTotal) however there is the 3rd entity which is RecordNumber and its different. Ive 5 rows which have same CapturedDate and DbTotal but Different RecordNumber. I still need to delete them even though they are different records. When I wrote the following select...
|
|
|
|
Latest active threads on Microsoft SQL Server::
Started 6 days, 14 hours ago (2009-11-30 17:19:00)
by Brett Kaiser
you need to use convert to allow formatting with a trailing number
CONVERT(varchar(20), ProcessingDate,103) + ' ' + CostCenter AS 'PDCC'
Check out books online help for all of the different formats
Started 1 week ago (2009-11-29 17:14:00)
by Wim
Code:
SELECT left(P.productID, 2) as category, P.productID, P.inventory_count
FROM products as P
INNER JOIN (SELECT left(productID,2) as category, max(inventory_count) as max_inventory_count
FROM products
where inventory_count > 0 and active_product=1
GROUP BY left(productID,2)
) AS C ON
left(P.productID,2) = C.category AND
P.inventory_count = C.max_...
Started 6 days, 14 hours ago (2009-11-30 17:35:00)
by Brett Kaiser
Concatenating a Date and another field
Started 6 days, 15 hours ago (2009-11-30 16:53:00)
by Brett Kaiser
ok, gotta admit I never used MSRS
And I went looking for it
I installed visual studio....
Then the "tutorial" say to open up Business Intelligence studio
In any case, I do, and it launches VS
OK, so now I find another "wizard"....so the it asks me to connect using a connection string....what?? they're "wizard" can't use the usual dialog or reference an aliases I already ...
Started 1 week, 3 days ago (2009-11-27 07:53:00)
by paulanthony
SQL Server 2008,2005 and 2000 Security and Encryption Tools Maybe this is of use to you
Started 6 days, 21 hours ago (2009-11-30 10:56:00)
by MCrowley
Try
Code:
delete FirstLevelChangeDetail
where RecordNumber in (select top (@n) RecordNumber order by RecordNumber desc)
This may take some fiddling, if you have duplicate RecordNumbers.
Started 6 days, 17 hours ago (2009-11-30 14:33:00)
by Stealth_DBA
ozzii, you can try DATEADD.
SELECT DATEADD(DAY, 167, '2009' + '-01-01')
167 is the Julian day of the year.
2009 is the Year.
Create a date for Jan 1 of the supplied year and add the number of Julian days to it.
PS. Correction: This would actually be off by 1 day. you would need to subtract 1 from your number of days to get the correct date.
SELECT DATEADD(DAY, 167 - 1, '2009' + '...
Started 6 days, 19 hours ago (2009-11-30 13:16:00)
by gvee
Is this any good?
Code:
DECLARE @addresses table (
post_code char(8)
)
INSERT INTO @addresses (post_code) VALUES (' SW185NT')
INSERT INTO @addresses (post_code) VALUES ('SW18 7RT')
INSERT INTO @addresses (post_code) VALUES ('SW15XQ')
INSERT INTO @addresses (post_code) VALUES ('NW2 6TT')
INSERT INTO @addresses (post_code) VALUES ('SW18 5NT')
INSERT INTO @addresses (post_code...
Started 2 weeks, 4 days ago (2009-11-19 06:45:00)
by jigujigu2 jigujigu2 is offline Registered User
Help me to create 2 query :
Below is my table.
Code:
PACKET-HEADER TABLE
===========================
PACK_ID DESCRIPTION
===========================
PA Packet PA
QX PACKET QX
---------------------------
PACKET-DETAIL TABLE
============================
PACK_ID PROD_ID QTY
============================
PA PROD-A 1
PA ...
Started 1 week ago (2009-11-29 10:48:00)
by shijobaby Registered User
Jdbc errors: data type out of range. JDBC error
|
|
Hot threads for last week on Microsoft SQL Server::
Started 6 days, 14 hours ago (2009-11-30 17:19:00)
by Brett Kaiser
you need to use convert to allow formatting with a trailing number
CONVERT(varchar(20), ProcessingDate,103) + ' ' + CostCenter AS 'PDCC'
Check out books online help for all of the different formats
Started 1 week ago (2009-11-29 17:14:00)
by Wim
Code:
SELECT left(P.productID, 2) as category, P.productID, P.inventory_count
FROM products as P
INNER JOIN (SELECT left(productID,2) as category, max(inventory_count) as max_inventory_count
FROM products
where inventory_count > 0 and active_product=1
GROUP BY left(productID,2)
) AS C ON
left(P.productID,2) = C.category AND
P.inventory_count = C.max_...
Started 6 days, 19 hours ago (2009-11-30 13:16:00)
by gvee
Is this any good?
Code:
DECLARE @addresses table (
post_code char(8)
)
INSERT INTO @addresses (post_code) VALUES (' SW185NT')
INSERT INTO @addresses (post_code) VALUES ('SW18 7RT')
INSERT INTO @addresses (post_code) VALUES ('SW15XQ')
INSERT INTO @addresses (post_code) VALUES ('NW2 6TT')
INSERT INTO @addresses (post_code) VALUES ('SW18 5NT')
INSERT INTO @addresses (post_code...
Started 1 week, 1 day ago (2009-11-28 16:42:00)
by Pat Phelan
You can easily link different databases in Microsoft SQL Server, but if you are setting this up from scratch just make separate tables within a single database. One database will be easier than many.
-PatP
Started 6 days, 15 hours ago (2009-11-30 16:53:00)
by Brett Kaiser
ok, gotta admit I never used MSRS
And I went looking for it
I installed visual studio....
Then the "tutorial" say to open up Business Intelligence studio
In any case, I do, and it launches VS
OK, so now I find another "wizard"....so the it asks me to connect using a connection string....what?? they're "wizard" can't use the usual dialog or reference an aliases I already ...
Started 1 week ago (2009-11-30 06:52:00)
by gvee
Why are you performing 3 separate transactions then? Can all the work be wrapped up into a single sproc?
Code:
DECLARE @a table (
a_id int identity(9,37)
)
DECLARE @b table (
b_id int identity( 93,7)
, a_id int
)
DECLARE @newly_inserted_rows table (
id int
)
BEGIN TRAN
INSERT INTO @a
OUTPUT inserted.a_id INTO @newly_inserted_rows (id)
DEFAULT VALUES...
Started 6 days, 17 hours ago (2009-11-30 14:33:00)
by Stealth_DBA
ozzii, you can try DATEADD.
SELECT DATEADD(DAY, 167, '2009' + '-01-01')
167 is the Julian day of the year.
2009 is the Year.
Create a date for Jan 1 of the supplied year and add the number of Julian days to it.
PS. Correction: This would actually be off by 1 day. you would need to subtract 1 from your number of days to get the correct date.
SELECT DATEADD(DAY, 167 - 1, '2009' + '...
Started 6 days, 21 hours ago (2009-11-30 10:56:00)
by MCrowley
Try
Code:
delete FirstLevelChangeDetail
where RecordNumber in (select top (@n) RecordNumber order by RecordNumber desc)
This may take some fiddling, if you have duplicate RecordNumbers.
Started 1 week, 3 days ago (2009-11-27 07:53:00)
by paulanthony
SQL Server 2008,2005 and 2000 Security and Encryption Tools Maybe this is of use to you
Started 6 days, 14 hours ago (2009-11-30 17:35:00)
by Brett Kaiser
Concatenating a Date and another field
|
|