SqlDbx Forum

SqlDbx

You are not logged in.

#1 Microsoft SQL Server » Excel Import - Imprecise Values Retrieved » 2018-09-15 18:48:40

Allen
Replies: 0

When you select a table, right-mouse, select "Import Data From", then select your Excel File, values imported into the INSERT script are imprecise, and are also blown out to 50+ digits.

Example:

1) Create a sample table:
        CREATE TABLE dbo.Test
            (
              Name  VARCHAR (5) NULL
            , Vaue   FLOAT NULL
            )
        GO


2) Enter these into into Excel:
        Name  Value
        ABC     .9
 
3) Import data to table.  Here is what is the scripted result:
    INSERT INTO Test (Name, VALUE)
    VALUES ('ABC', 0.90000000000000002220446049250313080847263336181640625)
    GO

4)  The imported value is imprecise.  In addition, attempts to execute the scripted INSERT statement result in error:
The number '0.90000000000000002220446049250313080847263336181640625' is out of the range for numeric representation (maximum precision 38).. Error 1007. SQLSTATE 22003. Severity 15. MsgState 1. Line 2.


Using:  SQLDbx Pro, v5.11, 32-bit
           Excel 2010, 32-bit

Thanks,
Allen

#2 Re: Suggestions and Feedback » Disconnected + Search In Database » 2014-06-03 11:08:39

Allen

Regarding #3, could you just attempt to reconnect automatically (without asking)?

#3 General Questions » USE Bug » 2012-06-10 14:36:15

Allen
Replies: 2

1)  Open SQLDbx. Go to DatabseA.
2)  Open script window.  Enter the following:

    Use DatabaseB
    GO

3)  Run this script.

The database is changed to DatabaseB, however the dropdown still shows DatabaseA, and the object tree still shows DatabseA objects.  I have to re-select 'DatabaseA' in the database dropdown to switch back.

I thought that this would execute as a batch, thereby leaving me at DatabaseA after the execution.

Allen

#4 Suggestions and Feedback » SQL Formatting Options Not Applied » 2012-01-20 12:07:14

Allen
Replies: 1

Scenario:

  Set the SQLFormatter option to create "Line Breaks After comma"

  Select multiple procs in the treelist.

  Drag them to the script window.

  You'll see the list of proc names separated by commas, but not line breaks.


Thx,
Allen

#5 Suggestions and Feedback » Column Name Search » 2012-01-13 11:42:38

Allen
Replies: 0

Alex -
  Can you add a COLUMN checkbox to the 'Tools/Search In Database' dialog? In large customer databases, this is needed to prospect for fields you may be looking for, but aren't sure of the name.  I currently do a search on the "TABLE" option for smaller databases to find them, however the larger the database, the longer the wait time.  (Current one is 1800 tables...would take forever). 

Instantaneous results can be retrieved in MSSQLServer via the sql:
     SELECT TABLE_NAME, COLUMN_NAME FROM information_schema.columns WHERE COLUMN_NAME LIKE '%<argument>%'

Thx,
BlueSmoke...

#7 Suggestions and Feedback » Add ModifyDate Field on objects in Server Explorer » 2011-12-08 19:17:03

Allen
Replies: 2

ModifyDate is needed for those of us who use the ALTER option in scripting, instead of CREATE.

You are using ModifyDate when applying filters ("Changed Today", etc...), so maybe this would be easy to add.

Thx,
Allen

#8 Re: Suggestions and Feedback » Object Filters » 2011-11-28 12:38:41

Allen

Similar to my post above, it would be nice if the SELECTED object type (in the left pane) would be saved when switching among databases.

For instance, if I have "Procedures" selected in database A, then I switch to database B and look at "Tables".  If I switch back to database A, I'd like to still have "Procedures" selected (not "Tables", as is currently done). 

Thx,
Allen

#9 Re: Suggestions and Feedback » Personal with more features? » 2011-11-28 12:33:48

Allen

If you do SQL development, then the price paid for SQLDbx is well worth it.  In my opinion, if you value your time, then the cost will be some of the best money you ever spent!

#10 Suggestions and Feedback » Object Filters » 2011-11-18 11:36:18

Allen
Replies: 2

Filters applied to object types in the left pane should be specific only for that selected database.

Currently, if you set a filter, then switch to a different database, that filter is carried over.

Thx,
Allen

#11 Re: Suggestions and Feedback » Shortcut To Run Block WHere Cursor Is » 2011-06-27 16:13:41

Allen

Generally I add blank rows to SQL statements for readability.  Ctrl-Sh-B USED to work with these if I added a single space on the blank line... this is no longer the case.  Therefore, I can no longer select my BLOCKS of SQL statements easily.

#12 Re: General Questions » SqlDbx and SSMS » 2011-06-27 13:19:17

Allen

