sql-server-2005

sql server : get default value of a column

耗尽温柔 提交于 2019-12-14 00:21:35
问题 I execute a select to get the structure of a table. I want to get info about the columns like its name or if it's null or if it's primary key.. I do something like this ....sys.columns c... c.precision, c.scale, c.is_nullable as isnullable, c.default_object_id as columndefault, c.is_computed as iscomputed, but for default value i get the id..something like 454545454 but i want to get the value "xxxx". What is the table to search or what is the function to convert that id to the value. Thanks

SQL SELECTING ROW [duplicate]

我的梦境 提交于 2019-12-13 23:17:51
问题 This question already has answers here : Closed 6 years ago . Possible Duplicate: SQL SERVER SELECTING ROW If I have this table below id time start 08.00 AM stop 09.00 AM stop 09.30 AM start 09.30 AM start 11.00 AM start 11.30 AM stop 11.30 AM stop 12.00 PM I want output that looks like output below: Any solution? This is how the output I want: id time end_time interval start 08.00 AM 09.00 AM 60 minute stop 09.00 AM 09.30 AM 30 minute start 09.30 AM 11.30 AM 120 minute stop 11.30 AM 12.00 PM

Continue flow on certain specific Error in SSIS

不打扰是莪最后的温柔 提交于 2019-12-13 21:54:42
问题 In SSIS 2005, I am using the FTP Task. I have a flow where when the package runs, it retrieves any files in a specific folder from FTP to a local folder. Remote folder path is set by variable such as /root/abc/*abc.txt The task works fine if there are files in that folder matching this criteria. If there are no files, the task fails with a file not found error! How can I make SSIS not break the task in case this specific file not found error comes up simply becuase the remote folder had no

VB.net and SQL Server 2005 Setting up Database password for standalone app

一曲冷凌霜 提交于 2019-12-13 20:53:30
问题 Well, I am currently developing an application where different users can login using their email. The application will save the mail details (sender, message, receiver, attachment, etc) to the database. My problem is, I don't want the user to have access to the database when using sql server management studio (maybe some techie users would open their sql and edit the the message there, so yea.. I needed some security for the app.). My solution is i have to set a username/password to the

Group and subtotal columns in Reporting Services 2005

大城市里の小女人 提交于 2019-12-13 20:47:21
问题 I have a report (RS2005, against a MSSS2005 instance) which I have inherited. It shows a basic table of data: a handful of key fields which are used to group rows together, a few basic numeric fields, then a number of dated ('bucketed') fields (e.g. 1 month away, 2 months, 6 months, a year, 2 years, etc.) The user would like to group together these dated fields in aggregated groups and be able to collapse or expand the columns as you can the rows. So we'd be able to show the next year's

How to edit my existing php function and add another check? [closed]

≡放荡痞女 提交于 2019-12-13 20:32:12
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I'd like to add another option for premium accounts. At the moment you can class change your character every 2 days but I want to add another check to allow every 12 hours for premium users. They are determined from another table in PREMIUM there is their strAccountID If they are not premium there will be no

rows into columns [duplicate]

99封情书 提交于 2019-12-13 20:30:29
问题 This question already has answers here : SQL turning values returned in 11 rows into 89 total columns (2 answers) Closed 6 years ago . this is my query select * from dbo.tblHRIS_ChildDetails where intSID=463 output: intCHID intsid nvrchildname nvrgender dttchildDOB Occupation 3 463 SK Female 2001-12-11 00:00:00.000 Studying 4 463 SM Male 2007-10-08 00:00:00.000 Student i need the output like this this is query is dynamic it may return n number of rows based on the intSID chidname1 gender DOB

SQL query for displaying product sales

早过忘川 提交于 2019-12-13 20:13:47
问题 I have sales table which consists, ItemSize, GroupName, Quantity, ProductID, etc... Now I want to display sales according to following format GroupName ItemSize Quantity ItemSize Quantity means BEER 350ml 500 650ml 1000 How I can achieve this in SQL SERVER 2005 EXPRESS (T-SQL)? Thanks UPDATED: its my sales table structure CREATE TABLE [dbo].[SalesLog]( [SalesID] [int] IDENTITY(1,1) NOT NULL, [MemoNo] [int] NULL, [ProductCode] [int] NULL, [Quantity] [int] NULL, [Price] [int] NULL,

sql server procedure optimization

别来无恙 提交于 2019-12-13 20:12:32
问题 SQl Server 2005: Option: 1 CREATE TABLE #test (customerid, orderdate, field1 INT, field2 INT, field3 INT) CREATE UNIQUE CLUSTERED INDEX Idx1 ON #test(customerid) CREATE INDEX Idx2 ON #test(field1 DESC) CREATE INDEX Idx3 ON #test(field2 DESC) CREATE INDEX Idx4 ON #test(field3 DESC) INSERT INTO #test (customerid, orderdate, field1 INT, field2 INT, field3 INT) SELECT customerid, orderdate, field1, field2, field3 FROM ATABLERETURNING4000000ROWS compared to Option: 2 CREATE TABLE #test (customerid

how to connect to another sql server database(server pc) in local area network

走远了吗. 提交于 2019-12-13 19:30:26
问题 i m creating an application, inwhich client has to acces a database stored in a remote location connnected through a live ip. how can i connect simply with a database server placed in LAN. both using sql server 2005 express edition. please refer me or help me on this 回答1: Set in your connection string IP address of remote server. E.g. "Data source=192.168.0.13; Database=MyDb;User ID=my_user;password=12345" where 192.168.0.13 is your remote server IP and MyDb is your database name. 回答2: Also,