• Questions and Answers Database – Best practice/More optimal

    Hi guys and gals, I have some sample Questions and Answers stored in a Database called Questionnaire. It has 2 tables, Questions and Answers. The issue I’m having is that when I join the Questions and Answers tables, the question data is repeated for each …

    Read More

  • How to do "Excel PERCENTRANK.INC Function" type of calculations with SQL Server Query

    SQL Script.txtExcel PERCENTRANK.INC Function Example.zipHi I have an excel sheet that makes use of the Excel PERCENTRANK.INC Function for doing the relative percentile score calculation on past 5, 10 and 15 days data available inside a Table. Quote: The Excel PERCENTRANK.INC function calculates the relative …

    Read More

  • Iterate Field In Table

    I have a table that houses fully qualified table names, roughly 15. How can I iterate that table and create a view ? For example, something like this Code: Create Table tocreateviewfrom (dbname varchar(100)) Insert Into tocreateviewfrom Values (foxfire.dbo.abcd),  (foxfire.dbo.abcde),  (foxfire.dbo.abcdf),  (foxfire.dbo.abcdg),  (foxfire.dbo.abcde),  (foxfire.dbo.abcdl) –Then …

    Read More

  • Dynamic SQL in a Cursor's FOR LOOP (DB2)

    Hi Guys, I have a quick question! After hours of searching, I still can’t find what I am looking for. Code:   CREATE PROCEDURE Tmp()   LANGUAGE SQL   BEGIN ATOMIC     DECLARE fname CHAR(40);       FOR v AS cur1 CURSOR FOR …

    Read More

  • weird object already exist

    hi guys, anyone encountered this weird error on sybase version 12.5 I’m trying to create dummy table, the table does not exist on the current database. when i tried to execute the command the result prompted me that the object already exist, upon check on …

    Read More

  • Create new rows for each id based on location

    Hi All, I have data in a table as below, id,id2,location 1, k12, CA, WA, NY 2,K8,VA,TX can someone please tell me how can I get desired output as shown below. expected output: id,id2,location 1,k12,CA 1,k12,WA 1,k12,NY 2,k8,VA 2,k8,TX Thanks

    Read More

  • USEREXIT program location?

    Looking for help on USEREXIT. OS: Windows 2008 R2 DB2: 10.5 Fix Pack 3 I was asked to build a DB2 server for testing purpose and it needs to have the same settings as the production server database (which was not built by me). From …

    Read More

  • SSAS Tabular Attach AW_DW Using MDF

    Hi all, I am trying to attach AdventureWorksDW2012_Data.mdf to a Tabular Instance. I was able to attach AdventureWorks2012_Data.mdf to the database engine in a separate instance. I downloaded all files from CodePlex and put them in C:AW_2012 I right-clicked on SSMS and ran as administrator. …

    Read More

  • count(*) on where exists

    Hello all, Two queries very similar are giving different row count. Can you please advice. TIA. select count(*) from FBL.CELL where exists ( select * from FBL.cell where cmpgn_cd = ‘RS15001’ and cell_st_dt = ‘2015-07-14’); Total 426308 But select count(*) from FBL.cell where cmpgn_cd = …

    Read More

  • DB2 DBCLOB data INSERT with Unicode data

    The problem at hand is to insert data into a DB2 table which has a DBCLOB column. The table’s encoding is Unicode. The subsystem is a MIXED YES with Japanese CCSID set of (290, 930, 300). The application is bound ENCODING CCSID. I was successful …

    Read More

Page 10 of 56« First...«89101112»203040...Last »