I too have used MgmtStudio/Toad/DBArtisan in the past, and like SQLDbx MUCH more.  I have purchased licenses for all developers in my shop.

Some of the top features I like are:

    Single executable file; no installation necessary.  There's nothing like putting the .exe on the desktop, and being up-and-running.  No need to find the person who guards the SQLServer installation disk, who then needs to actually find the disk itself, then obtain administrative permissions to perform the install.  Then you get moved to another location, and go through the whole process again.

    Auto Saving of Session State - You can have multiple connections to various databases, each with multiple scripting windows open...just close SQLDbx, and re-open later to find all of your connections/scripts just as you left them.

    Favorites - Indispensable when working on databases with thousands of objects.  Keeps you from constantly scrolling around to find your needed objects.

    Right-click over #Temp to get menu for "SELECT * from #Temp" and "DROP TABLE #Temp".  Also, right-click over any table name for 'SELECT *'.

    Auto-Filtering (right-click/Filter when in data grid)

    Table rowcounts automatically displayed

    Very fast intellisense.  And, it had this feature long before MgmtStudio added it!

    Import/Export from Excel; imports scripted.

    Show Column Types - No more tracking down source data-types from proc or query results.

    Drag/Drop QuickDiff

    Generation of DML via selection from data grid. (Select data, right-click/Generate)


Rgds,
Allen

#13 Re: Microsoft SQL Server » Function (Referencing CLR function) Not Showing in Pane » 2011-02-15 18:44:10

Allen

In v3.48, I do now see the CLR functions in the function list.  However, upon attempt to extract, I receive the message 'There is no text for object <functionName>'.

I think you mentioned that the text of these isn't stored.

It looks like Microsoft reconstructs the CREATE for the function based upon the results of the following queries...

Get Parameters:
   SELECT
    param.parameter_id AS [ID],
    param.name AS [Name]
    FROM
    sys.all_objects AS udf
    INNER JOIN sys.all_parameters AS param ON (param.is_output = 0) AND (param.object_id=udf.object_id)
    WHERE
    (udf.type in ('TF', 'FN', 'IF', 'FS', 'FT'))and(udf.name=N'fnRegExIsMatch' and
       SCHEMA_NAME(udf.schema_id)=N'dbo')
    ORDER BY [ID] ASC

Get Other Info (Assembly, etc.):
SELECT
udf.name AS [Name],
udf.object_id AS [ID],
udf.create_date AS [CreateDate],
udf.modify_date AS [DateLastModified],
SCHEMA_NAME(udf.schema_id) AS [Schema],
CAST(
case
    when udf.is_ms_shipped = 1 then 1
    when (
        select
            major_id
        from
            sys.extended_properties
        where
            major_id = udf.object_id and
            minor_id = 0 and
            class = 1 and
            name = N'microsoft_database_tools_support')
        is not null then 1
    else 0
end         
             AS bit) AS [IsSystemObject],
usrt.name AS [DataType],
sret_param.name AS [DataTypeSchema],
ISNULL(baset.name, N'') AS [SystemType],
CAST(CASE WHEN baset.name IN (N'nchar', N'nvarchar') AND ret_param.max_length <> -1 THEN ret_param.max_length/2 ELSE
ret_param.max_length END AS int) AS [Length],
CAST(ret_param.precision AS int) AS [NumericPrecision],
CAST(ret_param.scale AS int) AS [NumericScale],
ISNULL(xscret_param.name, N'') AS [XmlSchemaNamespace],
ISNULL(s2ret_param.name, N'') AS [XmlSchemaNamespaceSchema],
ISNULL( (case ret_param.is_xml_document when 1 then 2 else 1 end), 0) AS [XmlDocumentConstraint],
CAST(OBJECTPROPERTYEX(udf.object_id,N'ExecIsAnsiNullsOn') AS bit) AS [AnsiNullsStatus],
CAST(OBJECTPROPERTYEX(udf.object_id,N'ExecIsQuotedIdentOn') AS bit) AS [QuotedIdentifierStatus],
CAST(OBJECTPROPERTYEX(udf.object_id, N'IsSchemaBound') AS bit) AS [IsSchemaBound],
CAST(CASE WHEN ISNULL(smudf.definition, ssmudf.definition) IS NULL THEN 1 ELSE 0 END AS bit) AS [IsEncrypted],
case when amudf.object_id is null then N'' else asmbludf.name end AS [AssemblyName],
case when amudf.object_id is null then N'' else amudf.assembly_class end AS [ClassName],
case when amudf.object_id is null then N'' else amudf.assembly_method end AS [MethodName],
CAST(case when amudf.object_id is null then CAST(smudf.null_on_null_input AS bit) else amudf.null_on_null_input end AS bit) AS
[ReturnsNullOnNullInput],
case when amudf.object_id is null then case isnull(smudf.execute_as_principal_id, -1) when -1 then 1 when -2 then 2 else 3 end else case
isnull(amudf.execute_as_principal_id, -1) when -1 then 1 when -2 then 2 else 3 end end AS [ExecutionContext],
case when amudf.object_id is null then ISNULL(user_name(smudf.execute_as_principal_id),N'') else
user_name(amudf.execute_as_principal_id) end AS [ExecutionContextPrincipal],
CAST(OBJECTPROPERTYEX(udf.object_id, N'IsDeterministic') AS bit) AS [IsDeterministic],
(case when 'FN' = udf.type then 1 when 'FS' = udf.type then 1 when 'IF' = udf.type then 3 when 'TF' = udf.type then 2 when 'FT' =
udf.type then 2 else 0 end) AS [FunctionType],
CASE WHEN udf.type IN ('FN','IF','TF') THEN 1 WHEN udf.type IN ('FS','FT') THEN 2 ELSE 1 END AS [ImplementationType],
ret_param.name AS [TableVariableName],
ISNULL(smudf.definition, ssmudf.definition) AS [Definition]
FROM
sys.all_objects AS udf
LEFT OUTER JOIN sys.all_parameters AS ret_param ON ret_param.object_id = udf.object_id and ret_param.is_output = 1
LEFT OUTER JOIN sys.types AS usrt ON usrt.user_type_id = ret_param.user_type_id
LEFT OUTER JOIN sys.schemas AS sret_param ON sret_param.schema_id = usrt.schema_id
LEFT OUTER JOIN sys.types AS baset ON baset.user_type_id = ret_param.system_type_id and baset.user_type_id = baset.system_type_id
LEFT OUTER JOIN sys.xml_schema_collections AS xscret_param ON xscret_param.xml_collection_id = ret_param.xml_collection_id
LEFT OUTER JOIN sys.schemas AS s2ret_param ON s2ret_param.schema_id = xscret_param.schema_id
LEFT OUTER JOIN sys.sql_modules AS smudf ON smudf.object_id = udf.object_id
LEFT OUTER JOIN sys.system_sql_modules AS ssmudf ON ssmudf.object_id = udf.object_id
LEFT OUTER JOIN sys.assembly_modules AS amudf ON amudf.object_id = udf.object_id
LEFT OUTER JOIN sys.assemblies AS asmbludf ON asmbludf.assembly_id = amudf.assembly_id
WHERE
(udf.type in ('TF', 'FN', 'IF', 'FS', 'FT'))and(udf.name=N'fnRegExIsMatch' and SCHEMA_NAME(udf.schema_id)=N'dbo')

Quite a mess...

#14 Re: Suggestions and Feedback » New Release » 2011-02-11 16:15:31

Allen

Great new additions; however this version has a most awesome feature not mentioned:

     Object window (on left) now maintains selected object and the scrolled-to location when refreshing the object list!

I also just found a bug:
   When you select multiple objects, then "Scripting Options".  Then press Cancel or OK or Apply.  The scripting options dialog is shown several times (if you select 5 objects, it will be displayed 5 times).

Rgds,
Allen

#15 Re: Suggestions and Feedback » Multi-Session State Saving » 2011-01-24 17:03:41

Allen

Yes, SQLDbx supports running multiple sessions of SQLDbx, but not saving/restoring multiple sessions.  So how about putting the session workspaces in a stack, and restoring in reverse order (last one used opened first, 2nd to last one used opened second, etc...)?

#16 Suggestions and Feedback » Replace Speed » 2011-01-24 17:00:06

Allen
Replies: 0

Regarding replacing text in the script window, long scripts can take a long time (obviously) to replace one word with another.

Could this be sped up by having you take all of the text into memory, performing the replace there, then putting the text back into the script window?

Thx,
Allen

#17 Microsoft SQL Server » Datatype Displayed Incorrectly » 2011-01-24 16:45:49

Allen
Replies: 1

When ShowColumnTypes is on in the Data Grid, SMALLDATETIME columns are being shown as "DATETIME" instead.  The type is shown correctly in the tree control, however.

SQLDbx Version 3.47

SQL Server Version:
            Microsoft SQL Server 2008 (SP2) - 10.0.4000.0 (X64)
            Sep 16 2010 19:43:16
            Copyright (c) 1988-2008 Microsoft Corporation
            Standard Edition (64-bit) on Windows NT 6.1 <X64> (Build 7600: ) (VM)


Rgds,
Allen

#18 Suggestions and Feedback » Multi-Session State Saving » 2011-01-21 13:44:03

Allen
Replies: 2

I frequently run two or three SQLDbx instances side by side (yes, I am a Professional version subscriber!).  For instance, I'm working in one database, but need to see objects from another database simultaneously (and in it's own monitor on a multi-monitor setup).  It would be great if SQLDbx would save each session's scripts individually upon close.  You could do this for as many instances are opened up.  If I then open up my three instances, they each would be setup with their previous environment....cool.

The complication here (but maybe not complicated for you!)  lies in the desire that the sessions need to be numbered in the REVERSE order in which they are CLOSED.  Say I open up Session1, Session2, and Session3.  Then I close Session 2, then close Session 1, then close Session 3.  Since Session 3 was the LAST one closed, it should be the Session3 that is restored the next time I open up SQLDbx.  If I open another SQLDbx, then Session2 should be restored.  If I open yet another, then the original Session1 should be restored.  If this is all too difficult to handle accomplish, then just allow saving of 2 Sessions.

No other DMBS client does this...let's be the first!!

Thx,
Allen

#19 Suggestions and Feedback » File Locking Bug? » 2011-01-21 13:29:49

Allen
Replies: 1

While in SQLDbx, save a script window to a USB drive.

Close the script window.

Try to unmount the USB drive ("Safely Remove Hardware / Stop") , and you may receive the error:  "The device  <...> cannot
be stopped right now.  Try stopping device later".

Close SQLDbx.

You can now successfully unmount the USB drive.

Thx,
Allen

#20 Re: Microsoft SQL Server » SQL Azure Connection » 2010-12-15 18:02:48

Allen

....just realized that rowcounts are not being displayed (Show Table Rowcount).  Must be due to a change in system tables.

Here is the new version info for SQLAzure: Microsoft SQL Azure (RTM) - 10.25.9501.0 Nov  3 2010 13:04:51 Copyright (c) Microsoft Corporation.

Let me know if you'd like to connect to mine to check out their changes to system tables, or shoot me the query you'd like me to run to check it for you.

Rgds,
Allen

#21 Microsoft SQL Server » SQL Azure Connection » 2010-12-01 00:00:02

Allen
Replies: 1

We just recently opened an account on Microsoft's Azure platform.

We were initially having trouble connecting to SQLServer Azure w/SQLDbx.  We found that the problem isn't SQLDbx at all.  You must pre-pend '@<servername>' in front of the user name like this:

User: 'MyLoginID@khcjfynfyi'

(Azure will assign you a cryptic server name like 'khcjfynfyi' above).

Rgds,
Allen

#22 Microsoft SQL Server » Function (Referencing CLR function) Not Showing in Pane » 2010-11-01 12:37:16

Allen
Replies: 3

Using: SQL2005, v3.46 of SQLDbx

I created a function in C#, registered it via CREATE ASSEBMLY command, then created a TSQL function to wrap it.  I can then run my function successfully, so it has definitely been created successfully.  The problem is that this new function isn't showing in the SQLDbx pane that shows functions.  It is showing in Management Studio under 'Scalar-valued Functions'.

Looks like you may be retrieving only functions of a certain type, and the "EXTERNAL" type isn't being picked up. ?


--Syntax used for creating my function
CREATE FUNCTION dbo.GetIt(@Parameter int)
    RETURNS BIT
    AS EXTERNAL NAME AssemblyAlias.[NameSpace.Class].[FunctionName]
GO


Thx,
Allen

#23 Re: Suggestions and Feedback » Firewall Timeouts » 2010-10-29 17:08:51

Allen

It is a firewall issue.  I don't think SQLDbx should add features to solve problems created by your firewall group (or any other external entity).

Let's keep the .exe as small as possible, and stop program bloat!

#24 Suggestions and Feedback » SendTo - Massive Productivity Enhancement » 2010-10-29 16:56:15

Allen
Replies: 1

It would be nice to be able to directly ship objects between servers.

For instance:
    I'd like to be able to highlight multiple objects, right-click and select a 'SendTo' menu option.
    A sub-menu should pop up showing me a list of SERVERS that I'm connected to.
    Selecting a server should display another sub-menu showing a list of databases on that server.
    Once a database is selected, then those objects' CREATE scripts should be executed on that server/database.
    Save the database that was previously selected in Session State.


To perform this task right now, you have to:
    Select the objects
    Select 'Script Create'
    Copy the text out of the script window
    Switch windows to the other server
    Add a new script tab
    Paste in scripts
    Execute scripts
    Close script tab
    Decline msgbox asking you to 'save' the script
    Switch windows back to the original server
    Close the script tab there as well
    Decline (again) msgbox asking you to 'save' the script


Xolo - What do you think?

#25 Suggestions and Feedback » Nice Shortcut » 2010-02-11 21:52:26

Allen
Replies: 1

Go to Tools/Configure Speed Typing

Enter 'ssf' under 'Shortcut', and 'SELECT * FROM ' under 'Substitution Value'

Now when you enter ssf<space> the select will be entered for you.

Board footer

Powered by FluxBB